Mem-π: Adaptive Memory through Learning When and What to Generate

Xiaoqiang Wang, Chao Wang, Hadi Nekoei, Christopher Pal, Alexandre Lacoste +3 more
5/20/2026
cs.CLcs.AI
rl

No confident code implementation found for this paper. 1 possible match can be shown below.

Abstract

We present Mem-$π$, a framework for adaptive memory in large language model (LLM) agents, where useful guidance is generated on demand rather than retrieved from external memory stores. Existing memory-augmented agents typically rely on similarity-based retrieval from episodic memory banks or skill libraries, returning static entries that often misalign with the current context.

Show full abstract

In contrast, Mem-$π$ uses a dedicated language or vision-language model with its own parameters, separate from the downstream agent, to generate context-specific guidance for complex tasks. Conditioned on the current agent context, the model jointly decides when to produce guidance and what guidance to produce. We train it with a decision-content decoupled reinforcement learning (RL) objective, enabling it to abstain when generation would not help and otherwise produce concise, useful guidance. Across diverse agentic benchmarks spanning web navigation, terminal-based tool use, and text-based embodied interaction, Mem-$π$ consistently outperforms retrieval-based and prior RL-optimized memory baselines, achieving over 30% relative improvement on web navigation tasks.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 1 weaker match is hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{wang2026mem,
  title  = {Mem-π: Adaptive Memory through Learning When and What to Generate},
  author = {Xiaoqiang Wang and Chao Wang and Hadi Nekoei and Christopher Pal and Alexandre Lacoste and Spandana Gella and Bang Liu and Perouz Taslakian},
  year   = {2026},
  eprint = {2605.21463},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2605.21463v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2605.21463.svg)](https://codeofpaper.com/paper/2605.21463)

Discussion