TokenPilot: Cache-Efficient Context Management for LLM Agents
On the map: LLM agents and tool use → Software engineering coding agents
Abstract (arXiv)
As LLM agents are deployed in long-horizon sessions, context accumulation drives up inference costs. Existing approaches utilize text pruning or dynamic memory eviction to minimize token footprints; however, their unconstrained sequence mutations alter layouts, introducing prefix mismatches and cache invalidation. This reveals a critical trade-off between text sparsity and prompt cache continuity. To address this, we present TokenPilot, a dual-granularity context management framework. Globally, Ingestion-Aware Compaction acts as a framework harness to stabilize prompt prefixes and eliminate open-world environmental noise at the ingestion gate. Locally, Lifecycle-Aware Eviction monitors the ongoing residual utility of context segments, enforcing a conservative batch-turn schedule to offload content segments only when task relevance expires. Experiments on PinchBench and Claw-Eval under both isolated and continuous modes demonstrate that TokenPilot reduces costs by 61% and 56% in isolated mode, and 61% and 87% in continuous mode, while maintaining competitive performance compared to prior systems. TokenPilot has been integrated into LightRSI at https://github.com/zjunlp/RSI.
Key facts. Cited by 3 papers in the map (data through 14 Oct 2026). Placed in Software engineering coding agents, one of 16 directions in LLM agents and tool use. Builds on 28 of its 48 references that are in the map. First posted on arXiv 15 Jun 2026.
Builds on
28 of 48 references.
Closest ancestors · 2
Same direction, newest first
- 2025Context as a Tool: Context Management for Long-Horizon SWE-Agents26 Dec
- 2025KVCOMM: Online Cross-context KV-cache Communication for Efficient LLM-based Multi-agent Systems14 Oct
Other references · 26
- 2023MemGPT: Towards LLMs as Operating Systemscited by 1,389
- 2025Mem0: Building Production-Ready AI Agents with Scalable Long-Term Memorycited by 779
- 2026Terminal-Bench: Benchmarking Agents on Hard, Realistic Tasks in Command Line Interfacescited by 585
- 2025Zep: A Temporal Knowledge Graph Architecture for Agent Memorycited by 400
- 2025Memory in the Age of AI Agentscited by 303
- 2025LightMem: Lightweight and Efficient Memory-Augmented Generationcited by 180
- 2025Memory OS of AI Agentcited by 150
- 2025Scaling Long-Horizon LLM Agent via Context-Foldingcited by 148
- 2025ReSum: Unlocking Long-Horizon Search Intelligence via Context Summarizationcited by 141
- 2025MemOS: A Memory OS for AI Systemcited by 138
- 2025A Survey of Context Engineering for Large Language Modelscited by 126
- 2025AgentFold: Long-Horizon Web Agents with Proactive Context Managementcited by 103
14 more
- 2025The Tool Decathlon: Benchmarking Language Agents for Diverse, Realistic, and Long-Horizon Task Executioncited by 85
- 2026Claw-Eval: Towards Trustworthy Evaluation of Autonomous Agentscited by 64
- 2026EverMemOS: A Self-Organizing Memory Operating System for Structured Long-Horizon Reasoningcited by 54
- 2025Token Reduction Should Go Beyond Efficiency in Generative Models -- From Vision, Language to Multimodalitycited by 50
- 2025LEGOMem: Modular Procedural Memory for Multi-agent LLM Systems for Workflow Automationcited by 40
- 2025RCR-Router: Efficient Role-Aware Context Routing for Multi-Agent LLM Systems with Structured Memorycited by 27
- 2026StructMem: Structured Memory for Long-Horizon Behavior in LLMscited by 18
- 2026ContextBudget: Budget-Aware Context Management for Long-Horizon Search Agentscited by 14
- 2026StackPlanner: A Centralized Hierarchical Multi-Agent System with Task-Experience Memory Managementcited by 13
- 2026MemoBrain: Executive Memory as an Agentic Brain for Reasoningcited by 13
- 2026Compressing Code Context for LLM-based Issue Resolutioncited by 12
- 2026AgentSwing: Adaptive Parallel Context Management Routing for Long-Horizon Web Agentscited by 9
- 2026The Missing Memory Hierarchy: Demand Paging for LLM Context Windowscited by 8
- 2026Rethinking Memory as Continuously Evolving Connectivitycited by 1
Built on by
Citing papers per year: 2026: 3.
3 papers.
Similar, not cited
Close in wording, no citation either way
- 2026MemDecay: Region-Aware KV Cache Eviction for Efficient LLM Agent Inference
- 2026Beyond Compaction: Structured Context Eviction for Long-Horizon Agents
- 2026ContextPipe: Database-Inspired Context Assembly for Long-Horizon Agents
- 2026Compact-Memory LLM Agents via Online Max-Member Clustering and Atom-Aware Packing
- 2026Akashic: A Low-Overhead LLM Inference Service with MemAttention
- 2025Agentic Plan Caching: Test-Time Memory for Fast and Cost-Efficient LLM Agents
- 2026Persistent Context Graphs for Efficient Memory Compaction in LLM Agents
- 2026SimpleMem: Efficient Lifelong Memory for LLM Agents