Memory as state management instead of semantic retrieval improves long-horizon agents

MAGE uses a hierarchical state tree with four operations to bound context and isolate errors, boosting success rates by up to 20 percentage points on MemoryArena.

PaperBig Techcs.AIarXiv:2606.06090v1
Yaoqi Chen · Haibin Lai · Yuru Feng · Chuyu Han · Qianxi Zhang · Baotong Lu · +9 more

University of Science and Technology of China · Microsoft · Nanjing University · University of California, San Diego

Research Digest··2 min read
The authors propose MAGE, a memory system that treats an agent's history as an execution-state tree rather than a semantically organized document store. On the MemoryArena benchmark, MAGE raised average task success by 7.8–20.4 percentage points over RAG-based baselines while cutting token use by 55.1%.

What they did

Chen et al. designed MAGE (Memory as Agent-Guided Exploration), an active memory manager that stores an agent's interaction history as a hierarchical state tree. Each node represents a subtask or action, and the agent's current state is the root-to-leaf path. Four operations maintain the tree: Grow (append new traces), Compress (summarize completed subgoals), Maintain (validate summaries against traces), and Revise (prune a faulty branch and resume from an earlier state). The authors evaluated MAGE against standard RAG and naïve context-window baselines on MemoryArena, a suite of long-horizon tasks.

Key findings

  • MAGE improved average task success rate by 7.8–20.4 percentage points over the best baseline across all MemoryArena tasks.
  • Token consumption was reduced by 55.1% compared to the full-history baseline, because the tree structure bounds context growth.
  • The Revise operation allowed the agent to recover from cascading errors by isolating flawed subpaths and restarting from a validated state, a capability missing in semantic retrieval.
  • Compression and validation operations maintained state coherence even as tasks grew to hundreds of steps.

Why it matters

Existing agent memory systems treat past interactions as a flat corpus retrieved by semantic similarity, which fragments the decision trajectory and mixes correct and erroneous steps. MAGE reframes memory as an explicit model of the agent's execution state, enabling error isolation, bounded context, and targeted revision. This design principle could generalize to any long-horizon agent where actions have downstream consequences, from software engineering to robotics.

Caveats

All experiments were conducted on the MemoryArena benchmark; generalization to other domains (e.g., open-ended web tasks, physical robots) is not yet shown. The approach requires a mechanism to identify subgoal boundaries, which may need human annotation or a learned segmentation model. The authors used a single LLM (likely GPT-4 class) without ablating across model families. The 55.1% token reduction is relative to the full-history baseline, not to an equally effective compressed baseline.

§

Analysis

This work challenges the dominant paradigm of treating agent memory as a retrieval problem. By grounding memory in the agent's own decision process, MAGE offers a principled way to manage context windows and handle error cascades — a known pain point in long-horizon agents. The improvement over RAG is notable because RAG itself was considered a strong baseline. The trade-off is added complexity: the system must maintain a tree and validate summaries, which incurs overhead. Future work could explore learned subgoal detection and automatic tree pruning policies.

newspaper

Research Digest

Articles published under the Zotpaper byline are synthesized from multiple source publications by our AI editor and reviewed by our editorial process. Each story combines reporting from credible outlets to give readers a balanced, comprehensive view.