Dual-Layer Agentic Memory with Fast Write Routing and Slow Consolidation
Inspired by neuroscience's Complementary Learning Systems theory, this paper proposes Dual-Layer Agentic Memory, a framework that optimizes agent memory by using a cost-aware model cascade to selectively route and prune incoming information for external storage, followed by periodic parametric consolidation to internalize high-value knowledge, thereby maintaining high retrieval accuracy while significantly reducing redundant storage and computational costs.
Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer
In the world of artificial intelligence, large language models are like vast libraries of human knowledge, but they have a significant limitation: they cannot easily remember new things that happen after they are built. When these models are used as assistants in dynamic environments—such as long conversations, research projects, or personal planning—they encounter a constant stream of new information. Some of this information is already known to the model, some is entirely new, and some contradicts what the model previously believed. Traditional systems handle this by simply saving every new fact into an external database, much like a notebook that never gets thrown away. Over time, this notebook becomes so full of redundant and outdated notes that finding the right information becomes slow, noisy, and inefficient. The core challenge, therefore, is not just about storing information, but about deciding what to keep, what to discard, and when to permanently learn something so it no longer needs to be looked up.
A team of researchers has proposed a new way to manage this flow of knowledge, inspired by how the human brain handles memory. They suggest that instead of treating memory as a single, growing pile of data, it should be viewed as a lifecycle with two distinct stages: a fast, temporary holding area and a slow, permanent learning phase. This approach, called Dual-Layer Agentic Memory, mimics the biological relationship between the hippocampus, which quickly records new experiences, and the neocortex, which slowly integrates stable knowledge over time. In their system, the "fast" layer acts as a temporary buffer for new or conflicting facts, while the "slow" layer involves the model actually learning these facts so they become part of its permanent understanding. The goal is to prevent the external notebook from becoming bloated while ensuring the model becomes smarter and more self-reliant over time.
The researchers built a system that makes decisions about incoming information the moment it arrives, rather than waiting until a question is asked. When a new fact enters the system, it is immediately evaluated to determine its fate. The system classifies the information into three categories: facts the model already knows perfectly, facts the model does not know at all, and facts the model knows incorrectly or has outdated information about. Instead of saving everything, the system uses a smart filter to decide what is worth storing. This filter works like a two-tiered screening process. A smaller, faster, and less expensive version of the model checks the incoming information first. If the fact is clearly something the model already knows or clearly something it should ignore, the small model makes the decision instantly. Only when the fact is ambiguous or difficult to judge does the system pass it to a larger, more powerful model for a final verdict. This "small-to-large" cascade ensures that the system does not waste computing power on easy decisions, while still maintaining high accuracy for complex ones.
Once the system decides to keep a piece of information, it stores it in the external memory. However, this is not the end of the process. The researchers introduced a second phase called "consolidation," which happens periodically. During this phase, the system reviews the high-value facts it has stored and uses them to retrain the model. This is similar to how a student might review notes before an exam to move information from short-term to long-term memory. By training the model on these selected facts, the model learns them permanently. As a result, the model no longer needs to look up these facts in the external notebook; it can answer them directly from its own internal knowledge. This creates a feedback loop: as the model learns more, it needs to store less, and the external memory remains compact and efficient.
The results of this approach were tested in a simulated environment where the agent had to manage a continuous stream of new facts and answer questions over time. The researchers found that their system could prune away up to 68% of the redundant information that would normally be saved in a traditional system. Despite storing far less data, the system maintained over 98% of the accuracy that would be achieved if it had saved every single piece of information. The use of the two-tiered filter also significantly reduced the computing cost, as the larger, more expensive model was only consulted for about 40% of the incoming facts. Furthermore, the consolidation phase proved effective at internalizing knowledge. After the model was retrained on the stored facts, it could answer questions without needing to search the external memory, and the system automatically stopped trying to save those same facts again.
However, the study also revealed a critical reason why the dual-layer design is necessary. When the model learns new information through this retraining process, it occasionally disrupts its existing knowledge, causing it to forget or confuse facts it previously knew well. This phenomenon, known as catastrophic forgetting, means that the model cannot simply overwrite its old memories with new ones without risk. The external memory layer serves as a safety net in this scenario. If the model makes a mistake after learning something new, the external memory can still provide the correct information to fix the error. This dynamic balance allows the agent to continuously learn and adapt without losing its ability to reason correctly. The researchers demonstrated that by combining fast, selective storage with slow, selective learning, they created a memory system that is both efficient and robust, capable of handling the evolving nature of real-world information without becoming overwhelmed.
This work suggests a shift in how we think about artificial intelligence memory. Rather than viewing memory as a static archive that grows indefinitely, it is more effective to view it as a dynamic process of selection and integration. The system does not just store data; it manages the lifecycle of knowledge, deciding what is temporary and what is permanent. By mimicking the biological principles of fast recording and slow consolidation, the researchers have created a framework that keeps the agent's memory lean and its reasoning sharp. The findings indicate that for AI agents to operate effectively in the long term, they must be able to forget the trivial, learn the important, and constantly update their understanding of the world without losing their way. This approach offers a promising path forward for building assistants that can truly learn and grow alongside their users.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.