← Back to Computation and Language
cs.CL

Teaching AI agents to generate helpful memories on demand

Xiaoqiang Wang, Chao Wang, Hadi Nekoei, Christopher Pal, Alexandre Lacoste, Spandana Gella, Bang Liu, Perouz Taslakian

May 20, 2026

Most AI agents retrieve pre-stored memories when they need help, but those stored entries don't always fit the current situation. Mem-π flips this: a separate language model learns to decide when guidance would actually help and what to generate in that moment, conditioned on what the agent is currently doing. Trained with reinforcement learning to balance generating useful advice with knowing when to stay silent, it outperforms retrieval-based memory systems across web navigation, terminal commands, and text-based tasks.
Published as Mem-$π$: Adaptive Memory through Learning When and What to Generate arXiv:2605.21463
Read the original paper →