ACON: Optimizing Context Compression for Long-horizon LLM Agents
Minki Kang, Wei-Ning Chen, Dongge Han, Huseyin Inan, Lukas Wutschitz, Yanzhi Chen, Robert A Sim, Saravanakumar Rajmohan
Abstract
Large language models (LLMs) are increasingly deployed as agents in dynamic real-world environments, where success depends on maintaining precise records of actions and observations. However, the resulting unbounded context growth in long-horizon agentic tasks makes two critical bottlenecks: prohibitive inference memory costs and reasoning degradation due to irrelevant information. Existing compression methods fail to fully address this, often relying on brittle heuristics or requiring parameter updates impractical for proprietary or large-scale LLMs. We introduce Agent Context Optimization (ACON), a unified framework that optimally compresses both observations and history into concise, informative representations. Distinct from prior works, ACON employs an optimization in natural language space: it iteratively refines compression guidelines based on failure analysis of the agent, ensuring critical state information is preserved without model fine-tuning. To further minimize computational overhead, we distill the optimized compressor into smaller models. Experiments on AppWorld, OfficeBench, and Multi-objective QA demonstrate that ACON reduces peak token usage by 26–54% while improving task success over existing compression baselines. Notably, it enables smaller LMs to function effectively as long-horizon agents, achieving up to 46% performance improvement by mitigating context distraction. Our code is available at https://github.com/microsoft/acon.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext b1a27f1c-d2a9-4041-9a56-8f07896bb78aCited by top-tier papers9
- DeepAgent: A General Reasoning Agent with Scalable ToolsetsXiaoxi Li, Wenxiang Jiao, Jiarui Jin, Guanting Dong et al.WWW 2026 · 38 citations
- Meta Context Engineering via Agentic Skill EvolutionHaoran Ye, Xuning He, Vincent Arak, Haonan Dong et al.ICML 2026 · 30 citations
- AgentOCR: Reimagining Agent History via Optical Self-CompressionLang Feng, Fuchao Yang, Feng Chen, Xin Cheng et al.ACL 2026 · 17 citations
- EvoDS: Self-Evolving Autonomous Data Science Agent with Skill Learning and Context ManagementZherui Yang, Fan Liu, Yansong Ning, Hao LiuKDD 2026 · 3 citations
- PRInTS: Reward Modeling for Long-Horizon Information SeekingJaewoo Lee, Archiki Prasad, Justin Chih-Yao Chen, Zaid Khan et al.ACL 2026 · 3 citations
Builds on23
- SWE-bench: Can Language Models Resolve Real-world Github Issues?Carlos E. Jimenez, John Yang, Alexander Wettig, Shunyu Yao et al.ICLR 2024 · 2,082 citations
- SWE-agent: Agent-Computer Interfaces Enable Automated Software EngineeringJohn Yang, Carlos E. Jimenez, Alexander Wettig, Kilian Lieret et al.NeurIPS 2024 · 2,059 citations
- WebArena: A Realistic Web Environment for Building Autonomous AgentsShuyan Zhou, Frank F. Xu, Hao Zhu, Xuhui Zhou et al.ICLR 2024 · 1,197 citations
- A-Mem: Agentic Memory for LLM AgentsWujiang Xu, Zujie Liang, Kai Mei, Hang Gao et al.NeurIPS 2025 · 1,138 citations
- Large Language Models Can Be Easily Distracted by Irrelevant ContextFreda Shi, Xinyun Chen, Kanishka Misra, Nathan Scales et al.ICML 2023 · 970 citations
Related papers
- Beyond the Context Window: Scaling Agentic RL via End-to-end Optimized Context CompressionMiao Lu, Weiwei Sun, Weihua Du, Zhan Ling et al.ACL 2026
- LightThinker: Thinking Step-by-Step CompressionJintian Zhang, Yuqi Zhu, Mengshu Sun, Yujie Luo et al.EMNLP 2025 · 2 citations
- PACE: Predictive Adaptive Context Extraction for Long-Horizon LLM AgentsLei Wei, Xiao Peng, TT, Guannan Zhang et al.ACL 2026
- Attn-GS: Attention-Guided Context Compression for Efficient Personalized LLMsShenglai Zeng, Tianqi Zheng, Chuan Tian, Dante Everaert et al.ACL 2026 · 1 citation
- GMSA: Enhancing Context Compression via Group Merging and Layer Semantic AlignmentJiwei Tang, Zhicheng Zhang, Shunlong Wu, Jingheng Ye et al.ACL 2026 · 24 citations
