Search papers, labs, and topics across Lattice.
To eliminate the storage and retrieval bottlenecks of lifelong agent interactions, MemForest structures memory streams into event-centric maximum spanning trees that progressively merge redundant nodes based on semantic affinity and temporal continuity. The system pairs this tree-based compression with an anchor-guided retrieval mechanism that traverses key nodes' temporal neighborhoods to maintain precise contextual recall. Across both unimodal (Mem0) and multimodal (M3-Agent) benchmarks, it halves historical memory footprints while retaining up to 99.7% of downstream performance and accelerating retrieval by up to 2.24x.
Agent memory can be compressed by 50% with virtually zero performance degradation (retaining up to 99.7% accuracy) and a 2x retrieval speedup by structuring historical context into event-centric maximum spanning trees.
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 \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.}})