- [Aug 21, 2026]: 🎉 MemPro has been accepted to the Main Conference of EMNLP 2026!
- [May 30, 2026]: 📄 Our paper is now available on arXiv and Hugging Face.
We introduce MemPro, a framework for automatically evolving agentic memory systems. By treating the entire memory construction–retrieval (MCR) pipeline, including its prompts and code, as an evolvable program, MemPro iteratively selects promising versions, expands them through targeted editing and debugging, and evaluates new candidates within a version tree.
MemPro evolution trajectory on LoCoMo. MemPro progressively improves through prompt- and code-level updates, outperforming GEPA and GAM.
git clone https://github.com/wanghai673/MemPro.git
cd MemPro
conda create -n mempro python=3.10 openjdk=21 -y
conda activate mempro
pip install -r requirements.txt
pip install -e .bash scripts/download_data.sh
cp .env.example .envEdit .env with your API credentials and model:
OPENAI_API_KEY=your_api_key_here
OPENAI_BASE_URL=https://api.openai.com/v1
OPENAI_MODEL=gpt-4o-mini
OPENAI_API_TYPE=openaiOPENAI_API_KEY: your API provider's key.OPENAI_BASE_URL: the provider's OpenAI-compatible API base URL, usually ending in/v1.OPENAI_MODEL: the model ID available at that endpoint.OPENAI_API_TYPE: keepopenaifor OpenAI-compatible APIs.
Leave the role-specific fields blank to use the shared configuration. You can optionally set separate API keys, base URLs, and models through MEMORY_* (memory construction), RESEARCH_* (retrieval reasoning), WORKING_* (answer generation), and JUDGE_* (scoring). Run the evaluation scripts from the repository root so they can load .env.
# LoCoMo
bash scripts/eval_locomo.sh
# LongMemEval
bash scripts/eval_longmemeval.sh
# HotpotQA
bash scripts/eval_hotpotqa.sh
# NarrativeQA
bash scripts/eval_narrativeqa.shpython scripts/run_evolution.py locomo --executeMemPro/
├── README.md
├── requirements.txt
├── setup.py
├── pyproject.toml
├── figs/ # README figures
├── best_versions/ # Best evolved runnable MemPro frameworks
│ ├── locomo/
│ ├── longmemeval/
│ ├── hotpotqa/
│ └── narrativeqa/
├── eval/ # Benchmark evaluation drivers
│ ├── locomo_test.py
│ ├── longmemeval_test.py
│ ├── hotpotqa_test.py
│ └── narrativeqa_test.py
├── MemPro/ # Evolution workspaces
│ ├── locomo/AGENTS.md
│ ├── longmemeval/AGENTS.md
│ ├── hotpotqa/AGENTS.md
│ └── narrativeqa/AGENTS.md
├── initial_framework/ # Initial MemPro framework package
├── scripts/ # Download, evaluation, and evolution helpers
├── download_data/ # Dataset download utilities
├── data/ # Generated or downloaded by local setup; not tracked
├── results/ # Evaluation outputs written by local runs; not tracked
└── logs/ # Runtime logs written by local runs; not tracked
Our initial framework is adapted from General Agentic Memory (GAM), and we thank the authors for their valuable open-source contribution.
We appreciate your citations if you find our paper relevant and useful to your research!
@article{liu2026mempro,
title={MemPro: Agentic Memory Systems as Evolvable Programs},
author={Liu, Qingshan and Wang, Guoqing and Wu, Wen and Huang, Jingqi and Tao, Xinqi and Song, Dejia and Zhou, Jie and He, Liang},
journal={arXiv preprint arXiv:2606.00619},
year={2026}
}For questions, suggestions, or bug reports, please contact:
51285901015@stu.ecnu.edu.cn

