MemFolder: Structure-Guided Memory Folding for Efficient Agent Memory Management

Xuyang Liu, Chenwen Lu, Junxi Wang, Siyu Ren, Xinying Lin +4 more
11/19/2026
cs.CLcs.CV

No confident code implementation found for this paper.

Abstract

Long-term agents accumulate large external memory stores as interactions unfold, increasing the costs of storage, retrieval, and response generation. Efficiency is constrained by two coupled factors: a growing record count increases retrieval overhead, while longer retrieved contexts increase prefill computation and decoding-time attention costs.

Show full abstract

Existing methods prune or consolidate records, but pruning can discard useful evidence, whereas consolidation may produce fewer yet longer retrieval units. We introduce MemFolder, a structure-guided memory folding framework that sequentially reduces record count and context length. The framework comprises two core components that share memory groups, using cross-record structure to guide both evidence consolidation and compact representation. RecordFolder grounds entity mentions, progressively selects representative yet complementary anchors, and combines semantic and entity affinity with temporal chaining to consolidate compatible records into fewer retrieval units. ContextFolder encodes the original records within these groups into compact text and uses verification feedback to revise encodings when key facts cannot be recovered. Experiments on the three text-based memory benchmarks LoCoMo, PersonaMem, and LongMemEval and the two multimodal benchmarks M3-Bench-web and M3-Bench-robot demonstrate the strong performance of our methods. Notably, on Mem0, RecordFolder retains 99.0% of the original average performance across the three text-based benchmarks with 50% fewer records, exceeding the strongest baseline by 1.9 percentage points in performance retention. Combined with ContextFolder, existing record compression methods further shorten their output records while retaining most of their performance.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{liu2026memfolder,
  title  = {MemFolder: Structure-Guided Memory Folding for Efficient Agent Memory Management},
  author = {Xuyang Liu and Chenwen Lu and Junxi Wang and Siyu Ren and Xinying Lin and Siteng Huang and Hongli Sun and Linfeng Zhang and Honggang Chen},
  year   = {2026},
  eprint = {2611.26427},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2611.26427v1}
}

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

Discussion