Large language model (LLM) applications, such as autonomous agents and domain-specific reasoning tools, increasingly rely on context adaptation. This involves modifying inputs with instructions, strategies, or evidence rather than retraining the model's weights.
However, current context adaptation methods often fall short. Agentic Context Engineering (ACE) is a new framework that turns LLM contexts into evolving "playbooks" rather than static prompts. By using a modular system of generation, reflection, and incremental updates, ACE avoids common pitfalls, outperforms top-tier production agents, and slashes adaptation costs by over 80%.
The Problem: Brevity Bias and Context Collapse
Most prompt optimization techniques suffer from two major issues:
- Brevity Bias: Prompt optimizers often prioritize conciseness. In doing so, they accidentally strip away nuanced domain heuristics or "edge case" logic that agents actually need to succeed in complex environments.
- Context Collapse: When an LLM is asked to iteratively rewrite its own context or memory, it tends to over-summarize. Over time, detailed knowledge is compressed away, leading to sharp performance drops as the context becomes a hollow shell of its former self.
While humans benefit from concise summaries, LLMs actually perform better with "saturated" contexts—long, detailed, and structured playbooks of strategies.
The ACE Framework
ACE introduces a structured "division of labor" through three specialized agentic roles to build and maintain these playbooks:
- The Generator: Executes tasks and produces reasoning trajectories.
- The Reflector: Critiques these trajectories to extract concrete lessons from both successes and failures.
- The Curator: Synthesizes these lessons into incremental delta updates.
Unlike previous methods that rewrite the entire prompt from scratch (monolithic rewriting), ACE treats the context as a collection of itemized bullets. The Curator only adds or updates specific bullets using a "grow-and-refine" principle.
This modular approach allows for localization (only relevant parts of the playbook are updated), parallelism (multiple insights can be merged simultaneously), and redundancy control (a de-duplication step ensures the playbook stays clean as it grows).
Key Insights
- More is More (for LLMs): While standard prompt engineering preaches conciseness, ACE shows that LLMs thrive on detail. Preserving specific strategies is more effective than distilling them into high-level instructions.
- Execution Feedback > Labeled Data: ACE can self-improve using natural execution feedback (e.g., checking if code ran or if an API returned an error) rather than requiring expensive human-labeled ground truth.
- Delta Updates Stop the Bleeding: By moving to itemized updates, ACE effectively cures context collapse. The model can no longer accidentally delete thousands of tokens of knowledge in a single bad rewrite.
- Efficiency through KV Caching: Because ACE uses incremental updates, it is highly compatible with KV (Key-Value) cache reuse. Even though the contexts are longer, the actual billed cost and latency are significantly lower because the system doesn't have to re-process the entire prompt every time.
Key Results
The researchers evaluated ACE across several demanding benchmarks, including AppWorld (complex agent APIs), FiNER & Formula (financial analysis), DDXPlus (medical reasoning), and BIRD-SQL (text-to-SQL).
- Superior Performance: ACE achieved an average gain of +10.6% on agent tasks and +8.6% on financial benchmarks over strong baselines like GEPA and In-Context Learning (ICL).
- Leaderboard Success: On the AppWorld leaderboard, ACE (using the open-source DeepSeek-V3.1) matched or surpassed the top-ranked production agent, IBM-CUGA (which uses GPT-4), particularly on the most difficult "challenge" tasks.
- Massive Cost/Speed Gains: Compared to GEPA, ACE reduced adaptation latency by 82.3% and the number of required rollouts by 75.1%. In online settings, it reduced token costs by 83.6%.
- Robustness: ACE remained effective even when using weaker models for the Reflector role, showing the framework's design is more important than raw model size.
Limitations and Future Work
ACE still relies on a reasonably strong model to act as the Reflector; if the model cannot extract meaningful insights from a trajectory, the playbook won't improve. Additionally, simple tasks might find the overhead of ACE redundant.
Future directions include exploring selective unlearning—removing outdated or privacy-sensitive information from the playbook—and further optimizing the grow-and-refine logic for even longer-horizon tasks.
Summary updated