ACM: Agentic Context Management for Long Horizon Tasks
Xiaochuan Li, Ryan Ming, Meng Chu, Shuai Shao, Rong Jin, Chenyan Xiong
Abstract
Agentic tasks are inherently long-horizon and multi-turn, constantly accumulating context through interactions with the environment. Existing context compression methods inevitably incur information loss and are triggered by rigid heuristic rules, leaving them misaligned with the agent's evolving reasoning focus. We propose Agentic Context Management (ACM), a framework that equips agents with purpose-built context editing tools for lossless context management. Inspired by the interaction between short-term and long-term human memory, the agent autonomously decides when to compress its context, offloads discarded content to an external memory system, and queries it on demand for later retrieval. Building on this framework, we further develop a post-training pipeline that constructs high-quality demonstrations of context management and improves model performance on both agentic search and coding tasks. Further analysis reveals that effective context management reduces peak token pressure, enables extended explorations, and yields more consistent solutions across independent trials. Code, data, and model checkpoints are available at https://github.com/lixiaochuan2020/agentic-context-management.
Create a lesson
Related papers
EvoLink-Bench: A Benchmark for Evaluating Self-Evolving Agents in Long-Horizon Interdependent Task Streams
Shared title terminologycs.AIWei Chen, Xiaodong Lu, Weihao Shen et al.
ExpGuard: Guarding Long-Horizon LLM Agents against Corrupted Experience
Shared title terminologycs.AIYuzhou Chen, Licheng Pan, Zhixuan Chu et al.
Matryoshka Agent: Unfolding Sub-Agents for Long-Horizon Machine Learning Engineering
Shared title terminologycs.AIRushi Qiang, Changhao Li, Haotian Sun et al.
Addressable Recall Compaction for Long Context-Window Control in AI Agents
Shared title terminologycs.AIThang Dang, Yuma Ichikawa, Sakina Fatima et al.
EgoUseBench: Benchmarking Computer-Use Agents under Evolving First-Person Contexts
Shared title terminologycs.AIYurun Chen, Biao Yi, Qihang Yu et al.
PROVE: Mitigating Long-Horizon LLM Collusion with Reinforcement Learning from Verified Evidence
Shared title terminologycs.AIHaochen Luo, Jie Fu, Mukai Li et al.