Tsinghua & CUHK propose 'Cache Engineering': agents edit KV cache without re-prefilling
TheTuringPost · x · 2026-10-28
A paper from Tsinghua University and CUHK introduces Cache Engineering for Agents, going beyond context engineering for long agent trajectories.
Problem
- KV cache I/O and storage dominate cost as agent trajectories grow, which can also exceed max context length.
- Existing context engineering (trimming/summarizing history) modifies trajectory prefixes, invalidating cached states and triggering costly re-prefilling; retaining too little context hurts accuracy.
Approach
- Let agents directly control their active KV cache without touching the trajectory or re-prefilling: a drop operation excludes selected cache from future attention, and repos adjusts position encodings of retained keys.
- They formalize these operations and identify history dependence as a serving challenge: identical token sequences yield different cache states under different operation sequences, so prefix matching is insufficient for correct cache reuse.
System & results
- The co-designed AKV serving engine exposes a stateless interface compatible with existing serving APIs while internally handling stateful cache reuse, eviction, and restoration.
- A tool-response rolling-drop cache policy improves average benchmark performance.
Paper: arXiv 2610.28577, code available on GitHub.
Related event: Tsinghua and CUHK Propose Cache Engineering to Cut Agent Costs(2 posts)→
More from coding & agent
- Avalon-M1 trains LLM agent organisations via collective-reward RL, lifting avg score 33.5% to 45.7% — RobertTLange · 2026-10-28
- Creator chains Halo and Runway via MCP connectors in GPT for a music video workflow — aziz4ai · 2026-10-28
- Dev uses Qwen in an opencode harness to root an LG TV and strip out spyware — Switchboy1 · 2026-10-28
- Clawifi MCP server cuts agent web-reading tokens by 75%, beats Firecrawl on benchmarks — atakanelik34 · 2026-10-28
- Amazon's EMMA treats multi-agent configs as episodic memory, beating baselines by up to 32.5% — omarsar0 · 2026-10-28
- A 5-minute visual explainer of what happens when you call an LLM API — HowDevelop · 2026-10-28