Agent memory no longer has to be hand-designed: MAPE evolves whole memory programs from a no-memory seed, gaining up to 12 points on LoCoMo
Synopsis
Agent memory systems have relied on human expertise to decide what to store and how to organize and retrieve it. MAPE exposes memory construction, retrieval and evidence composition as programmable stages and rewrites the whole program from minimal seeds such as one that stores no memory, guided by an iterative diagnosis–proposal loop. On LoCoMo and LongMemEval the selected programs beat every evaluated human-designed baseline on their respective benchmarks, with an absolute accuracy gain of up to 12 points on LoCoMo at 35% of the baseline serving cost.
Interpretation
The design space of agent memory can now be searched by program evolution instead of having storage structure, retrieval mechanism and evidence handling specified item by item. Earlier memory systems advanced representation, organization, maintenance and retrieval, but these components were typically designed and refined through human expertise; existing evolutionary approaches often constrained the search to selected components or started from established memory architectures, and emphasized accuracy. Across LoCoMo and LongMemEval under both an accuracy-only and a joint accuracy–cost objective, four settings in all, the selected programs outperformed the evaluated human-designed baselines on their respective benchmarks; on LoCoMo an absolute accuracy gain of up to 12% was observed at 35% of the baseline serving cost.
The evolved memory programs repeatedly show two practices: keeping raw conversations as retrievable evidence, and organizing retrieved evidence by query intent before handing it to the answering model. The five evaluated human-designed memory systems discard the original conversations after extracting facts at construction, or omit them from the evidence given to the QA model, which can leave the model without fine-grained semantic information needed for later questions. Removing the retrieved raw conversation rounds from the representative program MAPE-ALME lowers accuracy by an absolute 12.17% on LoCoMo and 6.50% on LongMemEval; removing the intent-routed composition module lowers it by 4.44 and 6.25 points respectively, with the largest declines on temporal questions.
Transplanting the intent-routed evidence composition module into five human-designed memory systems raises accuracy in all five. The module existed only inside the evolved programs, so the transplant tests whether it works beyond its original program. On the LongMemEval evaluation set with Qwen3-30B-A3B-Instruct-2507 as the serving backbone and a paired evaluation protocol, the five systems gain 2.75 to 9.25 absolute accuracy points, with Mem0 improving least at 2.75 points.
Putting serving cost into the search objective changes where computation lands in the memory lifecycle, shifting it from LLM-based memory construction at build time to selective processing at query time. Accuracy-only search progressively adds operations and accepts substantial cost increases for marginal accuracy gains; introducing per-session note extraction at build time, for example, increases cost approximately sixfold. The selected accuracy–cost programs use 90% and 40% fewer serving calls than their counterparts on LongMemEval and LoCoMo respectively, while retaining strong evaluation-set accuracy.
Perspective
The conclusions cover the two conversational-memory QA benchmarks LoCoMo and LongMemEval-S under a fixed 20% search and 80% evaluation split, and the component analysis centers on one representative program, MAPE-ALME; transfer and transplantation experiments extend evaluation across serving backbones, both benchmarks and five human-designed memory systems. The cost measure counts only LLM and embedding tokens across build, retrieve, compose and answer, excluding search expenses, local computation and latency.
The authors note that the findings concern conversational memory on two QA benchmarks, and applicability to experiential memory and open-ended agents remains to be established; evolutionary trajectories and resulting programs can vary across runs, and program selection and design interpretation involve empirical judgment. Cost conclusions depend on workload, particularly how memory construction costs are amortized across queries, and reported costs estimate serving at fixed price rates rather than actual infrastructure expenditure.
