EfficientAgent: What Makes KV Cache Offloading Work for Concurrent Agents?

Kunming Shao, Jierun Chen, Jiangnan Yu, Xiao-Hui Li, Chaofan Tao, Yanli Wang, Huanxin Lin, Kwang-Ting Cheng, Chi Ying Tsui, Haoli BaiarXiv 2026

TL;DR

LLM agents are notoriously "chatty," resending their entire conversation history every time they call a tool. EfficientAgent reveals that offloading this conversation history (KV cache) to CPU memory often fails because concurrent agents "thrash" the cache, evicting data before it can be reused. By modeling the "reuse working set" and using a smart admission policy, the authors cut recomputation by 93% and speed up agent tasks by 39%.

What Problem Does This Paper Address?

LLM agents (like those solving coding tasks) work in a loop: they read a task, call a tool (like a compiler), read the result, and call the LLM again. Each new call includes the entire previous conversation. To save time, serving systems use prefix caching, which stores the mathematical state (Key-Value or KV cache) of previous tokens so they don't have to be recomputed.

When GPU memory runs out, systems "offload" this KV cache to the host (CPU) memory. However, this often yields inconsistent results. Sometimes offloading makes things faster; other times, it actually slows the system down—even when the hardware bandwidth suggests it should be a win.

The authors identify the culprit: cache thrashing. In a multi-agent environment, while Agent A is waiting for a tool to finish, Agents B, C, and D are using the server. If the host memory isn't large enough to hold the "working set" of all active agents, Agent A’s data gets evicted to make room for the others. When Agent A returns, its data is gone, and the system has to recompute everything anyway, having wasted time and bandwidth on a useless transfer.

Figure 1: Overview of our EFFICIENTAGENT. Left: between two turns of one agent (t and t+1), the server processes the other agents’ calls; this reuse working set decides whether the agent’s cached prefix is still in the host tier when it returns. Right: KV state moves between the GPU’s HBM and the CPU host tier over PCIe; a host hit is worth the recomputation it avoids per host-link byte, and it exists only if the tier holds the working set. Teal marks EFFICIENTAGENT: it sizes the host tier to the working set and admits host writes under pressure (Section 4).

Methods

The researchers introduce EfficientAgent, which manages the host memory tier based on two main components:

  1. Stack-Distance Modeling: Borrowing from classic operating system theory, they use a model to estimate the "reuse working set"—the total memory needed to ensure an agent finds its data when it returns. This allows them to predict exactly how much host memory is needed before deploying the agents.
  2. Capacity-Conditioned Admission: At runtime, the system monitors memory pressure. If the estimated working set exceeds the available host memory, the system stops trying to save large "refills" of data that are likely to be evicted soon. Instead, it only saves small incremental updates to prefixes that are already safely cached.
  3. Hardware Profiling: They define an "Offload Benefit Ratio" (OBR) to determine if a specific GPU/CPU combo should offload. For example, high-compute GPUs like the H800 can recompute tokens so fast that moving them over a PCIe link is actually slower than just doing the math again.

Datasets

The study evaluates its approach using:

  • SWE-bench Verified: A benchmark consisting of real-world GitHub issues. This provides realistic, long-context trajectories for coding agents.
  • OpenHands: An open-source platform for building autonomous AI agents, used here to run the CodeActAgent with the Qwen3-Coder-30B model.

Key Insights and Ideas

  • Residency is King: A cache hit is only valuable if the data stays resident until it's needed. Transferring data to a cache that is too small is "wasted work" that adds latency without saving computation.
  • The Compute-to-Bandwidth Gap: Offloading is a hardware-dependent gamble. On an RTX 3090 or H20, loading a token from CPU memory is ~6x cheaper than recomputing it. On an H800, the GPU is so powerful that recomputing is often faster than the PCIe transfer.
  • Load Control Prevents Thrashing: Much like an OS manages virtual memory to prevent a computer from freezing, LLM servers need "load control" for the KV cache. By being selective about what they store during high pressure, they protect the hits they can keep.

Key Results

The authors tested their system on eight H20 GPUs replaying SWE-bench tasks.

  • Massive Efficiency Gains: By sizing the host tier to the predicted working set (moving from 5 GiB to 20 GiB per rank), they reduced recomputed prompt tokens by 93.1% and cut the total "makespan" (time to finish all tasks) by 38.7%.
  • Policy Success: Their conditioned admission policy successfully navigated the "transition region." In small-memory scenarios, it cut recomputation by 35% compared to naive offloading. In large-memory scenarios, it automatically stepped out of the way to avoid unnecessary filtering.
  • Hardware Realities: They confirmed that offloading is a net win for the RTX 3090 and H20 but a net loss for the H800, where the ratio of compute power to PCIe bandwidth is too high.
Figure 2: A host tier provisioned at the working-set estimate cuts computed prefill by 93.1% and makespan by 38.7% (5 to 20 GiB per rank). Replay of SWE-bench Verified agent calls on eight H20 GPUs with fixed GPU KV memory; host capacity is per GPU (rank). (a) Makespan, (b) computed prefill, (c) host traffic per rank; shading: capacities above the 11.4 GiB working-set estimate (Section 3); diamonds: independent repeats. (d) Without a host tier, halving the active pool cuts makespan, computed prefill, and queue delay.

Limitations and Future Work

  • Context Editing: The paper notes that "history condensers" (which summarize or truncate old parts of a chat) can be counter-productive. Because prefix caching relies on exact matches, changing even one early token "rekeys" the entire subsequent conversation, rendering the existing cache useless.
  • Static vs. Dynamic: While the stack-distance model is powerful, the authors suggest that future work could better handle highly dynamic agent behaviors where tool-call times vary wildly.
  • Disaggregated Serving: The researchers point toward applying these working-set principles to "disaggregated" systems, where KV caches are shared across entire clusters of servers rather than just between a GPU and its host CPU.

Summary updated

BibTeX
@misc{shao2026efficientagent,
  author = {Kunming Shao and Jierun Chen and Jiangnan Yu and Xiao-Hui Li and Chaofan Tao and Yanli Wang and Huanxin Lin and Kwang-Ting Cheng and Chi Ying Tsui and Haoli Bai},
  title = {{EfficientAgent: What Makes KV Cache Offloading Work for Concurrent Agents?}},
  year = {2026},
  eprint = {2609.33762},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2609.33762},
}
Figure