Researchers at the National University of Singapore have proposed MRAgent (Memory Reasoning Architecture for LLM Agents), a framework that replaces the static "retrieve-then-reason" pattern with an active, associative memory reconstruction embedded into the LLM's reasoning loop. The approach aims to avoid the common failure modes of passive retrieval pipelines, which quickly fill context windows with irrelevant material and cannot adapt retrieval strategies during multi-step reasoning.
Why passive retrieval fails on long horizons
Traditional retrieval pipelines fetch documents via vector search or graph traversal and hand them to an LLM for reasoning. The authors identify three main bottlenecks in this passive design:
- The system cannot revise its retrieval strategy mid-reasoning: if a retrieved document reveals a missing but crucial cue, the agent cannot issue a new targeted query based on that finding.
- Fixed similarity scores and predefined graph expansions return superficial matches that flood the model's context window with noise, degrading reasoning quality.
- Heavy reliance on pre-constructed structures such as top-k results and static relevance functions reduces flexibility needed to scale across unpredictable long-horizon interactions.
To address these problems, the researchers propose an "active and associative reconstruction" paradigm inspired by cognitive neuroscience: memory recall proceeds as a sequence of small, targeted steps starting from fine-grained cues (names, actions, places) that guide associative exploration rather than dumping large text blocks into the context.
How MRAgent performs active memory reconstruction
MRAgent treats memory as an interactive environment. For complex queries, the agent uses the backbone LLM to explore multiple candidate retrieval paths on a structured memory graph. At each step the LLM evaluates intermediate evidence, infers new search constraints, pursues the most informative paths, and prunes irrelevant branches. This iterative discovery lets the agent assemble buried information without filling the LLM's context with noise.
To make exploration computationally efficient, MRAgent organizes its database with a "Cue-Tag-Content" mechanism, a multi-layer associative graph with three node types:
- Cues: fine-grained keywords such as entities or contextual attributes extracted from user interactions.
- Tags: semantic bridges that summarize relation between Cues and Content.
- Content: the actual stored memory units, arranged at multiple granularities (episodic memories for concrete events, semantic memories for stable facts and preferences).
This design supports a two-stage retrieval flow: the LLM navigates from Cues to candidate Tags; because Tags expose semantic relationships and structural associations, the agent evaluates these compact summaries to decide which traversal paths merit retrieving full Content. This lets the agent discard irrelevant branches before spending compute and prompt tokens on heavy memory retrieval.
An example: for the query "How did Nate use the prize money when he won his third video game tournament?", MRAgent extracts cues such as "Nate", "video game tournament", and "win". It maps those cues into the memory graph and inspects connected Tags like "Tournament Victory" and "Tournament Participation". Focusing on the victory tag, it retrieves episodic Content linked to that Cue-Tag pair and selects the specific episode relevant to the question. The agent then updates cues (e.g., "tournament earnings") and continues discovery and pruning until it can answer, such as "Nate saved the money."
Performance on industry benchmarks
MRAgent was evaluated against other agentic memory frameworks including A-MEM, MemoryOS, LangMem, and Mem0 on the LoCoMo and LongMemEval benchmarks. These tests measure agents' ability to resolve queries across dozens of sessions and hundreds of dialogue turns. The backbone models used were Gemini 2.5 Flash and Claude Sonnet 4.5.
According to the reported results, MRAgent outperformed every baseline across both models and all question types by a significant margin. In terms of computational cost — a key metric for enterprise developers — MRAgent was markedly more efficient on LongMemEval: it reduced prompt token consumption to 118k tokens per sample, compared with 632k tokens for A-MEM and 3.26 million tokens for LangMem. Runtime was also substantially lower: MRAgent cut the A-MEM runtime roughly in half, from 1,122 seconds down to 586 seconds.
MRAgent's efficiency stems from its on-demand behavior: evaluating Tags and pruning irrelevant paths before retrieving heavy contents saves prompt tokens and context space. The agent also autonomously assesses accumulated context and decides when to stop searching, avoiding redundant exploration.
Implementation considerations for developers
Although effective, the Cue-Tag-Content structure must be constructed before queries can be answered. Developers need to design the memory database so the LLM can traverse associative items and prune irrelevant branches without exploding compute costs.
The authors note that manual labeling is not required: MRAgent includes an automated distillation pipeline that uses LLMs to process raw interaction histories and populate the memory graph. For implementers, the task is to set up and orchestrate this ingestion pipeline — a background job or streaming process that runs raw user interactions through prompt templates to extract metadata and store it in the graph database. The team emphasizes that this ingestion step is intentionally lightweight.
Access
The authors have released the code on GitHub, allowing developers to inspect the implementation and use it as a starting point for their own deployments.
This article summarizes the MRAgent approach and the reported benchmark results as presented by the National University of Singapore researchers.



