← Latest papers
🤖 AI

Memory as Action: Autonomous Context Curation for Long-Horizon Agentic Tasks

The paper introduces Memory-as-Action (MemAct), a framework that treats working memory management as learnable policy actions optimized via reinforcement learning to enable efficient, adaptive context curation for long-horizon agentic tasks, achieving the accuracy of much larger models while significantly reducing context length.

Original authors: Yuxiang Zhang, Jiangming Shu, Ye Ma, Xueyuan Lin, Shangxi Wu, Jitao Sang

Published 2026-05-08
📖 4 min read☕ Coffee break read

Original authors: Yuxiang Zhang, Jiangming Shu, Ye Ma, Xueyuan Lin, Shangxi Wu, Jitao Sang

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you are trying to solve a massive, multi-step puzzle, like planning a complex trip or debugging a huge software program. You have a giant whiteboard (your computer's memory) where you write down every thought, search result, and clue you find.

The Problem:
As the task gets longer, your whiteboard gets cluttered. You start writing down everything: "I looked up the weather," "I checked the train schedule," "I read about the history of the city," "I looked up the weather again." Eventually, the board is so full of scribbles that you can't find the important clues anymore. You get "lost in the middle" of your own notes.

Current AI assistants do the same thing. They just keep adding notes to the bottom of the page, never erasing anything, until the page is too messy to read effectively.

The Solution: "Memory as Action" (MemAct)
This paper introduces a new way for AI to think. Instead of just passively writing notes, the AI is taught to act on its own memory. Think of it as giving the AI a pair of scissors and a highlighter.

The authors call this framework MemAct. Here is how it works in simple terms:

1. The "Edit" Button

In the old way, the AI just keeps talking. In MemAct, the AI has a special tool called Prune & Write.

  • Prune (The Scissors): The AI looks at its history and decides, "I don't need those 10 old search results anymore; I already know the answer to that part." It cuts them out.
  • Write (The Highlighter): Before cutting, the AI writes a short, neat summary of what it learned from those old notes.
  • The Result: The messy, long history is replaced by a clean, short summary. The AI keeps the meaning but loses the clutter.

2. The "Smart" Decision

The tricky part is knowing when to cut. If you cut too early, you lose important facts. If you cut too late, the board is too messy.

  • Old Method: A human programmer sets a rule like, "Every 5 minutes, delete the oldest notes." This is rigid and often deletes the wrong things.
  • MemAct Method: The AI learns to decide for itself. It's like a student who learns, "When I have solved the first part of the math problem, I can erase the scratch work so I have room for the next part." The AI learns this strategy through trial and error (Reinforcement Learning).

3. The "Train Track" Challenge (DCPO)

There was a big technical hurdle. Imagine a train moving forward on tracks. If the AI suddenly deletes a piece of the track behind it, the train (the AI's thinking process) might crash because it was built on the assumption that tracks only get added, never removed.

The authors invented a clever fix called DCPO (Dynamic Context Policy Optimization).

  • The Analogy: Imagine you are filming a movie. If the actor forgets a line and the director says, "Cut! Let's redo that scene," you don't just keep filming over the mistake. You go back, re-shoot the scene, and splice the new, correct footage into the movie reel.
  • The Fix: DCPO does this for the AI's training. When the AI edits its memory, the system logically "rewinds" and re-organizes the training data into clean, separate segments. This allows the AI to learn how to edit its memory without getting confused by its own changes.

The Results: Smaller, Faster, Smarter

The paper tested this with a 14-billion-parameter AI model (which is large, but not the biggest).

  • The Comparison: They compared it to a "giant" AI model (235 billion parameters) that has a huge memory but doesn't know how to clean it.
  • The Outcome: The smaller MemAct AI performed just as well as the giant model, but it used 51% less memory space.
  • The Benefit: Because it kept its "whiteboard" clean, it was faster and didn't get confused by irrelevant information. It learned to be a "surgical" editor, removing only what was necessary to keep its focus sharp.

Summary

The paper claims that by teaching AI to actively manage its own short-term memory—deciding what to keep, what to summarize, and what to delete—it can solve complex, long-term problems much more efficiently. It turns memory management from a passive storage issue into an active, learned skill, allowing smaller models to punch above their weight class.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →