3.26 million prompt tokens per query is the kind of number that turns agent memory from an architecture problem into an operating-cost problem, and MRAgent claims to cut that burden to 118k tokens per LongMemEval sample.

MRAgent Slashes AI Memory Costs as LangMem Burns Cash
XOOMAR Intelligence
Analyst Take
Researchers at the National University of Singapore developed MRAgent, short for Memory Reasoning Architecture for LLM Agents, to fix a basic flaw in long-horizon AI agents: they keep retrieving too much memory and reasoning too late, according to VentureBeat.
The important shift is simple. MRAgent doesn’t treat memory as a pile of documents to dump into context. It treats memory as something the model actively reconstructs, step by step, while it reasons.
Why should AI developers care that MRAgent uses 118K tokens while LangMem uses 3.26M?
The headline number matters because long-horizon agents can quietly become token furnaces. Every extra retrieval step can pull more text into the prompt. Every vaguely relevant memory competes for context. Every unnecessary branch adds runtime.
In the LongMemEval tests cited by VentureBeat, MRAgent used 118k prompt tokens per sample. A-MEM used 632k tokens. LangMem used 3.26 million tokens per query. MRAgent also cut runtime versus A-MEM, dropping from 1,122 seconds to 586 seconds.
| Framework | Prompt token use on LongMemEval | Runtime figure cited |
|---|---|---|
| MRAgent | 118k per sample | 586 seconds |
| A-MEM | 632k tokens | 1,122 seconds |
| LangMem | 3.26 million tokens per query | Not cited in source |
That contrast is the practical hook. If an agent has to remember hundreds of turns across dozens of sessions, token volume becomes a product constraint, not just a benchmark detail.
XOOMAR analysis: Lower prompt-token use does not automatically mean a better product. But it does give developers more room to build agents that search memory without flooding the context window. That can translate into lower runtime, smaller context loads, fewer irrelevant memories, and more predictable compute exposure, assuming the benchmark behavior survives production use.
For related XOOMAR coverage of enterprise AI cost pressure and implementation tradeoffs, see $30,000 Claude Habit Exposes Rippling Data Cloud Bet, $32M AI Bet Pits Hang Ten Systems Against Infosys Model, and orbital data center costs.
Why do classic RAG pipelines fail on long-horizon AI agent memory?
Classic retrieval pipelines follow a blunt pattern: search first, reason second. A system pulls documents through vector search or graph traversal, passes them to an LLM, and expects the model to sort signal from noise.
That works poorly when the agent needs to reason across long interaction histories. The source material identifies three bottlenecks.
- No mid-reasoning correction: If the model retrieves a document and notices a missing cue, such as a date, name, or event, many passive pipelines cannot revise the retrieval path while the answer is forming.
- Surface-level similarity: Fixed top-k similarity scores and predefined graph expansions can return text that looks related but doesn’t answer the question.
- Static relevance: Long conversations stretch across dozens of sessions and hundreds of turns. Static relevance functions can keep stuffing the context window with loosely related material.
The researchers argue that developers need an:
“active and associative reconstruction process”
That phrase matters. It means recall should unfold through linked evidence, not a one-shot read from a database.
A passive system might grab every tournament-related memory because the query mentions “video game tournament.” MRAgent tries to find the right path first, then open only the memory content that path justifies.
How does MRAgent reconstruct memory instead of dumping documents into context?
MRAgent treats memory as an interactive environment. When a complex query arrives, the backbone LLM starts with small cues from the prompt, explores candidate retrieval paths, gathers evidence, updates its search constraints, and repeats.
That loop is the core difference. The model is not merely handed retrieved text. It participates in deciding where retrieval should go next.
At each step, MRAgent uses the intermediate evidence it has already found to optimize the next search move. It can infer new constraints, pursue promising paths, and prune irrelevant branches before loading heavier memory content into the prompt.
The researchers describe this as inspired by cognitive neuroscience. The useful part for developers is not the metaphor. It is the control flow: memory access becomes sequential and evidence-driven.
XOOMAR analysis: This is the real architectural bet. MRAgent assumes that spending some reasoning effort on navigation before retrieval is cheaper than retrieving broadly and asking the LLM to clean up the mess afterward. The benchmark token numbers support that bet in the reported tests, but production systems will still depend on memory quality, ingestion design, and how well the graph reflects real user interactions.
What are Cues, Tags, and Content in MRAgent's memory graph?
MRAgent’s efficiency comes from its Cue-Tag-Content structure. It organizes memory into a multi-layered associative graph with three node types.
- Cues: Fine-grained keywords or contextual attributes, such as entities, actions, places, or other details extracted from user interactions.
- Tags: Semantic bridges that summarize the relationship between specific Cues and Content.
- Content: The stored memory units themselves, including episodic memory for concrete events and semantic memory for stable facts, preferences, or recurring user information.
Tags are the key compression layer. They let the LLM inspect short relationship summaries before spending tokens on detailed memory units.
The retrieval flow has two stages. First, the agent moves from Cues to candidate Tags. Then it judges those Tags for relevance and opens only the Content attached to the strongest paths.
That means MRAgent can avoid loading a full memory just because it contains a matching name. It can ask a narrower question first: does this relationship look useful for the current query?
This is where MRAgent differs from a basic graph search. The LLM is not just following edges. It is evaluating whether each edge helps reconstruct the answer.
How would MRAgent answer a question about Nate's tournament prize money?
The source uses a concrete example: a user asks, “How did Nate use the prize money when he won his third video game tournament?”
MRAgent begins by extracting small starting cues from the prompt, such as “Nate,” “video game tournament,” and “win.” It then maps those cues to the memory graph and checks the connected Tags.
The agent might see Tags such as “Tournament Victory” and “Tournament Participation.” Since the question is about what happened after Nate won, MRAgent drops the participation path and follows the victory path.
From there, it retrieves episodic content tied to that Cue-Tag pair. In the example, that means three distinct memories where Nate won a tournament. MRAgent evaluates those memories, keeps the one relevant to the third win, and discards the other two.
Then the important part happens. The agent updates its cues. From the selected memory, it adds “tournament earnings” and uses that new cue to traverse more Tags and retrieve later evidence.
That chain can lead to an answer such as “Nate saved the money.”
The gain is not that MRAgent magically remembers more. It remembers selectively. It avoids dragging every tournament-related memory into the prompt just because the query shares surface terms with them.
What must teams build before they can use MRAgent in production?
MRAgent has a setup cost. The Cue-Tag-Content structure must exist before the agent can query it.
Developers need to architect the underlying memory database so the LLM can navigate associative items and prune weak paths without making retrieval itself too expensive. That likely means treating ingestion as part of the product, not as an afterthought.
The authors do not require manual labeling. They designed an automated distillation pipeline that uses LLMs to process raw interaction histories and populate the memory graph. In practice, that means developers need a background job or streaming pipeline that runs prompt templates over user interactions, extracts cues, tags, and memory units, then stores them in a graph database or equivalent structure.
The authors describe this as a lightweight construction phase, and they have released the code on GitHub. The paper is also available on arXiv.
The tradeoff is clear. MRAgent shifts work from query time to memory preparation. If that preparation is disciplined, the payoff is lower token burn and faster retrieval during long-horizon reasoning. If the graph fills with weak cues or vague Tags, the agent could still waste effort walking bad paths.
The next practical test is whether teams can keep those memory graphs clean as real interaction histories grow. The framework points to a better pattern: don’t make agents remember everything at once. Make them prove which memory is worth opening.
The Bottom Line
- Token-heavy memory systems can turn long-horizon AI agents into expensive products to operate.
- MRAgent’s lower token use suggests memory reasoning may be more efficient than dumping retrieved context into prompts.
- Runtime and prompt size are becoming key constraints for developers building persistent AI agents.
Agent Memory Framework Efficiency on LongMemEval
| Framework | Prompt token use | Runtime cited |
|---|---|---|
| MRAgent | 118k per sample | 586 seconds |
| A-MEM | 632k tokens | 1,122 seconds |
| LangMem | 3.26 million tokens per query | Not cited |
Prompt Token Use by Agent Memory Framework
Sources
Written by
XOOMAR Insights Team
Research and Editorial Desk
The XOOMAR Insights Team pairs automated research with human editorial judgment. We track hundreds of sources across technology, fintech, trading, SaaS, and cybersecurity, cross-check the facts, and explain what happened, why it matters, and what to watch next. We do not just rewrite headlines. Every article is fact-checked and scored for reliability before it goes live, and we link back to the original sources so you can verify anything yourself.
Explore More Topics
Related Articles
Future FictionTrump Ditches Air Force One to Deploy Decoy Jet Theater
President Donald Trump secretly diverted from Air Force One in Turkey, using over a hundred people as decoy passengers. He publicly revealed the ruse long after
TechnologyFermi Stock Soars 23% After Insider CEO Shakeup
Fermi skipped a high-profile search and promoted board insider Lee McIntire to CEO, a move that sent its stock soaring nearly 23% as the company enters a critic
FintechSecuritize Plunges 20% as Tokenization Profits Vanish
Securitize shares cratered 20% as its first public earnings revealed booming tokenized asset volume failed to turn into profits, delivering a $21.7 million loss
TechnologyAnthropic's Claude Watermark Catches Work Cheaters Red-Handed
Anthropic started embedding invisible watermarks in all Claude chatbot text, making AI-generated content traceable to comply with the EU AI Act and enraging use
Future FictionTravis Kelce Calls Taylor Swift 'My Wife' at Chiefs Camp
Travis Kelce publicly called Taylor Swift his wife for the first time, confirming their secret Madison Square Garden wedding and describing the ceremony as the
FintechBank of England Bets on Crypto for UK Trade Finance
The Bank of England is building a single automated payment flow combining a CBDC and stablecoins, specifically to speed up trade finance and unlock working capi
FintechBanks Revolt Against Regulator's Crypto 'Live Surveillance
Major US bank groups are fighting a new OCC rule demanding weekly, transactional-level reports on stablecoin activity, arguing the profound compliance burden co
TechnologyAustralia Forces Tech Giants Pay News Publishers
Australia's major parties united to pass a law forcing digital platforms like Meta and Google to pay media companies for news content, shifting from negotiation
CybersecurityGermany Scraps Postwar Spy Curbs After Security Lapses
Germany dismantles the core legal restrictions on its intelligence agencies established after WWII, a historic pivot from defensive caution toward proactive, of
TechnologyApple Splits iPhone 18 Launch, Delays Base Model Until 2027
Apple is fracturing its iconic September launch, planning to debut only iPhone 18 Pro models this fall and holding the standard iPhone 18 until 2027.
Don't miss the signal
Get our weekly roundup of the stories that matter across tech, fintech, and trading. No noise, just signal.
Free forever. No spam. Unsubscribe anytime.