synodic-ai™ ML SYSTEMS
ML Systems Desk · KV-Cache Management

Serving agents: the cache knows what comes back, not when

Three systems papers posted to arXiv on 2026-11-18 and 2026-11-19 treat agent traffic as a caching problem with an unusual property: the server can tell which cached state an agent will need next, and often where the next prefix hit will end, but not exactly when the agent will return. One prefetches into host memory timed to tool completion, one compresses context while requests wait in the queue, and one builds exact recurrent-state checkpoints for hybrid models at the boundaries where reuse lands.

Why agent contexts strain the cache

Agents alternate between inference and tool calls and resend a growing context each time. In the benchmarks the TripleKV authors study, prompts reach 100,000 tokens and a task can involve up to 100 model calls, yet each turn adds only about 1,000 to 2,500 new tokens, so consecutive requests share almost their entire prefix. For a 30-billion-parameter mixture-of-experts model they cite about 96 KiB of KV cache per token, so one 50,000-token context takes 4.6 GiB, and the memory left after weights on one data-center GPU holds about six such contexts. While a tool runs, an agent's blocks can sit idle for 100 seconds or more, and other agents' requests push them out. In the authors' experiments, up to 76 percent of requests found their cached blocks already evicted to slower tiers or discarded.

Prefetch into host memory, not the GPU

TripleKV treats GPU memory, host DRAM and SSD as a three-level cache and works on one observation: the blocks an agent needs next are known; only the time of reuse is uncertain. A per-tool latency predictor in the agent harness, which uses tool inputs and recent history, estimates when each call will finish. The authors report that a prior system's predictions fell within one second of actual completion for fewer than half of calls and that tool-specific predictors raise accuracy to over 90 percent of calls. The system then prefetches the agent's blocks from SSD into DRAM, at lower priority than reads for running requests, and protects them from eviction until they are used. It deliberately does not prefetch into GPU memory, because that competes with inference for scarce capacity and wastes it on mispredictions. It also avoids duplicating GPU-resident blocks in DRAM and refills blocks from SSD when they are evicted from the GPU, much like a victim cache.

On four agent benchmarks with up to 20 concurrent agents on one H100 GPU, the share of requests needing critical-path SSD reads fell from 45 to 76 percent to under 10 percent. Tail time to first token at the 95th percentile dropped by up to 49 percent against vLLM extended with DRAM and SSD tiers and was 1.5 to 7 times lower than recent agent-aware systems, approaching an oracle that knows tool completion times.

Compress while the request waits

Aggron targets context compression. Summarizing history on the same engine competes with live requests for compute and memory, whether it runs on the critical path or in the background. Aggron summarizes at every turn, compresses only prose while keeping tool outputs verbatim, and appends each summary as a frozen segment that is never re-summarized, so the cached prefix survives. Summaries are issued from a separate queue while the agent's request is stalled behind head-of-line blocking, and only when the server predicts the summary will finish before that request is admitted; otherwise it falls back to synchronous summarization. A reset ceiling below the maximum model length bounds total context.

The authors' characterization finds that agent requests under KV pressure spend most of their latency waiting for admission, which is the slack Aggron uses. Accuracy on real tasks from four benchmarks, measured with three open models, stayed within run-to-run noise of uncompressed execution, within 2.7 percentage points. Against two state-of-the-art asynchronous summarization schemes, P99 latency fell by 27 and 31 percent, mean latency by 11 and 15 percent, and throughput rose 1.34 and 1.40 times. These latency and throughput figures come from a simulator calibrated against the same H100 NVL hardware, not from end-to-end runs.

Exact state where the next hit will land

FrontierReplay addresses hybrid models that mix attention with recurrent layers. Attention KV can be truncated at any page boundary, but a recurrent state is overwritten as each token is processed and can be reused only where a copy was saved. vLLM's default saves states on a coarse grid, which in the authors' traces left 2 to 8 percent of reusable prefix tokens unserved on one model and 6 to 20 percent on another. Finer exact caches must cut the prefill forward pass at each checkpoint, which took 1.44 to 1.86 times as many prefill steps as the split-free design under identical placement.

The key measurement is where reuse ends: on every workload, 79 to 100 percent of reusable tokens end at an earlier turn's boundary, and most of the rest at a branch point the server has already seen. FrontierReplay lets the prefill run uncut, logs recurrent-layer inputs over a short window, and then runs a state-only replay kernel that skips attention and feed-forward layers, 6 to 37 times cheaper per token than recomputation and 1 to 3 ms of GPU work per checkpoint. Because checkpoints are 49 to 67 MiB each, a retention policy drops dead and superseded checkpoints first, keeps proven branch points and the state of running requests, and lends slots that hold only dead state to the attention KV pool. Across eight operating points it delivered 1.11 to 4.26 times vLLM's goodput and cut median time to first token by 16 to 89 percent, while an approximate cache it was compared against lost 13 to 17 percent accuracy at 24,000 to 32,000 tokens.

Design lessons

The three designs share a pattern: use the structure of agent traffic to decide what to keep, and use slack the system already has to do the work.

Scope of the results

TripleKV was evaluated on a single GPU with up to 20 agents and builds on one open-source engine. Aggron's serving gains are simulated, and its accuracy checks cover three models and four benchmarks. FrontierReplay was evaluated on two hybrid architectures at a 32 GiB cache budget, with larger tensor-parallel runs at 27 and 34 billion parameters. Each result depends on agent and workload traces that resemble the authors', which is the first thing to check before adopting a design.

Sources