Wink Pings

Let AI Decide What to Remember: A Paper That Integrates Memory Management Into Agent Policy

Most AI agent architectures rely on static rules for memory management, but a new paper proposes directly training memory operations as an integrated part of a model's policy. AgeMem enables agents to autonomously invoke tools like ADD, UPDATE, and SUMMARIZE, simultaneously improving accuracy and reducing token overhead across 5 benchmarks.

Most AI agent architectures handle memory like adding an external administrator to the system. All rules are hard-coded: when to store, when to retrieve, when to clear. But rules can never cover every possible scenario, so agents gradually lose control during long-horizon tasks: important information gets forgotten, irrelevant content clutters up the context window, and retrieved results have nothing to do with the current task.

A new paper from Wuhan University and Alibaba removes this hand-coded administrator entirely.

Paper title: **Agentic Memory: Learning Unified Long-Term and Short-Term Memory Management for Large Language Model Agents** (Authors: Yi Yu, Liuyi Yao, Yuexiang Xie, Qingquan Tan, Jiaqi Feng, Yaliang Li, Libing Wu). The core idea is simple: memory management should not be a collection of external rules—it should be an inherent part of the model's own policy.

![论文截图:AgeMem框架将长期和短期记忆管理统一为agent的策略](https://wink.run/image?url=https%3A%2F%2Fpbs.twimg.com%2Fmedia%2FHPSTNNwXQAAbPSq%3Fformat%3Dpng%26name%3Dlarge)

## Turn memory operations into tool calls

AgeMem exposes memory operations as actionable tools. The model autonomously decides when to invoke tools including **ADD**, **UPDATE**, **SUMMARIZE**, and **FILTER** during the inference loop.

That means every decision—what to store, how to store it, when to update, when to compress, when to discard—is made by the model itself.

Training uses three-stage progressive reinforcement learning, paired with step-wise GRPO to optimize storage, retrieval, and context pruning. The final result: improved accuracy across 5 benchmarks, alongside reduced prompt token overhead.

The key insight here is that reinforcement learning teaches the model when to remember and what to remember—something that pre-defined rules can never achieve.

While most existing agent architectures rely on static heuristics or separate rule-based memory managers, this system directly trains the core LLM policy to end-to-end manage its own memory.

## Why this matters

We previously published an article on context engineering and memory engineering ([link](http://x.com/i/article/2084260793592303616)), where we distinguished these two often conflated concepts:

- **Context engineering**: Information assembly within a single inference call—what to include, where to place it, what to compress. Everything resets once the context window is cleared.

- **Memory engineering**: Persistent information storage across multiple interactions—what to write, where to store it, how to retrieve it, how to maintain it.

Traditionally, every step of memory engineering is manually designed. For writing policies, you have to define trigger conditions, storage formats, and confidence requirements; for retrieval, you need to design embedding schemes, ranking logic, and filtering rules; for maintenance, you have to implement deduplication, expiration checks, and compression.

![上下文工程与记忆工程信息图:左侧展示上下文工程五个步骤,右侧展示记忆工程三个层次](https://wink.run/image?url=https%3A%2F%2Fpbs.twimg.com%2Fmedia%2FHOz9czvXcAAjPOd%3Fformat%3Djpg%26name%3Dlarge)

AgeMem skips all these manual design steps. Memory policy is not written—it's trained.

There is a classic pain point in memory engineering:

> Retrieval quality seems fine—all relevant information is found, but system performance still degrades over time.

The problem usually comes from the lack of a budget mechanism for context assembly. All retrieved content is crammed into the prompt, crowding out space for instructions, tool outputs, and reasoning traces.

By training memory operations as policy actions, AgeMem lets the model learn to make tradeoffs within a limited context window on its own. This is far more granular than manual parameter tuning by humans.

## Reactions from the community

The paper sparked discussion on X. Developers commented:

> Agent memory only becomes truly useful when forgetting and retrieval become trainable actions.

> Turning memory operations into policy actions beats adding another external heuristic manager.

> The real breakthrough is making memory an active decision, not just a storage layer.

One user put it more bluntly:

> The model calls summarize on itself during the loop.

![记忆工程概览图:展示记忆写入策略、存储层选择、检索策略和维护机制](https://wink.run/image?url=https%3A%2F%2Fpbs.twimg.com%2Fmedia%2FHO0CKmrXMAEEFcT%3Fformat%3Djpg%26name%3Dlarge)

## What this means

Static memory management is like writing a user manual for every use case, while learnable memory management lets the agent learn how to use memory on its own. The latter is clearly far more flexible, but it comes with the cost of higher training complexity.

AgeMem's approach is not the only path forward, but it points to a clear direction: agent memory capability is shifting from an engineering problem to a learning problem.

Paper link: https://arxiv.org/pdf/2601.01885

发布时间: 2026-08-10 10:42