Dual-Layer Agentic Memory with Fast Write Routing and Slow Consolidation

AuthorsWenzhi Li, Dong Nie, Rui Lan et al.

arXiv 20262026

TL;DR

Dual-Layer Agentic Memory uses a small-to-large write router plus slow parametric consolidation to prune 68% redundant memory while retaining 98.3% QA EM of Full Store.

SharePost on XLinkedIn

Read our summary here, or open the publisher PDF on the next tab.

THE PROBLEM

External Memory Bloat and Costly Retrieval

Existing agent memories treat external memory as a monotonically growing repository, causing memory bloat and degraded retrieval precision over time.

In long-horizon LLM agents, this leads to noisy retrieval, higher latency, and rising compute costs, even when many stored facts are redundant or already in parametric memory.

HOW IT WORKS

Dual-Layer Agentic Memory Lifecycle

Dual-Layer Agentic Memory introduces an operational memory taxonomy, fast write router, small-to-large cost-aware routing cascade, and write-back consolidation to manage what gets stored and internalized.

Conceptually, Dual-Layer Agentic Memory mirrors a hippocampus–neocortex system: external memory E acts as a fast editable buffer, while parametric memory Θ is a slower, stable substrate.

This dual-layer design lets Dual-Layer Agentic Memory selectively externalize high-value facts and later internalize them via supervised fine-tuning, avoiding permanent dumps that a plain context window cannot manage.

DIAGRAM

Fast Write Routing and Escalation Flow

This diagram shows how Dual-Layer Agentic Memory routes each incoming fact through the small-to-large cascade and decides whether to write or discard.

DIAGRAM

Streaming Benchmark and Evaluation Pipeline

This diagram shows how Dual-Layer Agentic Memory is evaluated on the online streaming ZsRE benchmark with write-time admission and downstream QA.

PROCESS

How Dual-Layer Agentic Memory Handles the Knowledge Lifecycle

  1. 01

    Operational Memory Taxonomy

    Dual-Layer Agentic Memory first labels each fact as non-write, write-new, or write-update by comparing zero-shot and memory-supported answers, defining admission targets for the fast write router.

  2. 02

    Small-to-Large Cost-Aware Write Routing

    Dual-Layer Agentic Memory uses the small-to-large routing cascade with qwen3-1.7B and qwen3-8B plus an escalation gate trained on reward differences to decide write versus discard.

  3. 03

    Online Streaming Knowledge Lifecycle Benchmark

    Dual-Layer Agentic Memory processes 300 episodes with 500 turns and 100 fact injections per episode, making write-time decisions before queries and then answering downstream QA with or without external memory.

  4. 04

    Write-Back as Slow Consolidation

    Dual-Layer Agentic Memory periodically converts write-new and write-update facts into supervised fine-tuning examples, validates internalization with factual probes, and evicts consolidated facts from external memory.

KEY CONTRIBUTIONS

Key Contributions

  • 01

    Dual-Layer Knowledge Lifecycle System

    Dual-Layer Agentic Memory unifies parametric memory Θ, external memory E, fast write routing, and slow write-back consolidation into a single lifecycle, evaluated on 300 streaming episodes with 500 turns each.

  • 02

    Operational Memory Taxonomy and Cascade Router

    Dual-Layer Agentic Memory introduces the non-write, write-new, write-update taxonomy and a cost-aware small-to-large routing cascade that prunes up to 68% redundant external memory while escalating fewer than 50% of inputs.

  • 03

    Periodic Write-Back and Epistemic Shift Analysis

    Dual-Layer Agentic Memory uses supervised fine-tuning to internalize external knowledge, achieving 10,683 facts transitioning to non-write and analyzing 1,752 cases of parametric interference in the label transition matrix.

RESULTS

By the Numbers

QA EM

86.35%

+-1.44 over Full Store

Tok. F1

0.8846

vs Full Store 0.8980

Store

77.00%

9.00pp less storage than Full Store 100.0%

Routing Cost

Fwd1.7B+39.7% Fwd8B

reduces 8B forward passes compared to 1 × Fwd8B baselines

On the dynamic online ZsRE streaming benchmark, Dual-Layer Agentic Memory’s Write Router traces the EM–storage–compute Pareto frontier. The main result shows that Dual-Layer Agentic Memory retains over 98.3% of Full Store QA EM while substantially reducing external memory and large-model routing compute.

BENCHMARK

By the Numbers

On the dynamic online ZsRE streaming benchmark, Dual-Layer Agentic Memory’s Write Router traces the EM–storage–compute Pareto frontier. The main result shows that Dual-Layer Agentic Memory retains over 98.3% of Full Store QA EM while substantially reducing external memory and large-model routing compute.

BENCHMARK

End-to-End Results on the Dynamic Online Benchmark

QA EM comparison for base-model policies on the streaming ZsRE benchmark.

KEY INSIGHT

The Counterintuitive Finding

Dual-Layer Agentic Memory’s Write RouterSFT achieves 90.71% QA EM with only 47.85% storage, retaining over 98.2% of the Full Store upper bound at 92.29%.

This is surprising because conventional wisdom suggests exhaustive retention is necessary for high QA accuracy, yet Dual-Layer Agentic Memory shows that aggressive pruning plus consolidation barely reduces EM.

WHY IT MATTERS

What this unlocks for the field

Dual-Layer Agentic Memory enables agents to treat memory as a lifecycle, selectively externalizing and later internalizing knowledge while balancing accuracy, storage, and compute.

Builders can now deploy long-horizon LLM agents that avoid unbounded memory growth, maintain near-optimal QA performance, and adapt their epistemic boundaries over time without relying solely on retrieval.

~12 min read← Back to papers

Related papers

BenchmarkAgent Memory

Active Context Compression: Autonomous Memory Management in LLM Agents

Nikhil Verma

· 2026

Focus Agent adds start_focus, complete_focus, a persistent Knowledge block, and an optimized Persistent Bash plus String-Replace Editor scaffold to actively compress context during long software-engineering tasks. On five hard SWE-bench Lite instances against a Baseline ReAct agent, Focus Agent achieves 22.7% token reduction (14.9M → 11.5M) while matching 3/5 = 60% task success.

Agent Memory

ActMem: Bridging the Gap Between Memory Retrieval and Reasoning in LLM Agents

Xiaohui Zhang, Zequn Sun et al.

· 2026

ActMem transforms dialogue history into atomic facts via Memory Fact Extraction, groups them with Fact Clustering, links them through a Memory KG Construction module, and uses Counterfactual-based Retrieval and Reasoning for action-aware answers. On ActMemEval, ActMem reaches 76.52% QA accuracy with DeepSeek-V3, beating LightMem’s 63.97% by 12.55 points and NaiveRAG’s 61.54%.

Questions about this paper?

Paper: Dual-Layer Agentic Memory with Fast Write Routing and Slow Consolidation

Answers use this explainer on Memory Papers.

Checking…