Memory As Action (MemAct) : Autonomous Context Curation For Long-Horizon Agentic Tasks

A framework that treats context curation as learnable memory-editing actions, letting an agent manage its own working memory for long-horizon tasks.
llm
agents
Author

Santosh Sawant

Published

October 15, 2025

LLM Agents

đź“„
Memory As Action (MemAct): Autonomous Context Curation For Long-Horizon Agentic Tasks
arXiv 2409.03421 · October 2025

Read paper ↗

MemAct context-curation loop
Key Innovation

Context curation is reframed as explicit, learnable function-call actions folded into the policy itself — the agent learns when to retain, compress, or discard its own history rather than relying on external heuristics.

For agentic tasks demanding long-horizon reasoning and complex tool use, such as deep research and software engineering, the effectiveness of a Large Language Model (LLM) is fundamentally constrained by distracting or irrelevant context. Therefore, the critical bottleneck for long-horizon tasks shifts from merely expanding memory capacity to actively curating its contents. To achieve such a meta-task Context Curation mechanism agent required to learn to autonomously manage its own working memory by strategically selecting, integrating, and pruning information to maintain a focused and goal-relevant reasoning trace.

Recent advances in long-context methods, enabled by techniques such as positional-encoding scaling, long-context sample synthesis and sparse/linear attention mechanisms, have successfully expanded the capacity of an agent’s working memory. However, simply increasing the context window does not guarantee improved reasoning performance.

To address this researchers have introduced Memory-as-Action (MemAct), a framework that treats context curation as a sequence of learnable memory-editing operations. Rather than passively accumulating an ever-growing prefix, the agent learns to decide when to retain, compress, or discard segments of history, and may insert summaries to maintain coherence. These transformations are applied through explicit function-call actions, enabling the agent to develop memory strategies that improve reasoning efficiency.

In conventional memory management memory operations—such as selection, compression, and summarization—are governed by handcrafted heuristics or external controllers. These behaviors remain decoupled from the agent’s core decision-making process. In contrast, the Memory-as-Action (MemAct) framework integrates such operations into the policy itself, enabling the agent to learn when and how to edit its own working memory as part of a unified decision loop. This formulation supports goal-directed, policy-driven memory management.

Key Result

Policy-driven, learned memory editing improves reasoning efficiency over handcrafted memory heuristics on long-horizon agentic tasks.