MRAgent: dynamic memory for AI agents reduces tokens by 97%
Researchers at the National University of Singapore present a framework that actively reconstructs memory, overcoming context limitations in long-horizon tasks.
June 27, 2026 · 4 min read
TL;DR: MRAgent, an active memory framework for AI agents, consumes only 118K tokens per query versus 3.26M for LangMem, reducing costs and improving accuracy in long-horizon tasks.
What happened?
Researchers at the National University of Singapore have introduced MRAgent (Memory Reasoning Architecture for LLM Agents), a new memory management framework for artificial intelligence agents. Published on arXiv (ID 2606.06036), the system abandons the static "retrieve then reason" approach in favor of an active memory reconstruction process inspired by cognitive neuroscience. According to VentureBeat, MRAgent consumes only 118,000 tokens per query, compared to 3.26 million for LangMem, a comparable framework from LangChain. This represents a 96.4% reduction in token usage, translating to significantly lower inference costs. The paper details that in long-horizon reasoning tasks, MRAgent achieves comparable or superior accuracy to traditional methods at a fraction of the computational cost.
Why is it important?
Current AI agents face a critical bottleneck: the context limits of language models. In long-horizon tasks, such as personal assistants or technical support systems, passive retrieval pipelines fill the context window with irrelevant noise. VentureBeat notes that these systems cannot revise their retrieval strategy mid-reasoning; if an agent retrieves a document and discovers a crucial clue is missing (a specific date or person), it has no way to issue a new query based on that finding. Additionally, fixed similarity scores and predefined graph expansions return superficial matches that flood the context with noise, degrading reasoning. MRAgent solves this by integrating memory reconstruction into the LLM's reasoning process, enabling iterative searches and dynamic refinement. This not only reduces computational costs but also improves accuracy by avoiding context contamination. In comparison, LangMem from LangChain consumes 3.26 million tokens per query, while MemGPT and Generative Agents also manage memory but at higher computational cost. MRAgent stands out for its efficiency and scalability, though it is still academic research.
How does it work?
MRAgent organizes memory into a three-level associative graph: Cues (fine-grained keywords like entities or attributes), Content (actual memory units, divided into episodic and semantic memory), and Tags (semantic bridges linking Cues and Content). During execution, the agent explores multiple retrieval paths, evaluates intermediate evidence, and optimizes the search step by step. This active process avoids information overload and allows access to deeply buried data. The paper describes that the system starts with small, specific triggers from the user prompt (such as a name, action, or place). These point to connected concepts or categories rather than massive text blocks. Following these metadata stepping stones, the agent gathers small pieces of evidence one by one, using each new piece of information to guide the next step until the complete memory is reconstructed. This approach is inspired by cognitive neuroscience, where recall unfolds sequentially rather than operating as a passive read from a static database.
Comparison with other solutions
LangMem, from LangChain, follows a passive retrieval approach consuming 3.26M tokens per query. Other frameworks like MemGPT or Generative Agents also manage memory but at higher computational cost. MRAgent stands out for its efficiency and scalability, though it is still academic research and not production-ready. Experts note that implementation in real-world environments will require adaptations. For example, integration with existing frameworks like LangChain or AutoGPT could be complex due to architectural differences. Additionally, performance in scenarios with millions of concurrent users has not yet been evaluated. However, the paper shows that MRAgent outperforms baseline methods in tasks such as object tracking in the VirtualHome environment and long-duration question answering. Specifically, it achieves 85% accuracy in temporal reasoning tasks, compared to 72% for LangMem.
Consequences and outlook
If MRAgent becomes established, it could democratize the use of AI agents in applications requiring long-term memory, such as virtual assistants, customer support, or document analysis. Companies could significantly reduce inference costs. For example, a technical support company handling millions of daily queries could save millions of dollars annually in API costs. Additionally, token reduction implies lower latency, improving user experience. However, it remains to be seen how it performs in scenarios with millions of concurrent users. The AI community is watching with interest, as this approach could redefine memory architecture in agents. If widely adopted, it could accelerate the development of truly contextual personal assistants capable of remembering past interactions without overwhelming context. It could also influence the design of future language models, which might incorporate similar memory mechanisms at the architectural level.
What readers should know
- MRAgent reduces tokens by 97% compared to LangMem, according to VentureBeat.
- It is based on an arXiv paper (2606.06036) from the National University of Singapore.
- It is not a commercial product but a research proposal.
- Its Cue-Tag-Content mechanism enables efficient associative searches.
- It could influence future developments of frameworks like LangChain or AutoGPT.
- The paper reports 85% accuracy in temporal reasoning tasks, outperforming LangMem (72%).
- The inspiration from cognitive neuroscience suggests future architectures may more closely mimic human memory.