Continuum: Efficient and Robust Multi-Turn LLM Agent Scheduling with KV Cache Time-to-Live

Hanchen Li, Qiuyang Mang, Runyuan He, Qizheng Zhang, Huanzhi Mao, Xiaokun Chen, Hangrui Zhou, Alvin Cheung, Joseph E. Gonzalez, Ion Stoica

TL;DR

Agentic workloads, which involve LLMs interacting with external tools, suffer from significant performance degradation due to inefficient KV cache management. Continuum introduces a novel Time-to-Live (TTL) mechanism for KV caches, balancing reuse benefits against memory costs, to dramatically reduce job completion times and improve throughput for these complex multi-turn interactions.

What Problem Does This Paper Address?

Large Language Models (LLMs) are increasingly being used in agentic workflows, where they interleave generating text with calling external tools (like APIs or code interpreters). A key optimization in LLM serving is the KV cache, which stores intermediate computations to speed up subsequent token generation. Traditional LLM serving systems aggressively evict KV caches once a request finishes to maximize GPU memory utilization. However, this "end-of-turn eviction" policy breaks agentic workflows. When an LLM calls a tool, there's a pause. If the KV cache is evicted during this pause, the LLM has to recompute the entire prefix (or reload from slower CPU memory) when it resumes after the tool call. This leads to substantial delays and reduced throughput. Furthermore, the duration of tool calls can vary wildly, making it hard to predict when a KV cache might be needed again. Existing solutions either don't account for this variability or fail to consider the cumulative queueing delays that arise when evicted caches need to be reloaded and re-scheduled.

Methods

Continuum tackles this problem by introducing a Time-to-Live (TTL) mechanism for KV caches. Instead of evicting a KV cache immediately after an LLM request finishes, Continuum assigns it a TTL value. This TTL represents the maximum duration the KV cache will be kept in GPU memory.

The core of Continuum is its sophisticated TTL calculation. It estimates the optimal TTL by balancing:

  • Benefit: The savings from avoiding KV cache misses (recomputation or reloading) and, crucially, the reduction in per-turn queueing delay. This latter point is a key innovation, as it accounts for the time an agent program might spend waiting in the queue for GPU resources after a tool call.
  • Cost: The opportunity cost of occupying GPU memory, which could otherwise be used by other requests.

Continuum also incorporates:

  • Program-Level First-Come-First-Serve (FCFS): This ensures that requests belonging to the same agent program are prioritized to maintain continuity, even if other requests arrived later.
  • Robustness: The TTL mechanism naturally handles variable tool call durations. If a tool call takes longer than expected, the KV cache is eventually evicted after its TTL expires, preventing indefinite memory occupation and potential deadlocks. Conversely, if the tool call is short, the cache is available for immediate reuse.
  • Cold-Start Handling: For new or unseen tool calls, Continuum uses default TTLs or global statistics to ensure reasonable performance before sufficient historical data is collected.

Datasets

The paper evaluates Continuum on several agentic workloads:

  • SWE-Bench: A benchmark for evaluating LLMs on software engineering tasks.
  • BFCL (Berkeley Function Calling Leaderboard) v4 (Web Search category): This dataset involves agents answering questions using web search tools.
  • OpenHand: A popular open-source coding agent.

The experiments use various LLM models, including Llama-3.1 (8B and 70B), Gemma-3 (12B), and GLM-4.5 (355B), across different hardware configurations.

Key Insights and Ideas

  • Per-turn Queueing Delay is Critical: The most significant insight is the realization that the cumulative queueing delay after KV cache eviction is a major bottleneck in agentic workloads, often more impactful than the KV cache reload cost itself. Existing systems overlook this.
  • TTL as a Balancing Act: Applying a TTL to KV caches is a principled way to balance the benefits of reuse against the cost of memory occupation, especially in dynamic agentic scenarios.
  • Robustness to Variability: The TTL approach inherently handles the unpredictable nature of tool call durations, making it more practical than fixed-effort caching strategies.
  • Program Continuity Matters: Maintaining the continuity of agent programs, rather than just individual requests, is crucial for overall performance.

Key Results

Continuum demonstrates significant improvements across various agentic workloads and configurations:

  • Delay Reduction: Achieves average job completion time improvements of over 8x in real-world agent scenarios (SWE-Bench, BFCL, OpenHand). In emulated scenarios, it reduces delay by 1.12x to 3.66x.
  • Throughput Improvement: Improves throughput by 1.10x to 3.22x in emulated scenarios and up to 8.18x in some real-world cases.
  • Scalability: Performance improvements are consistent across different LLM model sizes and hardware. The benefits of Continuum increase with the number of turns in an agent's program.
  • Minimal Overhead: Continuum introduces only a minor scheduling latency (single-digit milliseconds), which is negligible compared to the gains in LLM inference time.

Limitations and Future Work

  • Sensitivity to Cost Model: The effectiveness of Continuum relies on the accuracy of its cost-benefit model, which uses empirical data. In highly volatile or adversarial workloads where tool call distributions shift abruptly, the model might produce suboptimal TTLs, temporarily degrading performance.
  • Generalizing Beyond ReAct: The current design is optimized for ReAct-style agents (reasoning followed by tool calls). While it can handle parallel tool calls, extending it to more complex, non-linear control flows (e.g., speculative branches, asynchronous multi-agent coordination) is a future direction.
  • Handling Sudden Distribution Shifts: The paper acknowledges that handling sudden shifts in tool call distributions for unseen agent behaviors is a future research area. The current approach relies on training-time distributions for cold starts.

Summary updated

BibTeX
@inproceedings{li2026continuum,
  author = {Hanchen Li and Qiuyang Mang and Runyuan He and Qizheng Zhang and Huanzhi Mao and Xiaokun Chen and Hangrui Zhou and Alvin Cheung and Joseph E. Gonzalez and Ion Stoica},
  title = {{Continuum: Efficient and Robust Multi-Turn LLM Agent Scheduling with KV Cache Time-to-Live}},
  booktitle = {LLA @ ICLR},
  year = {2026},
  url = {https://openreview.net/forum?id=sVzK0LC9pn},
}
Figure