跳到正文
arXiv cs.CL· Tianyu Fu, Ruoxi Wang, Zihan Min, Zhongqi Ren, Zhihao Li, Tengxuan Liu, Shengxu Mu, Hanling Zhang, Yu Wang·· 12 小时前AI 评分38

面向智能体的缓存工程:AKV 服务引擎与 drop/repos 缓存操作

Cache Engineering for Agents

AI 导读

研究提出“缓存工程”方案,让 LLM 智能体通过 drop 和 repos 两种操作直接控制活跃 KV cache,无需修改轨迹或重新预填充已保留上下文。配套的 AKV 服务引擎提供无状态接口并内部管理缓存复用、驱逐与恢复,实验显示工具响应滚动 drop 策略使平均基准分数提升 1.7 分、平均成本降低 27.7%,输出吞吐最高 1.2 倍、P95 请求延迟加速 1.5 倍。

正文 · 原文

View PDF HTML (experimental)

Abstract:Large Language Model (LLM) agents can handle increasingly complex tasks, navigating long trajectories of observations and actions. As these trajectories grow, key-value (KV) cache I/O and storage become the dominant cost. Trajectories can also exceed the LLM's maximum context length, requiring control over active cache growth. Prior work uses context engineering to reduce cache size by trimming or summarizing history. However, modifying the trajectory prefix invalidates subsequent cached states and triggers costly re-prefilling of retained context. Task accuracy can also suffer when too little context is retained to limit re-prefill costs. We propose cache engineering as a new scheme. It allows agents to directly control their active KV cache without modifying the trajectory or re-prefilling retained context. Specifically, agents can proactively use drop to exclude selected cache from future attention and repos to adjust retained keys' position encodings. We formalize these cache operations and identify history dependence as a serving challenge: identical token sequences can yield different cache states under different cache operation sequences, making prefix matching insufficient for correct cache reuse. Thus, we co-design the AKV serving engine. It provides a stateless interface compatible with existing serving APIs, while internally managing stateful cache reuse, eviction, and restoration. Experiments show that a tool-response rolling-drop cache policy improves average benchmark scores by 1.7 points and reduces average cost by 27.7%, compared with conventional threshold-triggered summarization. With AKV, it achieves up to 1.2x the output throughput and a 1.5x speedup in P95 request latency. Recursive self-improvement of cache policies further reduces cost by 7.1% over expert design. Our code is at this https URL.
Subjects: Computation and Language (cs.CL)
MSC classes: 68T42, 68T50, 68M20
ACM classes: I.2.7; I.2.11
Cite as: arXiv:2610.28577 [cs.CL]
  (or arXiv:2610.28577v1 [cs.CL] for this version)
  https://doi.org/10.48550/arXiv.2610.28577

arXiv-issued DOI via DataCite (pending registration)

Submission history

From: Tianyu Fu [view email]
[v1] Tue, 20 Oct 2026 17:32:24 UTC (328 KB)

来源:arXiv cs.CL · arxiv.org