Memory is Reconstructed, Not Retrieved: Graph Memory for LLM Agents

Shuo Ji, Yibo Li, Bryan Hooi

Large Language Models (LLMs) are powerful reasoners, but they often suffer from "jagged" cognitive profiles: they excel at logic but struggle with long-term memory due to limited context windows. Current solutions typically rely on Retrieval-Augmented Generation (RAG) or Knowledge Graphs. However, these systems are fundamentally passive. They follow a rigid "retrieve-then-reason" workflow, fetching a fixed set of documents based on an initial query before asking the LLM to reason over them.

This passive approach has three major flaws:

  1. Inflexibility: It cannot adapt if the first "hop" of retrieval reveals a new clue (e.g., a specific date) that requires a different search direction.
  2. Noise: Passive systems often fetch irrelevant "top-k" results that clutter the context window.
  3. Structural Blindness: They frequently fail to bridge the gap between fine-grained keywords (cues) and high-level concepts.

To address these limitations, researchers have introduced MRAgent, a framework that treats memory retrieval as an active, multi-step reasoning process inspired by cognitive neuroscience.

The MRAgent Framework

MRAgent moves LLM memory from a static pipeline to an active reconstruction process. It achieves this through a novel graph structure and an iterative retrieval loop.

The Cue–Tag–Content (CTC) Graph

Instead of a flat list of text chunks, MRAgent organizes memory into a heterogeneous graph with three distinct layers:

  • Cues: Fine-grained keywords, such as specific entities or attributes.
  • Tags: Semantic bridges that summarize the relationship between a cue and a memory unit (e.g., "Nate's victory").
  • Content: The actual data, which is further split into Episodic (specific events), Semantic (stable facts or preferences), and Abstraction (high-level topics) layers.

Active Reconstruction Loop

Rather than executing a single search, MRAgent performs an iterative loop:

  1. Action Selection: The LLM evaluates the current "reconstruction state" and decides which traversal action to take (e.g., "Follow this tag to find the episode").
  2. Controlled Traversal: The system executes the chosen action to uncover candidate nodes.
  3. LLM Routing & Update: The LLM evaluates the new evidence, prunes irrelevant branches, and updates its internal context. It then decides whether it has enough information to answer the user's query or if it needs another "turn" of retrieval.

The paper provides a formal proof demonstrating that active retrieval policies are strictly more expressive than passive ones. Using a "Binary-Tree Needle-in-a-Haystack" task, the authors show that a passive retriever must guess the correct leaf node (an exponentially hard task), while an active agent can simply follow the path of bits (a linearly easy task).

Key Insights

  • Memory as a Process, Not a Store: The core breakthrough is recognizing that retrieval is reasoning. By allowing the LLM to evaluate tags before committing to reading full episodes, the agent avoids the combinatorial explosion typical of traditional graph traversal.
  • Tags as Semantic Filters: Tags act as a low-cost preview. The LLM can identify an irrelevant tag and prune that entire branch of the graph without ever processing the underlying text, saving massive amounts of tokens.
  • Multi-Granularity Matters: Combining episodic layers (what happened) and semantic layers (who the person is) allows the agent to resolve complex queries requiring both specific event recall and general knowledge.

Experimental Results

The framework was evaluated on two challenging benchmarks for long-term memory: LoCoMo (focusing on long conversational memory understanding up to 35 sessions) and LongMemEval (assessing memory across multiple sessions with ~115K tokens per query).

  • Performance Boost: MRAgent outperformed strong baselines like Mem0 and LangMem by 23.3% using the Gemini-2.5-Flash backbone, and by 12.4% on Claude-Sonnet-4.5.
  • Efficiency: On the LongMemEval benchmark, MRAgent reduced token consumption to just 118k, compared to 245k for Mem0 and a staggering 3.2M for LangMem.
  • Reasoning Depth: Ablation studies confirmed that multi-turn reasoning is the primary driver of success. Without the ability to iterate, performance on multi-hop queries dropped significantly.

Limitations and Future Work

While highly effective, MRAgent has a few limitations. Because the system is iterative, it requires multiple LLM calls to "reconstruct" a memory, resulting in higher latency compared to one-shot RAG. Additionally, the current version uses a static graph construction and lacks a mechanism for "forgetting" or consolidating old memories into more compact forms over time. Finally, while token-efficient, the computational cost of reconstruction grows with the depth of the search. Future work will likely focus on more robust traversal policies to reach target memories in fewer steps.

Summary updated

BibTeX
@inproceedings{ji2026memory,
  author = {Shuo Ji and Yibo Li and Bryan Hooi},
  title = {{Memory is Reconstructed, Not Retrieved: Graph Memory for LLM Agents}},
  booktitle = {International Conference on Machine Learning},
  year = {2026},
  url = {https://openreview.net/forum?id=xRVWftS3ES},
}
Figure