Papers
Topics
Authors
Recent
Search
2000 character limit reached

MemForest: Efficient Agent Memory System

Updated 5 July 2026
  • MemForest is a long-horizon agent memory system that reformulates persistent memory as a write-efficient temporal data management problem for continuous updates and precise temporal queries.
  • It employs parallel chunk extraction and hierarchical MemTree indexing to decouple memory construction from sequential LLM passes, localizing maintenance to affected tree paths.
  • Empirical results indicate that MemForest excels in pass@1 scores and memory construction throughput, demonstrating its effectiveness in multi-session and temporal reasoning tasks.

MemForest is a long-horizon agent memory system that reformulates persistent memory as a write-efficient temporal data management problem. In its canonical usage, the term refers to the framework introduced in "MemForest: An Efficient Agent Memory System with Hierarchical Temporal Indexing" (Chen et al., 16 May 2026). The system combines parallel chunk extraction with a hierarchical temporal index, MemTree, so that memory construction is decoupled from a single serialized LLM pass and maintenance is localized to affected tree paths rather than implemented as repeated full-state rewrites. The resulting substrate is designed for a continuous serve-and-update lifecycle and for temporal queries over current states, historical states, and transitions.

1. Problem formulation and temporal memory model

MemForest is motivated by two limitations attributed to earlier agent memory systems: coarse-grained state management and inherently sequential update pipelines. In the coarse-grained regime, a scope such as a user profile is repeatedly rewritten as a mutable text object, so the write cost grows with accumulated state size rather than with the size of the incremental update. In the sequential regime, extraction, consolidation, and reconciliation remain on the LLM critical path, so update freshness is bounded by LLM latency and ordered processing constraints rather than by available concurrency (Chen et al., 16 May 2026).

The underlying workload is an online session stream. After TT sessions, the processed prefix is

DT=(S1,S2,,ST),D_T = (S_1, S_2, \ldots, S_T),

with each session written as

St=(ut,1,,ut,nt).S_t = (u_{t,1}, \ldots, u_{t,n_t}).

A temporal scope σ\sigma groups temporally ordered evidence,

Eσ=(eσ,1,eσ,2,,eσ,mσ),E_\sigma = (e_{\sigma,1}, e_{\sigma,2}, \ldots, e_{\sigma,m_\sigma}),

where each item is temporally anchored by a timestamp or interval. The update problem is to make EσEσΔEσE_\sigma \leftarrow E_\sigma \oplus \Delta E_\sigma queryable while minimizing write-path latency and preserving temporal-scope fidelity (Chen et al., 16 May 2026).

The framework is explicitly positioned against the "mutable-state pattern" used in earlier systems, where

sσ(i)=Update(sσ(i1),ΔEσ(i)).s_{\sigma}^{(i)} = Update(s_{\sigma}^{(i-1)}, \Delta E_{\sigma}^{(i)}).

That pattern serializes later writes behind earlier generated states and tends to scale with sσ(i1)|s_{\sigma}^{(i-1)}|. MemForest instead treats memory as a persistent substrate whose maintenance should be localized to affected scopes and access paths rather than expressed as repeated global rewrites (Chen et al., 16 May 2026).

A central failure mode identified by the framework is wrong-time retrieval. Independent fact stores retrieved by semantic similarity can ignore temporal relations; in transitions such as Boston \rightarrow Davis \rightarrow Miami, a query asking where someone lived before moving to Miami may retrieve Boston or Miami instead of Davis. Conversely, mutable latest-state summaries can answer current-state queries while losing intermediate states and transition evidence. MemForest is designed specifically to retain temporally evolving states rather than collapsing them into a single latest summary (Chen et al., 16 May 2026).

2. Architecture, data structures, and indexing layers

MemForest operates through a serve-and-update lifecycle. New sessions are first extracted into canonical facts; those facts are routed to temporal scopes and inserted into scoped MemTrees; derived artifacts such as summaries, embeddings, and index rows are refreshed lazily and locally; subsequent queries retrieve by browsing trees rather than by scanning a flat global memory (Chen et al., 16 May 2026).

The construction pipeline begins with parallel chunk extraction. A session DT=(S1,S2,,ST),D_T = (S_1, S_2, \ldots, S_T),0 is partitioned into fixed-size chunks

DT=(S1,S2,,ST),D_T = (S_1, S_2, \ldots, S_T),1

where

DT=(S1,S2,,ST),D_T = (S_1, S_2, \ldots, S_T),2

The default choice is DT=(S1,S2,,ST),D_T = (S_1, S_2, \ldots, S_T),3 turns. Each chunk is processed independently, subject to concurrency limits, to extract local memory candidates with source references, temporal anchors, entity mentions, and topical signals. Canonicalization then consolidates those outputs into canonical facts, which are stored in a Fact Manager as the stable write unit (Chen et al., 16 May 2026).

The core index structure is MemTree, a balanced, time-ordered DT=(S1,S2,,ST),D_T = (S_1, S_2, \ldots, S_T),4-ary tree materialized per scope DT=(S1,S2,,ST),D_T = (S_1, S_2, \ldots, S_T),5. Leaves store time-local evidence in temporal order. Entity and scene trees store canonical facts as leaves, whereas session trees store raw dialogue cells and derive summaries online for access. Internal nodes summarize contiguous temporal intervals of their children, and root nodes provide coarse scope-level representations for forest recall (Chen et al., 16 May 2026).

MemForest separates persistent state from derived artifacts. The persistent layer contains canonical facts, scope assignments, MemTree topology, placement maps, and source-session references. The derived layer contains node summaries, node embeddings in NodeIndex, and root rows in RootIndex. This separation allows structural edits to be eager while semantic refresh remains lazy. Placement maps connect facts or cells to leaves, enabling idempotent reprocessing and targeted deletion or merge operations (Chen et al., 16 May 2026).

The balancing invariant is explicit. For DT=(S1,S2,,ST),D_T = (S_1, S_2, \ldots, S_T),6 leaves and branching factor DT=(S1,S2,,ST),D_T = (S_1, S_2, \ldots, S_T),7, tree height is

DT=(S1,S2,,ST),D_T = (S_1, S_2, \ldots, S_T),8

Ablations reported for the system indicate that a moderate branching factor, approximately DT=(S1,S2,,ST),D_T = (S_1, S_2, \ldots, S_T),9 to St=(ut,1,,ut,nt).S_t = (u_{t,1}, \ldots, u_{t,n_t}).0, balances shallow trees and per-node summarization fidelity; too-large St=(ut,1,,ut,nt).S_t = (u_{t,1}, \ldots, u_{t,n_t}).1 weakens summaries, while too-small St=(ut,1,,ut,nt).S_t = (u_{t,1}, \ldots, u_{t,n_t}).2 deepens paths and accumulates cascade loss. The framework uses three principal tree families: session, entity, and scene (Chen et al., 16 May 2026).

3. Localized update algorithm and write-path complexity

The defining algorithmic claim of MemForest is that post-extraction maintenance is localized. New evidence is appended by attaching leaves according to time, marking only the corresponding leaf-to-root path as dirty, and regenerating summaries and embeddings only for dirty nodes during a later maintenance pass. The critical path after extraction is therefore St=(ut,1,,ut,nt).S_t = (u_{t,1}, \ldots, u_{t,n_t}).3 per touched scope rather than a rewrite proportional to the total accumulated scope state (Chen et al., 16 May 2026).

The update workflow is specified by the Local MemTree Update procedure. Routed records are first grouped by tree. For each record, a leaf is created, attached and rebalanced at the appropriate temporal location, the placement map is updated, and dirty ancestors are marked. Dirty nodes are then collected by level. A bottom-up flush summarizes leaves and internal nodes differently depending on tree type: entity and scene leaves use passthrough over payloads, session leaves use cell summarization, and internal nodes summarize children. Affected index nodes are re-embedded in parallel, and NodeIndex and RootIndex are refreshed for changed nodes (Chen et al., 16 May 2026).

Two forms of parallelism are fundamental. First, chunk extraction is parallel across short two-turn chunks, replacing a single long LLM pass. Second, maintenance is level-parallel: distinct dirty nodes at the same level, and nodes in different scopes, can be processed concurrently. Dirty-path refresh also coalesces repeated marks, reducing redundant work when multiple writes affect overlapping ancestor paths (Chen et al., 16 May 2026).

Complexity is stated at both scope and batch level. For a balanced St=(ut,1,,ut,nt).S_t = (u_{t,1}, \ldots, u_{t,n_t}).4-ary tree, a single insertion marks one root path dirty, so the dependent path length is St=(ut,1,,ut,nt).S_t = (u_{t,1}, \ldots, u_{t,n_t}).5. For a batch of St=(ut,1,,ut,nt).S_t = (u_{t,1}, \ldots, u_{t,n_t}).6 routed records into the same scope, total touched nodes are St=(ut,1,,ut,nt).S_t = (u_{t,1}, \ldots, u_{t,n_t}).7, while wall-clock time remains bounded by the deepest path because repeated ancestor refreshes are coalesced and same-level work is parallelized. Retrieval, by contrast, is not on the write path and is handled by a separate recall-and-browse procedure (Chen et al., 16 May 2026).

This update design also motivates the system's decoupling thesis. Construction uses many short, parallel extractions and a canonical fact layer rather than a monolithic generated profile. A plausible implication is that MemForest treats memory freshness as a systems problem involving concurrency, locality, and index maintenance, not only as a prompting problem.

4. Retrieval semantics and temporal browsing

MemForest retrieval is hierarchical. At the forest level, recall combines two sources: root-summary similarity and fact-to-tree similarity. Root recall retrieves trees by comparing the query to root summaries; fact-to-tree recall retrieves atomic facts by embedding similarity and then maps those facts back to the trees that own them. The candidate set is ranked as

St=(ut,1,,ut,nt).S_t = (u_{t,1}, \ldots, u_{t,n_t}).8

where the score combines root similarity with the best matched fact similarity from the same tree (Chen et al., 16 May 2026).

After forest-level recall, retrieval proceeds by tree browse. The system starts at the root of each recalled tree and descends toward child intervals. Two browse modes are described. In a low-latency mode, branch selection is embedding-only and operates over child summaries. In a higher-accuracy mode, branch selection is LLM-guided and can be augmented with a planner that generates per-tree subqueries from root summaries. Browsing stops at leaf granularity, after which leaf evidence is mapped back to canonical facts for entity and scene trees or to original dialogue cells for session trees (Chen et al., 16 May 2026).

This design is intended to preserve chronology during retrieval. A common misconception would be to regard MemForest as a conventional vector store with a hierarchical wrapper. The framework instead uses temporal ordering at the leaf level and interval summaries at internal nodes, so the browse process is meant to navigate historical evolution rather than retrieve isolated semantically similar snippets. The session tree is retained as a high-fidelity fallback, while structured entity and scene views can be sufficient for top performance in retrieval diagnostics (Chen et al., 16 May 2026).

The system exposes an explicit latency-accuracy trade-off. On LongMemEval-S, planner-guided browse yields the strongest retrieval diagnostic numbers, while embedding-only browse lowers total query time. At 30B, MemForest reports St=(ut,1,,ut,nt).S_t = (u_{t,1}, \ldots, u_{t,n_t}).9 s total query time for planner-guided browse, with σ\sigma0 s retrieval and σ\sigma1 s answer generation; embedding-only browse reports σ\sigma2 s total, with σ\sigma3 s retrieval and σ\sigma4 s answer generation. At 4B, the corresponding totals are σ\sigma5 s and σ\sigma6 s (Chen et al., 16 May 2026).

5. Empirical results, ablations, and limitations

MemForest is evaluated on LongMemEval-S and LoCoMo. On LongMemEval-S, which uses σ\sigma7 question-specific memory instances and reports pass@1, MemForest reaches σ\sigma8 with the 30B backbone and σ\sigma9 with the 4B backbone, described as the best overall performance among stateful baselines. The embedding-only browse variant attains Eσ=(eσ,1,eσ,2,,eσ,mσ),E_\sigma = (e_{\sigma,1}, e_{\sigma,2}, \ldots, e_{\sigma,m_\sigma}),0 and Eσ=(eσ,1,eσ,2,,eσ,mσ),E_\sigma = (e_{\sigma,1}, e_{\sigma,2}, \ldots, e_{\sigma,m_\sigma}),1, respectively. Comparator results reported in the same evaluation include EverMemOS at Eσ=(eσ,1,eσ,2,,eσ,mσ),E_\sigma = (e_{\sigma,1}, e_{\sigma,2}, \ldots, e_{\sigma,m_\sigma}),2 and Eσ=(eσ,1,eσ,2,,eσ,mσ),E_\sigma = (e_{\sigma,1}, e_{\sigma,2}, \ldots, e_{\sigma,m_\sigma}),3, LightMem at Eσ=(eσ,1,eσ,2,,eσ,mσ),E_\sigma = (e_{\sigma,1}, e_{\sigma,2}, \ldots, e_{\sigma,m_\sigma}),4 and Eσ=(eσ,1,eσ,2,,eσ,mσ),E_\sigma = (e_{\sigma,1}, e_{\sigma,2}, \ldots, e_{\sigma,m_\sigma}),5, MemoryOS at Eσ=(eσ,1,eσ,2,,eσ,mσ),E_\sigma = (e_{\sigma,1}, e_{\sigma,2}, \ldots, e_{\sigma,m_\sigma}),6 and Eσ=(eσ,1,eσ,2,,eσ,mσ),E_\sigma = (e_{\sigma,1}, e_{\sigma,2}, \ldots, e_{\sigma,m_\sigma}),7, MemPalace at Eσ=(eσ,1,eσ,2,,eσ,mσ),E_\sigma = (e_{\sigma,1}, e_{\sigma,2}, \ldots, e_{\sigma,m_\sigma}),8 and Eσ=(eσ,1,eσ,2,,eσ,mσ),E_\sigma = (e_{\sigma,1}, e_{\sigma,2}, \ldots, e_{\sigma,m_\sigma}),9, and Mem0 at EσEσΔEσE_\sigma \leftarrow E_\sigma \oplus \Delta E_\sigma0 and EσEσΔEσE_\sigma \leftarrow E_\sigma \oplus \Delta E_\sigma1. Category-wise, MemForest is described as particularly strong on multi-session and temporal-reasoning tasks (Chen et al., 16 May 2026).

On LoCoMo, which contains EσEσΔEσE_\sigma \leftarrow E_\sigma \oplus \Delta E_\sigma2 long multi-session dialogues and EσEσΔEσE_\sigma \leftarrow E_\sigma \oplus \Delta E_\sigma3 questions, MemForest reports EσEσΔEσE_\sigma \leftarrow E_\sigma \oplus \Delta E_\sigma4 pass@1 at 30B and EσEσΔEσE_\sigma \leftarrow E_\sigma \oplus \Delta E_\sigma5 at 4B. These numbers are characterized as competitive second overall behind EverMemOS, which reports EσEσΔEσE_\sigma \leftarrow E_\sigma \oplus \Delta E_\sigma6 and EσEσΔEσE_\sigma \leftarrow E_\sigma \oplus \Delta E_\sigma7. MemForest is strongest on open-ended questions for both model sizes and on single-hop at 30B, whereas EverMemOS remains strongest on multi-hop and temporal questions. Adversarial questions remain more challenging for MemForest (Chen et al., 16 May 2026).

The framework also emphasizes write-path efficiency. On LongMemEval-S, memory construction time per question is reported as EσEσΔEσE_\sigma \leftarrow E_\sigma \oplus \Delta E_\sigma8 s at 30B and EσEσΔEσE_\sigma \leftarrow E_\sigma \oplus \Delta E_\sigma9 s at 4B for MemForest, compared with sσ(i)=Update(sσ(i1),ΔEσ(i)).s_{\sigma}^{(i)} = Update(s_{\sigma}^{(i-1)}, \Delta E_{\sigma}^{(i)}).0 s and sσ(i)=Update(sσ(i1),ΔEσ(i)).s_{\sigma}^{(i)} = Update(s_{\sigma}^{(i-1)}, \Delta E_{\sigma}^{(i)}).1 s for EverMemOS and sσ(i)=Update(sσ(i1),ΔEσ(i)).s_{\sigma}^{(i)} = Update(s_{\sigma}^{(i-1)}, \Delta E_{\sigma}^{(i)}).2 s and sσ(i)=Update(sσ(i1),ΔEσ(i)).s_{\sigma}^{(i)} = Update(s_{\sigma}^{(i-1)}, \Delta E_{\sigma}^{(i)}).3 s for MemoryOS. The abstract summarizes this as a memory construction throughput approximately sσ(i)=Update(sσ(i1),ΔEσ(i)).s_{\sigma}^{(i)} = Update(s_{\sigma}^{(i-1)}, \Delta E_{\sigma}^{(i)}).4 higher than state-of-the-art approaches including EverMemOS. Token counts are also reported: MemForest uses sσ(i)=Update(sσ(i1),ΔEσ(i)).s_{\sigma}^{(i)} = Update(s_{\sigma}^{(i-1)}, \Delta E_{\sigma}^{(i)}).5M tokens at 30B and sσ(i)=Update(sσ(i1),ΔEσ(i)).s_{\sigma}^{(i)} = Update(s_{\sigma}^{(i-1)}, \Delta E_{\sigma}^{(i)}).6M at 4B, higher than Mem0 and MemoryOS, which the paper attributes to many short calls that are amenable to prefix-caching (Chen et al., 16 May 2026).

Ablations attribute the observed performance to three main design choices: lazy dirty-path refresh instead of eager per-insert regeneration, level-parallel flush, and moderate branching factors. Retrieval diagnostics on a sσ(i)=Update(sσ(i1),ΔEσ(i)).s_{\sigma}^{(i)} = Update(s_{\sigma}^{(i-1)}, \Delta E_{\sigma}^{(i)}).7-question subset report pass@8 values of sσ(i)=Update(sσ(i1),ΔEσ(i)).s_{\sigma}^{(i)} = Update(s_{\sigma}^{(i-1)}, \Delta E_{\sigma}^{(i)}).8 for embedding-only browse, sσ(i)=Update(sσ(i1),ΔEσ(i)).s_{\sigma}^{(i)} = Update(s_{\sigma}^{(i-1)}, \Delta E_{\sigma}^{(i)}).9 for LLM browse, and sσ(i1)|s_{\sigma}^{(i-1)}|0 for LLM+planner. Tree-family ablations report sσ(i1)|s_{\sigma}^{(i-1)}|1 for entity+scene+session and sσ(i1)|s_{\sigma}^{(i-1)}|2 for entity+scene, suggesting that structured entity and scene views can suffice in many cases, while session trees remain useful as a fallback (Chen et al., 16 May 2026).

The limitations are correspondingly specific. MemTree focuses on temporal organization inside a scope, so non-temporal relations and complex cross-scope joins remain challenging. The LoCoMo multi-hop gap relative to EverMemOS is presented as evidence of that limitation. Additional issues include adversarial robustness, summarization drift at extreme branching factors, memory growth in facts plus trees plus derived artifacts, possible contention in large-scale concurrent deployments, and dependence on planner-guided LLM browse for the highest-accuracy retrieval mode (Chen et al., 16 May 2026).

6. Naming, scope, and other uses of “MemForest”

In the strict bibliographic sense, the paper that actually uses the title "MemForest" is the 2026 agent memory framework described above (Chen et al., 16 May 2026). However, the term has also been used informally in adjacent literatures to denote memory-centric forest methods, which can create ambiguity.

One such usage appears in work on memory-constrained online decision forests. Khannouz and Glatard study a memory-bounded Mondrian forest under a fixed node budget and show that increasing ensemble size can degrade performance because the shared node pool forces trees to become shallow; they propose dynamic ensemble size adjustment based on an overfitting estimate derived from prequential and postquential accuracy (Khannouz et al., 2022). In that framing, "MemForest" denotes a forest classifier adapted to strict memory budgets rather than an LLM agent memory substrate.

A second usage concerns inference-time memory layout. "Forest Packing: Fast, Parallel Decision Forests" reorganizes trained decision forests to reduce cache misses by hierarchical memory packing, inter-tree binning, statistical depth-first ordering, software prefetching, and round-robin traversal. The summary explicitly characterizes Forest Packing as a concrete MemForest design in the sense of a memory-optimized inference system for decision forests (Browne et al., 2018). Here, the term refers to cache-aware execution rather than persistent episodic memory.

A third, looser usage appears in nonparametric graphical models. "Learning Nonparametric Forest Graphical Models with Prior Information" introduces a Bayesian reformulation of forest density estimation with graph priors, including SF-FDE for scale-free forests and J-FDE for joint learning of multiple forests with shared structure. The source summary notes that the paper itself does not use the name "MemForest"; if the label is interpreted as "forests with memory/prior," the closest mapping is this Bayesian FDE framework with graph priors (Zhu et al., 2015).

These cases suggest that "MemForest" is polysemous across subfields. In agent systems, it denotes a hierarchical temporal memory framework centered on MemTree and localized updates. In streaming decision forests, it can denote a memory-budgeted Mondrian ensemble. In systems work on decision forest inference, it can denote memory-centric layout optimization. In statistical graphical modeling, it may be used only as an informal shorthand for forests that encode structural prior information.

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to MemForest.