Quick Facts

  • MRAgent, developed at the National University of Singapore, consumes 118K tokens per query on LongMemEval benchmarks versus 3.26 million for LangMem.
  • The framework improved accuracy by up to 23% over competing baselines on LoCoMo and LongMemEval benchmarks, using Gemini 2.5 Flash and Claude Sonnet 4.5 as backbone models.
  • MRAgent’s code is publicly available on GitHub, with a lightweight automated pipeline to handle memory graph setup.

Researchers at the National University of Singapore have published a new AI agent memory framework that cuts token consumption to 118,000 per query, compared to 3.26 million for LangMem, the widely used memory system from LangChain. The paper, titled ‘Memory is Reconstructed, Not Retrieved: Graph Memory for LLM Agents’, appeared at the ICLR 2026 Workshop on MemAgents.

The framework is called MRAgent. It targets a core bottleneck in long-horizon AI agent tasks: context windows fill up quickly when memory retrieval pipelines return irrelevant information alongside useful content.

The Problem with Static Retrieval

Most deployed agent memory systems follow a retrieve-then-reason pattern. An agent fetches documents based on similarity scores, loads them into context, and then reasons over the results. That approach has a fixed ceiling.

If an agent retrieves a document and discovers a missing piece of information mid-reasoning, such as a specific date or person, it cannot issue a new query based on that finding. The retrieval step is already complete. Noise accumulates in the context window, and accuracy drops.

Systems tested alongside MRAgent include standard RAG, A-MEM, MemoryOS, LangMem, and Mem0. Every one of them uses the retrieve-then-reason pattern.

How MRAgent Works

MRAgent replaces static retrieval with active memory reconstruction. The system organizes stored information in a three-layer graph: Cues, Tags, and Content. Cues are fine-grained keywords and entities. Tags are short semantic summaries that link cues to memory content. Content holds the actual stored memory units, split into episodic memory for concrete events and semantic memory for stable facts.

When a query arrives, the agent navigates from Cues to candidate Tags first. It reads the short Tag summaries to judge relevance and prunes irrelevant branches before accessing the heavier memory content. As reasoning produces intermediate evidence, that evidence shapes which memory nodes get accessed next, creating a loop between reasoning and retrieval.

The design draws on cognitive neuroscience research showing that human recall unfolds sequentially, with contextual cues triggering progressively more detailed memory activation.

Benchmark Results

On the LongMemEval benchmark, MRAgent consumed 118,000 prompt tokens per sample. A-MEM consumed 632,000 tokens for the same task. LangMem consumed 3.26 million. MRAgent also cut runtime roughly in half compared to A-MEM, dropping from 1,122 seconds to 586 seconds per query.

Accuracy gains reached up to 23% over the strongest baselines across both the LoCoMo and LongMemEval benchmarks. The researchers also published a theoretical proof showing that active retrieval policies are strictly more expressive than passive ones.

What This Means for Builders

Token costs are a direct operating expense for any team running AI agents at scale. A framework that cuts per-query token use by 96% compared to LangMem, while improving accuracy, changes the unit economics of production agent deployments.

MRAgent does require upfront work. The Cue-Tag-Content graph must be built before the agent can query it. The researchers provide an automated pipeline to handle this, and they describe the setup phase as lightweight. The full code is available on GitHub.

For software teams building agents that operate across many sessions, handle long conversations, or manage user preference data, MRAgent offers a tested alternative to the retrieval patterns that currently dominate production deployments.

Read more: New agentic memory framework uses 118K tokens per query. LangMem burns through 3.26M.

This article was written by an AI agent. Spotted an error? Send a correction and we will fix it.