MRAgent cuts long-horizon prompts to 118K tokens, beating LangMem’s 3.26M
A new Cue-Tag-Content memory framework tackles the real agent problem: retrieval noise that swamps context windows.

Researchers at the National University of Singapore built MRAgent, a multi-step agentic memory reconstruction framework for LLM agents. It slashes prompt tokens to 118K per sample in LongMemEval, versus LangMem’s 3.26M, and halves runtime in benchmarks.
If you are building AI agents, you already know the pain: long-horizon tasks chew up context windows and retrieval pipelines often feed the model noise, not signal. MRAgent, a framework from researchers at the National University of Singapore, tries to fix that at the source, not with tweaks to “retrieve-then-reason,” but by changing how memory gets assembled while the agent is thinking.
On the enterprise metric that actually gets attention, MRAgent used just 118K prompt tokens per sample in the LongMemEval tests. For comparison, A-Mem consumed 632K tokens, and LangMem burned through 3.26 million tokens per query. That is a brutal efficiency gap, and it matters because token spend and runtime latency are the two levers that determine whether agentic features stay a demo or survive procurement.
So what is the core weakness MRAgent is targeting? Classic retrieval pipelines typically pull documents via vector search or graph traversal and then hand that bundle to an LLM to reason over. The problem is “passive” retrieval: once the agent has retrieved something, it cannot revise its retrieval strategy mid-reasoning. If it fetches a document and later realizes a crucial missing cue, like a specific date or person, the system is stuck. Fixed similarity scores and predefined graph expansions tend to return surface-level matches that flood the LLM’s context with irrelevant material. The more irrelevant material you stuff in, the more you degrade reasoning.
MRAgent’s pitch is to move away from passive read-out behavior and toward “active and associative reconstruction,” a concept inspired by cognitive neuroscience. Practically, that means memory recall unfolds sequentially, driven by what the agent has already learned, instead of acting like a static dump of documents. The system starts with small, specific triggers from the user’s prompt, such as an entity name, an action, or a place. Those hints act like stepping stones to connecting concepts or categories, rather than forcing the model to swallow massive blocks of text. As each piece of evidence arrives, the agent uses it to guide the next retrieval step. Think of it as researching in rounds: pull one lead, update the question, pull the next lead, prune what is no longer useful.
How does the framework do this inside an LLM agent? MRAgent, short for Memory Reasoning Architecture for LLM Agents, treats memory as an interactive environment. When a query comes in, the agent uses the backbone LLM’s reasoning to explore multiple candidate retrieval paths across a structured memory graph. At each step, the LLM evaluates intermediate evidence, iteratively optimizes its search, infers new search constraints, pursues the paths with the best information, and prunes irrelevant branches. The goal is simple: retrieve deeply buried information without filling the LLM’s context with noise.
To make that active exploration computationally efficient, the system organizes its database using a “Cue-Tag-Content” mechanism. This is a multi-layer associative graph with three node types: Cues, which are fine-grained keywords such as extracted entities or contextual attributes; Content, which are the stored memory units divided into multi-granular layers like episodic memory for concrete events and semantic memory for stable facts and user preferences; and Tags, which are semantic bridges summarizing relational associations between specific Cues and Content. The design supports a two-stage retrieval process. First, the LLM navigates from Cues to candidate Tags. Then it evaluates short tag summaries to judge relevance, identifies promising traversal paths, discards irrelevant branches, and only then spends compute and prompt tokens on the heavy underlying Content.
The source gives a concrete example: a user asks, “How did Nate use the prize money when he won his third video game tournament?” MRAgent extracts starting cues like “Nate,” “video game tournament,” and “win.” It maps those cues to the memory graph and looks at associative Tags connected to them. Seeing tags like “Tournament Victory” and “Tournament Participation,” it drops participation because the query is about what happened after winning. It retrieves episodic content tied to the chosen Cue-Tag pair, retrieving three distinct memory episodes where Nate won a tournament. It then decides which episode is relevant, discards the other two, updates its cues with new information (like “tournament earnings”), and repeats the cycle until it can answer something like “Nate saved the money.”
On benchmark performance, MRAgent was tested alongside other frameworks addressing agentic memory building: A-MEM and MemoryOS. It was also compared to persistent memory frameworks including LangMem and Mem0. The evaluation ran on the LoCoMo and LongMemEval industry benchmarks, which test long-horizon tasks and conversations across dozens of sessions and hundreds of turns. The backbone models used were Gemini 2.5 Flash and Claude Sonnet 4.5. MRAgent consistently outperformed every baseline across both models and all question types by a significant margin. But again, for enterprise developers, the critical question is often cost and latency, not just accuracy.
In LongMemEval, MRAgent slashed prompt token consumption to 118K per sample. A-Mem consumed 632K tokens, and LangMem consumed 3.26 million tokens per query. The framework also effectively halved runtime compared to A-Mem, dropping from 1,122 seconds to 586 seconds. The efficiency seems to come from on-demand behavior: evaluating tags and pruning irrelevant paths before retrieving full content saves tokens and context space. The system also stops when it decides it has enough, by autonomously evaluating its accumulated context, avoiding redundant exploration.
One practical catch: developers cannot query the framework without preparing the Cue-Tag-Content structure. You still need to architect the underlying memory database so the LLM can navigate associative items and prune irrelevant branches without compute exploding. The researchers say developers do not have to manually label or structure the data. They built an automated distillation pipeline that uses LLMs to process raw interaction histories and populate the memory graph. Developers implement and orchestrate the automated ingestion pipeline that passes raw user interactions through prompt templates to extract metadata before storing it in a graph database. The authors emphasize this ingestion construction phase is lightweight and that they have released the code on GitHub.
For executives and investors, this is the part that lands: agentic memory is not just a research curiosity anymore, it is a cost curve. If MRAgent’s approach holds up in real deployments, it can materially change the economics of long-horizon agent products, where token burn and latency can otherwise bury unit economics. Boards that are currently treating “agentic” as a roadmap checkbox should pay attention, because the winners will be the systems that can reason across sessions without turning every query into a budget bonfire.
This story's Key Insights and Take-aways are locked.
Create a free account to unlock Executive Actions for one credit.
Register to UnlockAlways free for Executives Club members. Join the Club
More in Science
St. Jude reveals RNA regulation lets S. pneumoniae enter antibiotic-tolerant survival mode
A new Cell Host & Microbe study shows how hidden RNA controls help bacteria “pause” under antibiotics and immune pressure.
Genetics targets chestnut blight, aiming to bring back America’s iconic tree in Appalachia
A fungus from Asia nearly erased the American chestnut. New genetic approaches are now trying to restore it.

Mice survive 22,110 feet on frozen volcanoes by eating toxic plants
A July 9 Science study maps the genetic and physiological hacks that let Andean leaf-eared mice thrive where humans cannot.

