ACON: Optimizing Context Compression for Long-horizon LLM Agents

Minki Kang, Wei-Ning Chen, Dongge Han, Huseyin A Inan, Lukas Wutschitz, Yanzhi Chen, Robert Sim, Saravan Rajmohan

TL;DR

LLM agents struggle with long-horizon tasks due to ever-growing context, leading to high memory costs and degraded reasoning. ACON tackles this by optimizing context compression through natural language guidelines, reducing token usage by up to 54% while improving task success. It also enables smaller LLMs to perform effectively as agents by distilling optimized compressors.

What Problem Does This Paper Address?

Large Language Models (LLMs) are increasingly used as agents to perform complex tasks in dynamic environments. These tasks often unfold over extended periods, requiring the agent to maintain a detailed history of its actions, observations, and the environment's state. However, this continuous accumulation of information leads to an "unbounded context growth." This presents two major challenges:

  1. Prohibitive Memory Costs: The memory required by transformer-based LLMs scales with context length, making long-horizon reasoning computationally expensive due to the massive KV cache.
  2. Reasoning Degradation: Long contexts can dilute important information with irrelevant details, distracting the LLM and degrading its decision-making quality.

Existing methods for compressing this context often fall short. Some rely on brittle, hand-crafted heuristics, while others require fine-tuning the LLM itself, which is impractical for proprietary or massive models. ACON aims to bridge this gap by offering an effective, model-agnostic compression method.

Methods

ACON introduces a novel framework for optimizing context compression for LLM agents. Its core innovation lies in optimizing compression guidelines in natural language space, rather than directly fine-tuning the LLM's parameters. Here's how it works:

  • Guideline Optimization: ACON uses an LLM as an "optimizer" to refine compression guidelines. This process is driven by failure analysis: the system compares trajectories where the agent succeeds without compression but fails with compression. This contrastive feedback helps the optimizer understand what critical information was lost.
  • Natural Language Feedback: The optimizer receives natural language feedback indicating how the compression guideline should be adjusted to preserve essential information. This feedback is aggregated and used to iteratively refine the prompt.
  • Two-Stage Optimization: ACON employs a two-stage optimization process:
  • Utility Maximization (UT): Focuses on improving task reward by ensuring critical information is retained.
  • Compression Maximization (CO): Further refines the guidelines to reduce context cost, aiming for shorter yet informative summaries.
  • Model-Agnosticism: Because the optimization happens at the prompt level, ACON is model-agnostic and can be applied to any LLM, including proprietary API-based models, without needing access to their weights.
  • Distillation: To further reduce computational overhead, ACON distills the optimized compressor (often a large LLM) into smaller, more efficient models. This allows the smaller model to act as an effective compressor without sacrificing much performance.

Datasets

ACON was evaluated on three challenging benchmarks designed for long-horizon agentic tasks:

  • AppWorld (Trivedi et al., 2024): A simulated environment with nine everyday applications (e.g., Spotify, Venmo, Email) and around 100 simulated users. Tasks involve multi-step interactions and require an average of 42.5 API calls.
  • OfficeBench (Wang et al., 2024b): A benchmark for office automation tasks across applications like Word, Excel, and Email. It tests an agent's ability to coordinate across multiple apps.
  • 8-objective QA (Kwiatkowski et al., 2019; Zhou et al., 2025): A benchmark that requires agents to interact with a search tool to answer eight distinct questions within a single task, demanding complex reasoning and information synthesis.

Key Insights and Ideas

  • Natural Language as a Control Mechanism: The paper demonstrates that natural language prompts can be effectively optimized to control complex LLM behaviors like context compression. This opens up new avenues for fine-tuning LLM agents without direct parameter updates.
  • Failure is Informative: By analyzing why compression leads to failure, ACON gains valuable insights that are more effective than simply optimizing for success. This contrastive approach is key to its success.
  • Smaller Models Can Be Powerful Compressors: Distilling optimized compression guidelines into smaller LLMs is highly effective. This suggests that specialized, smaller models can handle compression efficiently, freeing up larger LLMs for core reasoning tasks.
  • Context Compression as an "Equalizer": ACON's ability to provide concise, informative contexts helps smaller LLM agents perform comparably to larger ones, democratizing access to advanced agentic capabilities.

Key Results

ACON achieved significant improvements across the evaluated benchmarks:

  • Token Reduction: ACON reduced peak token usage by 26-54% compared to baselines.
  • Performance Improvement: Task success improved over existing compression baselines. Notably, smaller LLM agents achieved up to 46% performance improvement by mitigating context distraction.
  • Distillation Efficiency: Distilled compressors retained over 95% of the teacher's accuracy while significantly reducing computational overhead.
  • Model-Agnosticism: ACON demonstrated effectiveness with various LLMs, including GPT-4.1 and GPT-5-chat, and even enabled smaller models like Qwen3-14B to perform on par with larger ones.

Limitations and Future Work

The authors acknowledge several limitations and suggest future directions:

  • Scope of Empirical Evaluation: While ACON is designed to be model-agnostic, the current evaluation primarily focused on GPT models. Further validation on other foundation models (e.g., Gemini, Claude) and massive open-source models would strengthen its generalizability.
  • Real-World Deployability: The current evaluation is on controlled benchmarks. Deploying ACON in real-world, stochastic environments and integrating it into live production systems is a crucial next step.
  • Convergence Guarantees: The natural language optimization process lacks formal convergence guarantees. Future work could explore more principled methods for optimizing this objective.
  • Distillation Gap: A slight performance gap remains between distilled models and their teachers. Increasing the diversity and volume of training data for distillation could potentially close this gap.
  • Latency and Overhead: While ACON reduces memory costs, the compression process itself introduces computational overhead and latency. Developing KV-cache eviction or more optimized compression strategies could further mitigate this.

Summary updated

BibTeX
@inproceedings{kang2026acon,
  author = {Minki Kang and Wei-Ning Chen and Dongge Han and Huseyin A Inan and Lukas Wutschitz and Yanzhi Chen and Robert Sim and Saravan Rajmohan},
  title = {{ACON: Optimizing Context Compression for Long-horizon LLM Agents}},
  booktitle = {International Conference on Machine Learning},
  year = {2026},
  url = {https://openreview.net/forum?id=5EmOOLtH5P},
}
Figure