Dual-Layer Agentic Memory with Fast Write Routing and Slow Consolidation
cs.CL
Submitted: 2026-08-23
Updated: 2026-08-31
License: http://creativecommons.org/licenses/by/4.0/
The gist: Large language model (LLM) agents operate in dynamic environments where knowledge continuously evolves.
Terminology
Abstract
Large language model (LLM) agents operate in dynamic environments where knowledge continuously evolves. Existing memory systems typically treat external memory as a monotonically growing repository, inevitably leading to retrieval degradation and increasing computational costs over time. We argue that the core challenge is not retrieval alone, but managing the knowledge lifecycle: deciding what to externalize, update, or ultimately internalize. Inspired by Complementary Learning Systems (CLS) theory in neuroscience, we propose Dual-Layer Agentic Memory, a framework that shifts memory management to the write phase through cost-aware epistemic routing and periodic parametric consolidation. Incoming information is categorized as non-write, write-new, or write-update, and routed through a small-to-large model cascade that minimizes routing overhead while filtering redundant memories. A subsequent write-back phase selectively consolidates high-value external memories into model parameters via supervised fine-tuning. Experiments demonstrate the dual efficiency of our approach: a 1.7B/8B cascade prunes up to 68% of redundant external memory while escalating fewer than 50% of inputs, yet retains over 98% of the downstream QA Exact Match (EM) achieved by an exhaustive retention baseline. We further show that periodic consolidation successfully internalizes external knowledge, allowing the router to adaptively suppress redundant writes as the model's epistemic boundaries evolve. Overall, our framework presents a unified paradigm for agent memory: selective externalization followed by selective internalization. Code and dataset will be released upon acceptance.
Sources
- MemGPT: Towards LLMs as Operating Systems
- Mass-Editing Memory in a Transformer
- Continual Learning for Large Language Models: A Survey
- A-MEM: Agentic Memory for LLM Agents
- On the Structural Memory of LLM Agents
- Self-Routing RAG: Binding Selective Retrieval with Knowledge Verbalization
- AnyEdit: Edit Any Knowledge Encoded in Language Models
- Robust Knowledge Editing via Explicit Reasoning Chains for Distractor-Resilient Multi-Hop QA
- Qwen3 Technical Report
Related papers
- Exploring Solution Divergence and Its Effect on Large Language Model Problem Solving
- Ishigaki-IDS-Bench: A Benchmark for Generating Information Delivery Specification from BIM Information Requirements
- Subliminal Steering: Stronger Encoding of Hidden Signals
- MedStruct-S: A Benchmark for Key Discovery, Key-Conditioned QA and Semi-Structured Extraction from OCR Clinical Reports
- The End of Transformers? On Challenging Attention and the Rise of Sub-Quadratic Architectures
- Untangling the Mechanisms of Misleading Context in Medical Question Answering