ACON: Optimizing Context Compression for Long-horizon LLM Agents
Minki Kang, Weining Chen, Han, Dongge, Huseyin A. Inan, Lukas Wutschitz, Yanzhi Chen et al. · 2026 · 211 citationsRead the paper
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.
What the full text shows
Working prototype- Reduced peak token usage across benchmarks while improving task success over existing compression baselines. — 26-54% lower peak tokens (AppWorld, OfficeBench, and Multi-objective QA)
- Improved performance of small LM agents by mitigating context distraction. — up to 46% performance improvement (Long-horizon agentic tasks)
- Reduced peak tokens and dependency compared to no-compression baseline while surpassing it in EM/F1 scores. — 54.5% lower peak tokens and 61.5% lower dependency (8-objective QA benchmark)
- Lowered peak context size while maintaining accuracy above 74%. — nearly 30% lower peak context (OfficeBench)
- Reduced end-to-end API costs but increased wall-clock latency due to additional compressor calls. — Cost reduced from $0.331 to $0.272 (observation compression) (Comparison of No Compression vs ACON)
- Setup
- Evaluated using ReAct agents on AppWorld (9 apps, ~100 users), OfficeBench (6 apps), and 8-objective QA; tested with GPT-4.1, GPT-5-chat, and distilled models like Qwen3-14B and Phi-4.
- How
- ACON iteratively refines natural language compression guidelines based on failure analysis of the agent to optimize observations and history. These optimized guidelines are then distilled into smaller models to reduce computational overhead.
- Limitations
- Empirical evaluation primarily focused on GPT models due to resource constraints. · Introduces additional wall-clock latency due to the extra compressor call.
Summarized by Gemma 4 from the open-access full text · 26 Nov 2026. Read it