MemForest: Efficient Agent Memory System
- 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 sessions, the processed prefix is
with each session written as
A temporal scope groups temporally ordered evidence,
where each item is temporally anchored by a timestamp or interval. The update problem is to make 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
That pattern serializes later writes behind earlier generated states and tends to scale with . 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 Davis 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 0 is partitioned into fixed-size chunks
1
where
2
The default choice is 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 4-ary tree materialized per scope 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 6 leaves and branching factor 7, tree height is
8
Ablations reported for the system indicate that a moderate branching factor, approximately 9 to 0, balances shallow trees and per-node summarization fidelity; too-large 1 weakens summaries, while too-small 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 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 4-ary tree, a single insertion marks one root path dirty, so the dependent path length is 5. For a batch of 6 routed records into the same scope, total touched nodes are 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
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 9 s total query time for planner-guided browse, with 0 s retrieval and 1 s answer generation; embedding-only browse reports 2 s total, with 3 s retrieval and 4 s answer generation. At 4B, the corresponding totals are 5 s and 6 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 7 question-specific memory instances and reports pass@1, MemForest reaches 8 with the 30B backbone and 9 with the 4B backbone, described as the best overall performance among stateful baselines. The embedding-only browse variant attains 0 and 1, respectively. Comparator results reported in the same evaluation include EverMemOS at 2 and 3, LightMem at 4 and 5, MemoryOS at 6 and 7, MemPalace at 8 and 9, and Mem0 at 0 and 1. 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 2 long multi-session dialogues and 3 questions, MemForest reports 4 pass@1 at 30B and 5 at 4B. These numbers are characterized as competitive second overall behind EverMemOS, which reports 6 and 7. 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 8 s at 30B and 9 s at 4B for MemForest, compared with 0 s and 1 s for EverMemOS and 2 s and 3 s for MemoryOS. The abstract summarizes this as a memory construction throughput approximately 4 higher than state-of-the-art approaches including EverMemOS. Token counts are also reported: MemForest uses 5M tokens at 30B and 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 7-question subset report pass@8 values of 8 for embedding-only browse, 9 for LLM browse, and 0 for LLM+planner. Tree-family ablations report 1 for entity+scene+session and 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.