MemForest: Efficient Agent Memory Management via EventTree Partitioning and Progressive Merging
Junxi Wang, Te Sun, Jiayi Zhu, Chen Zhang, Siyuan Li, Xuyang Liu, Zichen Wen, Xiaobing Tu, Jinkui Ren, Xiantao Zhang, Ziqi Yuan, Linfeng Zhang
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. To address this issue, we propose 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 97.1% of the original performance while compressing 50% of historical memory across three benchmarks (LoCoMo, LongMemEval, and PersonaMem), achieving a 1.89x retrieval speedup. Under the multimodal M3-Agent framework, it preserves 99.7% of the original performance with a 50% compression ratio across two benchmarks (M3-Bench-robot and M3-Bench-web), achieving a 2.24x retrieval speedup. RoyalBlueOur code is available at [https://github.com/Celina-love-sweet/MemForest.](https://github.com/Celina-love-sweet/MemForest.)
Create a lesson
Metadata
- Comments
- NeurIPS26
Related papers
ChiProgramBench: Can LLM Agents Rebuild Efficient Circuits from Pin-Level Experiments?
Shared title terminologycs.AITianrun Gou, Qingyao Yang, Wendong Xu et al.
Memory Compression for High-Fanout Agent Sandboxes
Shared title terminologycs.AIMengming Li, Ceyu XU, Qijun Zhang et al.
Grounding Agent Memory: Environment-Probing Curation for Enterprise Agents
Shared title terminologycs.AISusheel Suresh, Hazel Mak, Sahil Bhatnagar et al.
Fortunate Recall: Ontology-Driven Memory Lifecycle Management for Persistent Coherence in LLMs
Shared title terminologycs.AIAnsuman Mullick, Eray Tüzün
Kernel-Managed Shared Memory for System-Wide Personalization
Shared title terminologycs.AIRyan Lum, Yongfeng Zhang
UnitBoost: Managing Compound LLM Systems with a Merge Operator, Not a Model
Shared title terminologycs.AIXing Zhang, Guanghui Wang, Yanwei Cui et al.