Long-context LLM inference on cheap memory, sold per token to AI agents over x402 on Hedera
Headroom sells long-context LLM inference to AI agents at H100 prices instead of H200 prices, by keeping only the hot KV cache in GPU memory and parking the rest in CPU DRAM and NVMe.
The problem: in 2026, memory, not compute, prices GPUs. H200 rentals rose about 160% this year versus about 35% for H100, mostly because of 141 GB of HBM versus 80 GB. At long context, a model's KV cache can take more memory than its weights, and agents are the workload that grows context every turn.
The insight: agents are idle most of their wall-clock time, waiting on tool calls between turns. Their KV cache does not need to sit in HBM while they wait. Headroom parks it in DRAM or NVMe and reloads it on the next turn, so one 80 GB GPU carries far more live agent sessions. Agents tolerate the reload latency; chat users do not, so we sell to agents first.
How agents use it: Headroom is an OpenAI-compatible endpoint. An agent swaps its base URL and pays per request with no account and no human in the loop:
A public dashboard shows the capacity curve, cost per 1M tokens versus the H200 baseline, KV tier hits and live paid receipts, with every number linked to a benchmark row or an on-chain transaction.
One rented GPU node runs everything Headroom owns. Hedera, Arc and Chainlink are the only outside dependencies.
Inference: vLLM with LMCache in one pinned Docker image (lmcache/vllm-openai), serving Llama 3.1 8B Instruct through an OpenAI-compatible API. Hot KV stays in HBM, warm KV is offloaded to CPU DRAM and cold KV and shared prefixes to NVMe. A benchmark harness replays synthetic agent sessions with tool-call gaps across three configs (baseline, FP8 KV, FP8 KV + LMCache offload) and produces the capacity curve, TTFT and KV reuse numbers. We check that greedy outputs are identical with offload on and off.
Payments, Hedera (x402 v2): a TypeScript gateway in front of vLLM. A request with no payment is tokenized (vLLM /tokenize, CPU only), checked against the buyer's caps and answered with 402 and a PAYMENT-REQUIRED header: scheme exact, network hedera:testnet, asset USDC via HTS (0.0.429274), amount = exact micro-USDC quote from a published formula. The agent's x402 client signs a partial HTS transfer and retries; the gateway rejects replays, the Blocky402 facilitator verifies and settles on Hedera, and only then does the request reach vLLM. A meter (SQLite ledger) records tokens, cached tokens, tier hits, latency and price, signs an EIP-712 receipt and writes one message per paid request to an HCS topic. "make audit-prices" recomputes every price from the ledger.
Tab settlement, Arc: HeadroomEscrow is a Solidity contract built and tested with Foundry (12 tests) and deployed to Arc testnet from the CLI. Deposit, session keys, Merkle batch posts by a TypeScript signer (viem), a 600 s dispute window, challenge with Merkle proof + signed receipt (refund + penalty), release and withdraw. A reconcile script checks released + refunded + remaining = deposited.
Price baseline, Chainlink CRE: a CRE workflow on a cron trigger fetches H100 and H200 rental offers from the Vast.ai API on every node, takes the consensus median and writes the H200-equivalent baseline to the escrow on Arc (CRE supports Arc testnet). Each baseline is also published to its own HCS topic so Hedera holds the audit trail of the Chainlink price.
Dashboard: Next.js, reading the ledger and benchmark CSVs on the same node, exposed over a Cloudflare tunnel. Demo buyer agent: a budget-aware long-context agent in TypeScript that pays on its own and slows down near its cap.
Hacky bits: CRE lists Arc but not Hedera, so the baseline goes to Arc via CRE and is mirrored to Hedera via HCS. In simulation the CRE MockForwarder means the operator relays the consensus values with setBaseline, labelled with the cre_run_id.

