Discovering Effective Agent Memory Designs through Program Evolution

Xinheng Ding, Seyyed Saeid Cheshmi, Ziyang Zhang, Tairan Chen, Wenya Xie +3 more
11/12/2026
cs.CLcs.AI

Official code: ash-ding/MAPE (3 stars, Python, Apache-2.0, last commit 2026-11-15).

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.

Show full abstract

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.

View on arXivView PDF

Code Implementations(1)

ash-ding/MAPEOfficial100%
Apache-2.0
30Python, ShellOct 23, 20262 weeks agoApache-2.0

Similar Papers

Cite this paper

@article{ding2026discovering,
  title  = {Discovering Effective Agent Memory Designs through Program Evolution},
  author = {Xinheng Ding and Seyyed Saeid Cheshmi and Ziyang Zhang and Tairan Chen and Wenya Xie and Yu Hou and Rui Zhang and Zirui Liu},
  year   = {2026},
  eprint = {2611.17068},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2611.17068v1}
}

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/2611.17068.svg)](https://codeofpaper.com/paper/2611.17068)

Discussion