MemForest: Efficient Agent Memory Management via EventTree Partitioning and Progressive Merging

Junxi Wang, Te Sun, Jiayi Zhu, Chen Zhang, Siyuan Li +7 more
9/8/2026
1 citation
cs.AI

Official code: Celina-love-sweet/MemForest (41 stars, Python, MIT, last commit 2026-09-17).

Abstract

Agent memory systems have demonstrated significant potential in long-term dialogue, personalized assistants, and video understanding. However, continuously accumulated memory introduces substantial storage and retrieval costs during inference.

Show full abstract

To address this issue, we propose \textbf{MemForest}, a general memory compression framework adaptable to various agent memory systems. Specifically, MemForest partitions historical memory into event-centric units by leveraging global semantic similarity and local temporal continuity. For each unit, it constructs a maximum spanning tree, termed an EventTree, and progressively merges redundant memory nodes by selecting high-weight edges, reducing storage overhead. Furthermore, we introduce an anchor-guided propagation retrieval mechanism that retrieves relevant memory nodes from the temporal neighborhoods of key nodes, improving retrieval accuracy. Extensive experiments demonstrate the effectiveness of MemForest. Under the unimodal Mem0 framework, MemForest retains \textbf{97.1%} of the original performance while compressing \textbf{50%} of historical memory across three benchmarks (LoCoMo, LongMemEval, and PersonaMem), achieving a \textbf{1.89x} retrieval speedup. Under the multimodal M3-Agent framework, it preserves \textbf{99.7%} of the original performance with a \textbf{50%} compression ratio across two benchmarks (M3-Bench-robot and M3-Bench-web), achieving a \textbf{2.24x} retrieval speedup. \textcolor{RoyalBlue}{\textit{Our code is available at [https://github.com/Celina-love-sweet/MemForest.}}](https://github.com/Celina-love-sweet/MemForest.}})

View on arXivView PDF

Code Implementations(1)

MIT

[NeurIPS 2026] MemForest: Efficient Agent Memory Management via EventTree Partitioning and Progressive Merging

410Python, MDXMay 6, 20262 months agoMIT

Similar Papers

Cite this paper

@article{wang2026memforest,
  title  = {MemForest: Efficient Agent Memory Management via EventTree Partitioning and Progressive Merging},
  author = {Junxi Wang and Te Sun and Jiayi Zhu and Chen Zhang and Siyuan Li and Xuyang Liu and Zichen Wen and Xiaobing Tu and Jinkui Ren and Xiantao Zhang and Ziqi Yuan and Linfeng Zhang},
  year   = {2026},
  eprint = {2609.08273},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2609.08273v2}
}

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

Discussion