DEV Community

Shalendra gaur
Shalendra gaur

Posted on Edited on AI-assisted

What replaying an agent's history costs the host (Nebius and WEKA numbers), and how AXI removes the replay

Every turn of an agent loop is a new request, and its prompt carries the whole session so far. Two public sources from this autumn put numbers on what that costs the company that runs the model.

What the host pays for the replay

Nebius and WEKA, 24 September 2026. One eight-GPU NVIDIA HGX B300 node serving DeepSeek-V4-Pro with vLLM, replaying real agentic coding traffic (a pool of 512 active sessions drawn from more than 5,000 captured sessions) for eight hours per configuration. With GPU memory only: a 40% cache hit rate, 33,900 uncached prefill tokens per request, 44% of requests with a first token under 5 seconds, and 46,000 output tokens per GPU-hour. With WEKA's shared cache tier added: 93%, 4,400, 97%, and 169,000 (3.7 times). WEKA's write-up of 16 November 2026 adds that 60% of prefill work was recomputed on the memory-only node and 6.8% with the tier.

SemiAnalysis AgentX. The AgentX v1.0 dataset holds 393 real Claude Code sessions. The median request carries 142,016 input tokens and produces 444 output tokens, and 44% of the sessions contain subagents.

That is how the bill is built: the input side follows the length of the replayed history, and a faster cache tier lowers the price of each replay.

The other lever: do not replay

AXI is a layer on the host side, between the model and the state it edits. The host holds the exact state. The model proposes one change per step in a small strict language, a deterministic check admits or refuses it, and the next prompt is rebuilt, short and of fixed size, from the held state. The prompt follows the size of the state, not the number of steps. The model is unchanged.

It is for the company that runs the model, not for end users, and it fits any LLM application that holds state: agents, chat, workflows, short jobs and long, from the first step. The architecture is by Rajnish Choubey. The tests and measurements are mine, run with an AI assistant as a tool.

What was measured, each figure in its own setup:

  • Qwen2.5-14B-Instruct-AWQ, vLLM 0.31.0, one L4, prefix caching on, three 600-step jobs: 413.7 prompt tokens a step with the exact state held by the host; 8,228.8 with the whole chat kept (all three kept chats reached the 16,000-token limit between steps 367 and 418); 2,334.2 with a running summary.
  • Gemini 3.8 Flash, 400 turns: 99,809 prompt tokens a turn with the chat kept against 1,177 with the layer (85 times fewer). Median first token past 150,000 prompt tokens: 5.57 s against 2.41 s.
  • Gemini 3.8 Flash, 1,500 steps: with the layer the state was exact on 1,500 of 1,500 steps, at about 2,824 prompt tokens a step. With the chat kept, the mean prompt was 476,835 tokens over the 457 turns it ran, and a company applying the replies as they came lost the state for good at turn 287. Median first token: 9.13 s (kept chat, prompts of 500,000 tokens and more) against 2.27 s (all steps with the layer).
  • A 7B model on one L4: the prompt never went above 660 tokens over 80,000 steps, and all 80,000 states were exact.
  • Memory on a Google TPU v6e-1 chip (33.5 GB, cache-shaped arrays, no model run): a kept chat at the mean length of the 1,500-step job takes the memory of about 169 AXI-sized sessions.

Reading the two sets of numbers together

They come from different workloads. Nebius and WEKA replayed captured coding sessions. Ours are generated jobs in which every step is compared with an exact answer. They are not a head-to-head; they show one shape from two sides. Where the history is replayed, cost and first-token time follow the number of steps. Where the host holds the state and rebuilds the prompt, they follow the size of the state.

What is checkable

The repository holds the tests, the saved results and a small sidecar that shows how the layer sits in front of a vLLM or SGLang server. The headline numbers can be re-checked in a few seconds, with no key, no model and no GPU: github.com/gaurshalendra2412/axi-runtime. The test pages behind the figures above: memory arms, 1,500-step Gemini job, TPU sessions, 80,000-step 7B run, technical reference.

Sources

Architecture: Rajnish Choubey. Tests and measurements: Shalendra Gaur, with an AI assistant as a tool. Not affiliated with Nebius, WEKA, SemiAnalysis, Google or the vLLM project.

Top comments (0)