Discovering Effective Agent Memory Designs through Program Evolution
Xinheng Ding, Seyyed Saeid Cheshmi, Ziyang Zhang, Tairan Chen, Wenya Xie, Yu Hou, Rui Zhang, Zirui Liu
Abstract
Program evolution provides a promising approach to discover agent memory designs and study the choices underlying their effectiveness. We introduce MAPE, a framework that evolves whole memory programs from minimal seeds through a standardized lifecycle interface and an iterative diagnosis-proposal loop. Experiments on LoCoMo and LongMemEval yield an absolute accuracy gain of up to 12% over manually designed baselines at 35% of the serving cost, with further evaluations supporting transfer across serving backbones and benchmarks. Empirical analyses and ablations identify and validate two recurring design patterns: retaining raw conversations as retrievable evidence preserves details omitted from extracted memories, while composing retrieved evidence according to query intent helps the answering model use it effectively. Transplanting the composition module into five existing memory systems improves accuracy across all five. Beyond these patterns, the search objective shapes where computation goes: optimizing serving cost alongside accuracy shifts computation from LLM-based memory construction to selective processing at query time while retaining competitive accuracy. Together, these findings offer empirical lessons for agent memory design. Code is available at https://github.com/ash-ding/MAPE.
Create a lesson
Related papers
MedicalRSI: Medical Recursive Self-Improving Agents via Clinical Model-Harness Co-Evolution
Shared title terminology · Ziqing Wang, Hamid Palangi, Lili Zhao et al.
MemFolder: Structure-Guided Memory Folding for Efficient Agent Memory Management
Shared title terminology · Xuyang Liu, Chenwen Lu, Junxi Wang et al.
Evolve Where It Matters: Coverage-Guided Self-Evolution of Agent Skills
Shared title terminology · Boyin Tan, Jiadong Zhang, Xiaosong Ma et al.
Forget Freely, Grep Later: Lossless, Index-Free Memory for Long-Horizon LLM Agents
Shared title terminology · Ziyan Yang, Taiwei Shi, Jieyu Zhao
From Repositories to Training Environments: Scaling Long-Horizon Coding Agents with Environment Evolution Loop
Shared title terminology · Yang Tian, Tianyu Zheng, Xiyuan Yang et al.
MemDoctor: Stage-wise Error Attribution and Repair for MLLM Agent Memory
Shared title terminology · Ruiyang Jiang, Xinyang Liao, Weikai Huang et al.