cd /news/artificial-intelligence/agentic-context-engineering-ace · home topics artificial-intelligence article
[ARTICLE · art-110935] src=pub.towardsai.net ↗ pub= topic=artificial-intelligence verified=true sentiment=· neutral

Agentic Context Engineering (ACE)

Agentic Context Engineering (ACE) improves LLM systems by evolving their context instead of their weights, using three agents—Generator, Reflector, and Curator—to maintain a playbook through small, deterministic edits. ACE addresses brevity bias and context collapse, which cause failures in longer-horizon tasks and domain-specific work, by accumulating context rather than compacting it. The approach adapts faster and cheaper than current methods like Reflexion, TextGrad, GEPA, and Dynamic Cheatsheet.

read10 min views1 publishedAug 25, 2026

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.

LLMs, 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 respectively

II. A revolving playbook that accumulates context instead of compacting it

III. 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.

LLMs, 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:

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 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.

The monolithic rewriting of prompts breaks down for long-horizon or domain-specific work.

Context 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.

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 — 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.

Everything 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.

The 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.

The 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.

The 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.

This design enables three properties:

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.

ACE 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.

** 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.

** 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.

** 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.

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.

ACE 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.

The paper this article is about

The lineage — context adaptation methods discussed

The benchmarks

Agentic Context Engineering (ACE) was originally published in Towards AI on Medium, where people are continuing the conversation by highlighting and responding to this story.

── more in #artificial-intelligence 4 stories · sorted by recency
── more on @agentic context engineering 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/agentic-context-engi…] indexed:0 read:10min 2026-08-25 ·