
Read the paper
Discovering Effective Agent Memory Designs through Program Evolution
on GitHub
Imagine you're organizing a massive filing cabinet. You could hire an expensive consultant to read every document, write summaries, and file them under neat categories — or you could keep the originals, build a clever index, and only call the consultant when someone actually asks a question. MAPE discovers, through automated program evolution, that the second strategy dominates. The consultant's summaries lose details the originals preserve, and smart retrieval at query time beats expensive preprocessing. The committed claim: a program-evolution framework can discover agent memory architectures from minimal seed code that outperform hand-designed memory systems by up to 12 percentage points in accuracy while consuming only 35% of the serving cost. This isn't a marginal SOTA bump — it's a methodological shift from human-designed memory pipelines to evolved ones, with the evolved designs revealing generalizable patterns humans hadn't prioritized. MAPE works through a standardized lifecycle interface — init, encode, retrieve, respond — and an iterative diagnosis-proposal loop. An LLM examines failure cases from the current best program, proposes code mutations, and the system evaluates variants on LoCoMo and LongMemEval benchmarks. The key architectural insight is that this is program synthesis applied to agent memory, not hyperparameter search. Entire code blocks get rewritten, not just knobs tuned. The search space is the space of possible Python programs implementing the lifecycle interface. Two design patterns recur across evolved solutions and survive ablation. First, retaining raw conversation transcripts as retrievable evidence outperforms systems that only store extracted memories — summaries lose signal. Second, composing retrieved evidence according to query intent before passing it to the answering LLM substantially helps. The composition module is so robust that transplanting it into five existing memory systems (MemoryBank, A-Mem, Mem0, MemGPT, Archon) improves accuracy across all five. That's the strongest validation signal in the paper: the discovered module transfers. The integrity picture is solid for an agent-systems paper. Two established community benchmarks (LoCoMo, LongMemEval) provide the evaluation surface. Five named baselines are compared head-to-head. Transfer is tested across serving backbones (not just one LLM) and across benchmarks. Ablations isolate the contribution of individual components. Code is released. The main caveat: no pre-registration, and the evolution loop itself involves the LLM proposing mutations — meaning the search could overfit to benchmark idiosyncrasies, though cross-benchmark transfer mitigates this concern. The cost-accuracy tradeoff finding is perhaps the most practically significant result. When the search objective includes serving cost alongside accuracy, evolved programs shift computation away from expensive LLM-based memory construction toward selective processing at query time — and retain competitive accuracy. This is the kind of insight that changes how practitioners budget compute in deployed agent systems. What's missing tells you where the field goes next. MAPE evolves memory for conversational agents on static benchmarks. The obvious successor experiments are streaming/online settings where memories must be updated continuously, and multi-agent scenarios where memory is shared. The authors likely didn't run these because the benchmarks don't exist yet in a form compatible with their lifecycle interface — building them is a paper unto itself.
The analogy
You're organizing a filing cabinet. An expensive consultant could summarize every document and file summaries — but originals get lost. MAPE discovers it's better to keep the originals, build a smart index, and only call the consultant when someone actually asks a question. The filing strategy itself is what gets evolved.
Filing cabinet
Keep originals + smart index, call consultant only at query time instead of pre-summarizing everything
MAPE memory
Retain raw conversations as retrievable evidence, compose evidence selectively at query time instead of costly LLM-based memory construction
Honest assessment
MAPE is a genuinely useful contribution that does what it claims: evolves memory programs that beat hand-designed systems and reveals transferable patterns. The strongest evidence is the transplant experiment — the composition module improving all five baselines is hard to dismiss. The main limitations are the static-benchmark setting (real agents operate in streaming environments) and the absence of classical IR baselines alongside the agent-system baselines. This matters most to practitioners building conversational agents with long memory and to researchers studying automated program synthesis for AI systems.
What Is CLAIMS?
70
/ 100
BedrockNews applies a structured analytical framework called CLAIMS to academic papers and technical research releases.
How CLAIMS worksClaim
4/5
Ladder
4/5
Architecture
4/5
Integrity
3/5
Milestone
2/5
Successor
4/5
What is this paper actually committing to?
Real methodological contribution: evolving whole memory programs, not just tuning knobs. Two transferable patterns validated by transplant into five systems. Not first program evolution, but first applied to agent memory with this rigor.
The field fight
Should agent memory be hand-designed by researchers or discovered through automated search?
Side A
Human-designed memory architectures with principled abstractions (summarization, structured storage, retrieval) are more interpretable and controllable
Held by: MemGPT, Mem0, MemoryBank, A-Mem
Side B
Automated search over program space discovers better designs than humans and reveals patterns humans missed
Held by: FunSearch, EvoPrompt, MAPE (this paper)
Milestone tracker
Unlocks: Evolved memory for deployed conversational agents that learn and update in real-time
Current
+12%
accuracy
static benchmarks
Next
TBD
accuracy on streaming
online memory benchmark
~1-2 years; requires new benchmark infrastructure
Verified Facts (6)
Experiments on LoCoMo and LongMemEval yield an absolute accuracy gain of up to 12% over manually designed baselines at 35% of the serving cost
Two recurring design patterns: retaining raw conversations as retrievable evidence preserves details omitted from extracted memories; 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
Optimizing serving cost alongside accuracy shifts computation from LLM-based memory construction to selective processing at query time while retaining competitive accuracy
Code is available at https://github.com/ash-ding/MAPE
24 pages, 8 figures, 10 tables
Practical Implications (4)
The composition-by-query-intent module can be transplanted into existing memory systems (MemGPT, Mem0, etc.) for immediate accuracy gains — no need to adopt the full MAPE framework
Retaining raw conversations alongside extracted memories is empirically better than extraction-only — practitioners should stop discarding originals
When serving cost matters, shifting compute from memory construction to selective query-time processing retains accuracy while cutting costs to ~35%
The lifecycle interface (init/encode/retrieve/respond) provides a standardized abstraction for comparing memory systems that the community can adopt
More latest news
Read all