Agentic Context Engineering (ACE)
From the publisher’s feed, collected in the ZeroLabs newsroom.
Adding Tactful Determinism to Stochastic LLMs to build reliable agentic systemsThe ACE architecture — Generator, Reflector, Curator, and the Context Playbook — reimagined as a cork board. Inspired by Figure 4 of the ACE paper (Zhang et al.). Image created by the author using ChatGPT.Agentic Context Engineering (ACE) improves LLM systems by evolving their context instead of their weights. Context here is not a summary to be rewritten and compressed, but a playbook that accumulates what the system has learned. Three agents : a Generator, a Reflector, and a Curator — maintain it through small, localized, deterministic edits. This avoids the two failures current methods hit: brevity bias and context collapse, while adapting faster and cheaper. This piece covers why those failures happen, how ACE engineers around them, and what the results show.IntroductionLLMs, and the agents we build on them, have benefited much from their inherent stochastic nature — the same stochasticity we’ve used to generate immense amounts of data. But to build systems that run reliably, determinism needs to be re-added, so the system holds the right information for the task. Two issues push us there: duration, when systems struggle to keep the right context over long runs, and granularity, where domain-specific nuances get thrown away into summaries. Respectably referred to as brevity bias and context collapse. Agentic Context Engineering (ACE)’s answer isn’t one revolutionary idea — it’s a lot of simple ideas engineered right where things break, adding determinism in three ways:I. Three agents that each do one job; generator, reflector and curator respectivelyII. A revolving playbook that accumulates context instead of compacting itIII. A grow-and-refine step that keeps it in check as it grows.Adding the right amount of determinism is how you make agents work better — and that’s Agentic Context Engineering.Context adaptation, and where it starts to breakLLMs, and the agentic systems built on them, have increasingly come to rely on context adaptation : modifying the input to the LLM rather than modifying the weights of the LLM. This has numerous benefits: it’s cheaper, multiple models can work off the same context, new knowledge can be added at runtime, and context can be shared across models and modules.Context adaptation leverages natural language feedback, where the model generates reasoning trajectories, execution traces, or validation steps. These are then evaluated, and the assessment guides how the context should be revised.Several research efforts put this to work:Reflexion — reflects on failures to improve agentic planning.TextGrad — optimizes prompts through textual feedback, a gradient-like signal expressed in words.GEPA — iteratively refines prompts based on execution traces.Dynamic Cheatsheet — builds an external memory of strategies and lessons from past successes and failures, reused at inference time.What ties these together is that each one uses natural language feedback to decide how to move ahead — Reflexion reads its own failures, TextGrad pushes a gradient-like signal back onto the prompt, GEPA iteratively optimizes the prompt, and Dynamic Cheatsheet accumulates strategies from successes and failures. Each is reflecting on what happened and folding that back into the context.However, these methods struggle in two specific areas: longer-horizon tasks involving multi-turn reasoning, and domain-specific work that demand intensive, rich knowledge. All of the above methods fall short when you need reliable access to the right context at the right time.These break down in two specific ways: brevity bias and context collapse.Brevity bias: the cost of staying shortBrevity bias is the tendency of prompt optimization methods to push context toward shorter, compact, generic summaries.The issue this causes is that these iterative methods produce nearly identical prompts, and because of this convergence, there’s no diversity left in what they generate. And by creating these summaries, the domain-specific nuances and terminology get lost — traded away for summaries. There’s another problem too: because you’re iterating from the original prompt, it’s also sometimes going it propagates the reflective errors that were in the seed itself. Whenever a task needs context-rich guidance — multi-step agents, program synthesis, or knowledge-intensive reasoning — brevity bias emerges.GEPA exhibits this: a single agent produces the reasoning trajectories, identifies what went wrong, and rewrites the prompt. Across multiple iterations, important domain-specific detail can slip away through constant summarization. Each rewrite builds on the previous summary rather than the original, so once a detail is gone, later passes can’t recover it — and that is brevity bias.GEPA (Agrawal et al., 2025) reflects on execution traces, proposes new prompt variants, and maintains a Pareto frontier of high-performing prompts. Because the objective favours brevity, iterations converge on short, generic prompts that shed domain detail. Diagram built with Claude; GEPA described in §4.2 of the ACE paper.The monolithic rewriting of prompts breaks down for long-horizon or domain-specific work.Context collapse: the price of the full rewriteContext collapse is the tendency of an LLM, over repeated rewrites, to compress its own context into much shorter, less informative summaries — and that dramatic loss of information is the collapse itself.As the model rewrites its own prompt, new information comes in that may conflict with what’s already there. One way to picture it: the attention mechanism can’t effectively hold all of it, causing “context anxiety” resulting in the token count to suddenly drop. This can be seen in the image below where the context held a large number of tokens, and suddenly both tokens and accuracy fell off a cliff. As the adaptation steps increase, this monolithic rewriting is what triggers the loss.Context collapse: at step 60 the context held 18,282 tokens at 66.7 accuracy; one step later it collapsed to 122 tokens and 57.1 — below the 63.7 baseline with no adaptation at all. Figure 2, ACE (Zhang et al., arXiv:2510.04618).The obvious first conclusion is that memory needs to be externalized. But this example is actually Dynamic Cheatsheet — a method where memory is already externalized. Externalizing memory can’t be the whole answer, then, because the memory is external here and it still collapses. What becomes clear instead is that the monolithic rewriting of the prompt is the real culprit — that’s what destroys the information, especially domain-specific information, across iterations.These are the exact problems ACE sets out to fix.ACE: context as an evolving playbookACE — Agentic Context Engineering — is a framework for scalable and efficient context adaptation, in both offline settings (system prompts that guide downstream tasks) and online settings (test-time memory that evolves the playbook).Its core move is to change how context is even defined. Instead of treating it as a summary to be rewritten and compressed, ACE treats it as an evolving playbook — a structured, itemized collection of what’s been learned, that accumulates over time rather than being flattened.Context accumulation rather than context compaction.ACE builds on the agentic design of Dynamic Cheatsheet — a persistent external memory that accumulates strategies from past successes and failures. But where Dynamic Cheatsheet leans on essentially one model to both reflect and curate, ACE goes further and splits that work apart.The paper’s author’s frame ACE’s contribution as three key innovations:A dedicated Reflector, incremental delta updates, and a grow-and-refine mechanism.The way the article is structured is a little different — as three places where ACE puts determinism back into a stochastic system: fixing who acts, how the context is written, and how it is kept in shape. That is the lens this article takes from here.The ACE framework: a Generator produces reasoning trajectories, a Reflector distills insights, a Curator turns them into delta context items merged by non-LLM logic. Localized edits, never a full rewrite. Figure 4, ACE paper.The context playbook — the hero pieceEverything ACE does, is to one object: the playbook. Each entry is a bullet, and each bullet holds two things. First, metadata — a unique identifier, and counters tracking how often it was marked helpful or harmful. Second, content — a small, reusable unit: a strategy, a domain concept, or a common failure mode.That metadata is what makes the playbook self-correcting. When the Generator is solving a problem, it flags which bullets were helpful and which were harmful, and that feedback is what guides the Reflector in proposing updates. So the playbook doesn’t just accumulate — it accumulates a record of what has actually worked.What ACE accumulates on AppWorld: strategies and hard rules, reusable code, troubleshooting entries — each an itemised bullet with its own identifier. This is what the delta updates write into. Figure 3, ACE paper.Deterministic Roles : Division of laborThe first is who does the work. Rather than a single model that produces the reasoning trajectories, evaluates its own trajectory, and then curates what matters — where it all blurs together in the episodic memory of one model — ACE gives each agent exactly one job.Those roles are the Generator, the Reflector, and the Curator. The Generator produces the reasoning trajectories. The Reflector does nothing but reflect on those trajectories and extract insight from them. The Curator does nothing but turn that insight into updates. Separating evaluation and insight-extraction from curation is a deliberate design choice — and, as the results show, it is part of why ACE performs better.Deterministic Writes : Delta updatesThe second is how the context is written. Instead of rewriting the whole prompt, ACE makes localized delta updates, storing what was helpful or not for each bullet. These delta entries are merged deterministically, by simple non-LLM logic, rather than by an LLM.This is what closes the loop on context collapse: no LLM ever rewrites the entire playbook, so there is no step where the context can be compressed away. Because the updates are itemized and localized, multiple deltas can be merged in parallel — enabling batched adaptation at scale, and multi-epoch adaptation where the same queries are revisited to strengthen the context. Dropping the expensive full rewrite also lowers cost and latency.Deterministic Upkeep : Grow-and-refineThe third is how the playbook is kept from bloating. Even as the context grows, ACE doesn’t rewrite it or keep summarizing it. It uses a grow-and-refine mechanism that balances steady expansion with redundancy control: new bullets are appended with new identifiers, existing bullets are updated in place as their helpful/harmful counters increment, and a de-duplication step compares bullets by their semantic embeddings and prunes redundancy.Depending on the accuracy and latency needs of the system, this refinement can happen actively — after each delta — or lazily, only when the context window is exceeded. Either way, the effect is the same: it removes the variance that monolithic context rewriting introduces, and keeps the playbook compact without ever compressing detail away.Why it works — Tactful DeterminismThis design enables three properties:Localization — only the relevant bullets get updated, which is what avoids context collapse.Fine-grained retrieval — the Generator can focus on the most pertinent knowledge, so it gets the right information for domain-specific tasks.Incremental adaptation — merging, pruning, and de-duplication can all happen efficiently at inference time.The secret sauce implicitly underlying ACE’s success is tactful determinism: a modular structure of three specific roles instead of one agent doing everything; localized edits instead of constant rewriting; and context growth stored as itemized bullets that are merged and kept compact deterministically.Tactful being key, determinism isn’t sprinkled everywhere — it’s placed exactly where free-form rewriting did the damage, while the model keeps the one thing it’s genuinely good at: reasoning about what went wrong. The paper argues this mirrors how humans actually learn — experiment, reflect, consolidate.The evidence: better, faster, cheaperACE was tested on two families of tasks, chosen because they’re exactly where rich accumulated context should pay off: AppWorld, where an agent acts inside a live world of apps, and domain-specific finance — FiNER (tagging) and Formula (numerical reasoning).On agents : ACE beat the baselines by about 10.6% on average, and by up to 17.1% on AppWorld — from execution feedback alone, no labels. The moment that matters: on the open-source DeepSeek-V3.1, ReAct plus ACE hit 59.4%, matching IBM’s GPT-4.1 CUGA at 60.3%, and beating it on the harder test-challenge split. A smaller open model, nothing but a well-maintained context, drawing level with a frontier production system.ReAct + ACE gains +17.0 average offline and +17.1 online, the latter without ground-truth labels. At 59.4% it comes level with IBM CUGA (60.3%) and surpasses it on test-challenge, using the smaller open-source DeepSeek-V3.1. Left: Table 1. Right: Figure 5, the AppWorld leaderboard snapshot of 20 Sept 2025 (Appendix C). Assembled in Claude Design.On domains : On finance it gained about 8.6%, with Formula jumping from 67.5 to 85.5 — the playbook holding onto real procedures a short prompt can’t. It's not finance-specific either: big gains on medical reasoning (DDXPlus) and text-to-SQL (BIRD-SQL) show the approach transfers.ACE gains +12.8 over the base LLM offline with labels. The caveat is the paper’s own: without reliable feedback, both ACE and Dynamic Cheatsheet can degrade — adaptation depends critically on feedback quality. Table 2, ACE paper. Rebuilt in Claude Design.Why the gains are real : The ablation is where “it works” becomes “here’s why.” Remove incremental delta updates — go back to wholesale rewriting — and performance drops by roughly 12 points on TGC and 28 on SGC. That one choice, localized edits over monolithic rewrites, is most of the gain. Also, ACE isn’t sensitive to hyper-parameters — across reasonable ranges, performance barely moves. The simple ideas are doing the work, without fussy tuning.Ablation on AppWorld: no component is decorative. Removing the Reflector and multi-epoch refinement drops the average from 59.4 to 55.1 — over a quarter of ACE’s gain over bare ReAct. Table 3, ACE paper. Rebuilt in Claude Design.Cost and speed. This is what actually matters in practice. ACE wins on both while being more accurate: about 82% lower latency than GEPA offline; 91% lower latency and 84% lower token cost than Dynamic Cheatsheet online — roughly 87% lower adaptation latency on average. If you think the cost of an ever increasing playbook will become untenable fear not: KV-cache reuse means most of it is served from cache, so length doesn't scale linearly into cost.Adaptation cost against the strongest baseline in each setting: −82.3% latency and −75.1% rollouts offline against GEPA; −91.5% latency and −83.6% token cost online against Dynamic Cheatsheet. Table 4, ACE paper. Rebuilt in Claude Design.Put together, the takeaway is architectural. ACE wins offline and online, with and without labels, on the hard split, across model families — cheaper and faster too. Not from a bigger model, but from the design: split the roles, edit locally, leveraging a dash of tactful determinism.Limitations of ACEACE isn’t always the answer. When a task turns on a single fixed rule (Game-of-24) or is better served by one concise, high-level instruction (HotPotQA), a growing playbook is just overhead — you’re paying for detail the task doesn’t need. It earns its keep only where success depends on accumulated domain knowledge, complex tool use, or environment-specific strategy — which, not coincidentally, is exactly where the other methods fell short.ReferencesThe paper this article is aboutACE — Agentic Context Engineering: Evolving Contexts for Self-Improving Language Models. Qizheng Zhang, Changran Hu, et al. ICLR 2026. arxiv.org/abs/2510.04618 · Code: github.com/ace-agent/aceThe lineage — context adaptation methods discussedReflexion: Language Agents with Verbal Reinforcement Learning. Noah Shinn, et al. NeurIPS 2023. arxiv.org/abs/2303.11366TextGrad: Automatic “Differentiation” via Text. Mert Yuksekgonul, et al. 2024. arxiv.org/abs/2406.07496GEPA: Reflective Prompt Evolution Can Outperform Reinforcement Learning. Lakshya A. Agrawal, et al. ICLR 2026. arxiv.org/abs/2507.19457Dynamic Cheatsheet: Test-Time Learning with Adaptive Memory. Mirac Suzgun, et al. EACL 2026. arxiv.org/abs/2504.07952The benchmarksAppWorld: A Controllable World of Apps and People for Benchmarking Interactive Coding Agents. Harsh Trivedi, et al. ACL 2024. arxiv.org/abs/2407.18901 · appworld.devFiNER-139: Financial Numeric Entity Recognition for XBRL Tagging. Lefteris Loukas, et al. ACL 2022. arxiv.org/abs/2203.06482Agentic Context Engineering (ACE) was originally published in Towards AI on Medium, where people are continuing the conversation by highlighting and responding to this story.