AI agent context and memory engineering techniques
TECH

AI agent context and memory engineering techniques

27+
Signals

Strategic Overview

  • 01.
    Anthropic's Applied AI team formalized three techniques for combating context pollution in long-running agents - compaction, structured note-taking, and sub-agent architectures - and shipped a beta context editing API plus a memory tool on the Claude API on September 29, 2025.
  • 02.
    An internal Anthropic benchmark reported that combining context editing with the memory tool cut token usage by 84 percent on long-running tasks, with a separate report of a 39 percent performance improvement on a 100-turn task.
  • 03.
    ACE, an ICLR 2026 paper from Stanford, SambaNova and UC Berkeley, treats agent context as an evolving playbook and boosts AppWorld benchmark accuracy by up to 17.1 percent, letting an open-source model match a proprietary GPT-4.1-based agent on the leaderboard.
  • 04.
    IBM Research's ALTK-Evolve, released April 8, 2026, raises AppWorld aggregate accuracy from 50.0 percent to 58.9 percent using a guideline library with a background consolidation job, with the biggest gain concentrated on hard multi-step tasks.

Compaction Preserves the Rot: Why Anthropic's Own Techniques Disagree

Anthropic's Applied AI team formalized three techniques for combating context pollution in long-running agents: compaction, which summarizes a conversation nearing its window limit and reinitiates a new window with that summary; structured note-taking, which writes persistent notes outside the context window that can be reloaded later; and sub-agent architectures, which delegate focused tasks to specialized agents that return clean summaries [1]. The team backed the framework with matching product the same day, September 29, 2025, shipping a beta context editing API and a memory tool on the Claude API [2], with the combination cutting token usage by 84 percent on long-running tasks, and a separate report of a 39 percent performance improvement on a 100-turn task [3].

But Anthropic's own workshop material complicates its tidy taxonomy: the Applied AI team's own presentation on building agents that run for hours states plainly that compaction alone does not cure coherence drift, and that structured handoffs between phases or sub-agents matter more than compression itself. That concession lines up closely with a contrarian critique circulating in the Claude Code community's five-part 'SCRUB' framework, which treats compaction with suspicion because a compressed summary preserves errors as faithfully as it preserves facts - the model doesn't compact away being wrong, just being verbose. The practical response power users describe is to disable auto-compaction, spawn sub-agents for isolation, cut or rewind proactively, and treat compaction as a last resort rather than a default. Chroma's Context Rot research supplies the empirical backbone for why any of this matters: across 18 frontier models spanning GPT-4.1, Claude 4, Gemini 2.5 and Qwen3, output reliability degrades well before the stated context window fills up, meaning teams that watch only for hard overflow errors are missing the dominant failure mode [4].

The ACE vs ALTK-Evolve Race: One Evolving Playbook vs a Curated Library

ACE (Agentic Context Engineering), an ICLR 2026 paper from Stanford, SambaNova and UC Berkeley researchers, rejects compression as the goal altogether: it treats an agent's context as an evolving 'playbook' refined through cycles of generation, reflection and curation rather than squeezed into terse summaries [5]. The payoff is not just accuracy but model economics - the technique boosts AppWorld agent-benchmark accuracy by up to 17.1 percent, enough for a smaller open-source model, DeepSeek-V3.1, to match the top-ranked proprietary agent on the leaderboard, IBM CUGA running GPT-4.1, without retraining a single weight [5]. Broader results claim gains of 10.6 percent on agentic benchmarks and 8.6 percent on domain-specific benchmarks, alongside an 86.9 percent cut in adaptation latency versus baselines [5].

IBM Research's answer, published roughly six months later on April 8, 2026, takes a different mechanism toward a similar goal. ALTK-Evolve, part of IBM's Agent Lifecycle Toolkit, stores guidelines learned from past agent trajectories in a library and runs a background consolidate-and-score job that merges duplicates, prunes weak rules and promotes proven strategies [6]. Rather than one evolving document, ALTK-Evolve builds a library of discrete, retrievable entities - guidelines, policies, standard operating procedures - queried per task. Its AppWorld numbers move aggregate accuracy from 50.0 percent to 58.9 percent, but the more interesting number is where the gain concentrates: hard multi-step tasks jump from 19.1 percent to 33.3 percent, a 74 percent relative increase, versus a much smaller lift on easy tasks [6]. Both systems chase the same benchmark and land in a similar neighborhood of gains, but the design philosophies diverge - ACE bets on a single continuously-refined document doing double duty as memory and reasoning scaffold, IBM bets on a curated, prunable library assembled by a separate consolidation process.

The Vendor-Practitioner Gap: What Power Users Do Differently From the Official Playbook

Andrej Karpathy's framing of context engineering as 'the delicate art and science of filling the context window with just the right information for the next step' [7]has become the industry's shared vocabulary. But what practitioners do under that vocabulary increasingly departs from vendor guidance. Independent developer accounts argue that Claude Code's built-in auto-compaction undercuts serious work compared to 'intentional compaction' - a manually-directed alternative to automatic compaction - and describe keeping context utilization under 40 percent through a strict research-then-plan-then-implement workflow. The same accounts report shipping a one-shot pull request into a 300,000-line Rust codebase and 35,000 lines of code in a single seven-hour session under that discipline.

Reddit's Claude Code community has converged on a similar contrarian stance, codified as SCRUB (Subagents, Cut/rewind, Reduce/compact, Upload/handoff, Burn/clear), which explicitly deprioritizes reactive compaction in favor of proactive subagent-spawning and manual rewinding, on the theory that compaction preserves whatever is already wrong in a conversation. A separate thread frames the debate over memory architecture - graph-based versus vector-database approaches - as beside the point, arguing the curation policy governing what gets written and forgotten matters more than whichever storage substrate is chosen. That critique sits awkwardly next to Anthropic's own memory tool, which is explicit about writing notes to files but comparatively quiet on how an agent should decide what's worth keeping versus discarding [8]. A separate account of giving a fleet of Claude agents shared memory found that the more talkative configuration, which shared state most aggressively, made noticeably more API calls than the version that ultimately produced the better output - a blunt illustration that more memory sharing is not automatically better memory sharing.

Why Now: Context Rot Supplies the Empirical Case Behind the Trend

The urgency behind this cluster of techniques traces to a single empirical finding: Chroma's Context Rot study, which stress-tested 18 frontier models including GPT-4.1, Claude 4, Gemini 2.5 and Qwen3, found that every one of them grows less reliable as input length increases, even on simple tasks, and well before hitting the model's advertised context-window ceiling [4]. That reframes context management as a distinct engineering problem from context overflow - a team watching only for token-limit errors will miss the more common failure mode of a model quietly getting worse as its input grows.

Two separate academic threads supply structural responses to that finding rather than just compression tricks. Plan-and-Act, an ICML 2025 paper from UC Berkeley and the University of Tokyo, splits agent cognition into a Planner model producing high-level plans and an Executor model translating those plans into environment-specific actions, keeping each model's context scoped to its own job rather than accumulating both planning and execution history in one window [9]. The approach reached a state-of-the-art 57.58 percent success rate on WebArena-Lite and 81.36 percent on the text-only WebVoyager benchmark for long-horizon web navigation [9]. Combined with the rising per-request cost of long multi-turn sessions accumulating tool-call and observation tokens, the Context Rot findings give the entire context-engineering trend a harder justification than developer convenience: reliability itself is at stake once an agent runs long enough for its own history to become the primary source of error [3].

Historical Context

2025-06
Popularized the term context engineering on social media as the successor discipline to prompt engineering.
2025-03
Posted the Plan-and-Act paper to arXiv, introducing explicit Planner/Executor context separation for long-horizon agents.
2025-09-29
Published its context-engineering framework and simultaneously launched the beta Claude API context editing and memory tool primitives.
2025-10
Released the ACE (Agentic Context Engineering) paper and open-sourced the framework on GitHub.
2026-04-08
Published and open-sourced ALTK-Evolve, a memory and guideline-learning system for the Agent Lifecycle Toolkit, with AppWorld benchmark results.

Power Map

Key Players
Subject

AI agent context and memory engineering techniques

AN

Anthropic (Applied AI team)

Published the reference framework for agent context engineering and shipped matching API primitives the same day, effectively setting industry vocabulary and default practice for how agents should manage long-running context.

ST

Stanford University / SambaNova Systems / UC Berkeley (ACE authors)

Co-authored and open-sourced ACE, letting a smaller open-source model match a proprietary agent's benchmark score without retraining, directly challenging the assumption that better agents require bigger or costlier models.

IB

IBM Research

Built ALTK-Evolve inside its open-sourced Agent Lifecycle Toolkit as an enterprise-oriented alternative memory system, competing with ACE on the same AppWorld benchmark.

TI

tickernelz (independent maintainer)

Built and maintains opencode-mem, a self-hosted vector-memory plugin for the OpenCode coding agent, illustrating a community-driven alternative to hosted memory services.

UC

UC Berkeley / University of Tokyo (Plan-and-Act authors)

Authored the Plan-and-Act ICML 2025 paper establishing planner/executor context separation for long-horizon agents.

CH

Chroma

Ran the Context Rot study across 18 frontier models, supplying empirical evidence for why context management, not just window size, determines agent reliability.

Fact Check

9 cited
  1. [1] Effective context engineering for AI agents
  2. [2] Anthropic adds context editing and a memory tool to the Claude API
  3. [3] Claude Memory Tool Guide
  4. [4] Context Rot
  5. [5] ACE, Open-Sourced on GitHub
  6. [6] ALTK-Evolve
  7. [7] Karpathy Said Kill Prompt Engineering. Here's What He Actually Meant
  8. [8] Claude API Memory Tool documentation
  9. [9] Plan-and-Act: Improving Planning of Agents for Long-Horizon Tasks

Source Articles

Top 5

THE SIGNAL.

Analysts

Popularized the term context engineering, describing it as the delicate art and science of filling the context window with just the right information for the next step.

Andrej Karpathy
AI researcher, formerly OpenAI / Tesla
The Crowd

whoever leaked this has bigger balls than sense someone gave a fleet of Claude agents shared memory so they would stop contradicting each other, then measured both the bill and the output: the version that talked most made 2.4x the api calls of the version that won, and...

@@Argona0x2005

Did Stanford just kill LLM fine-tuning? This new paper from Stanford, called Agentic Context Engineering (ACE), proves something wild: you can make models smarter without changing a single weight. Here's how it works: Instead of retraining the model, ACE evolves the context...

@@akshay_pachaar762

NOT CLICKBAIT: THIS ANTHROPIC'S CONTEXT ENGINEERING POST IS F*CKING GOLD Context engineering is the next era of AI building. Not better prompts. Better curation of what lands in the window Context is finite with diminishing returns. Every token depletes attention. The goal:...

@@beamnxw48

What if AI memory worked like a brain instead of a vector database?

@u/mirkofr67
Broadcast
Context Engineering for Agents

Context Engineering for Agents

Advanced Context Engineering for Agents

Advanced Context Engineering for Agents

Anthropic Workshop: Build Agents That Run for Hours — Ash Prabaker & Andrew Wilson

Anthropic Workshop: Build Agents That Run for Hours — Ash Prabaker & Andrew Wilson