MGMem drops generative indexing calls from LLM agent memory
An arXiv paper proposes MGMem, a memory framework for long-horizon large language model (LLM) agents. The problem it targets: such agents need persistent memory that surfaces the right past interaction at the right time across thousands of turns.
The authors say many systems build that memory by invoking generative LLMs to rewrite history into summaries, facts or knowledge graphs. They name three faults with this indexing step. It is costly, at thousands of generative calls per build. It is non-deterministic, which undermines reproducibility and gives inconsistent answers across runs. And it erases provenance, because the reader sees synthesized text instead of the original turn.
MGMem makes no generative indexing calls. It replaces that step with a deterministic discriminative-parser pipeline. Mentions that recur across sessions are organized into an incidence graph. Mentions in a question are resolved by a three-stage resolver conditioned on the subject. The reader then receives raw dialogue episodes.
The reported results cover English multi-session dialogue question answering. On the LoCoMo benchmark, the authors say MGMem outperforms matched-protocol baselines without generative indexing calls. On the full LongMemEval-S, they describe it as competitive overall, and say it leads or ties on single-session question types among local retrieval comparisons. Code is available at https://github.com/junhong-h/MGMem.
Key facts
- MGMem replaces generative LLM indexing with a deterministic discriminative-parser pipeline and makes no generative indexing calls.
- The authors fault generative indexing as costly (thousands of generative calls per build), non-deterministic and provenance-erasing.
- Recurring mentions go into an incidence graph, a subject-conditioned three-stage resolver handles question mentions, and the reader gets raw dialogue episodes.
- Reported results: MGMem outperforms matched-protocol baselines on LoCoMo; on the full LongMemEval-S it is competitive overall and leads or ties on single-session types among local retrieval comparisons.
- Code is available in the junhong-h/MGMem repository on GitHub.
Why it matters
Agents that run for thousands of turns have to find the right earlier exchange when it counts. The authors argue that a common way of preparing that memory, having a generative model rewrite the history, brings three problems at once: cost, run-to-run inconsistency and loss of the original wording. MGMem's answer is to take generative calls out of indexing altogether and to return the dialogue as it was.
Who it affects
The work is aimed at people who build long-horizon LLM agents with persistent memory. It is most relevant to teams that care about reproducible behaviour, about the number of model calls spent building an index, or about showing the reader the original turn instead of a synthesized version of it.
How to use it
The code is at https://github.com/junhong-h/MGMem. The design has these parts: a deterministic discriminative-parser pipeline for indexing, an incidence graph linking mentions that recur across sessions, a subject-conditioned three-stage resolver for the mentions in a question, and raw dialogue episodes as the output passed to the reader. The reported evaluations use LoCoMo and LongMemEval-S, so those are the natural reference points for anyone comparing it with their own memory layer.
How solid is it
These are the authors' own claims in an arXiv paper, and this account rests on its abstract. The abstract gives no scores, accuracy figures or margins for LoCoMo or LongMemEval-S, and it does not name the matched-protocol baselines or the local retrieval comparisons. The public code offers a route for outside checks.
Risks and caveats
The LongMemEval-S result is narrower than the LoCoMo one: MGMem is described as competitive overall, and the lead or tie applies to single-session types among local retrieval comparisons. The reported results concern English multi-session dialogue question answering. The no-generative-calls claim is about indexing and should not be read as saying that no LLM is used anywhere in the system. The abstract also gives no measurements of MGMem's cost, latency, build time or token savings.
“We propose MGMem, a framework with no generative indexing calls that replaces this step with a deterministic discriminative-parser pipeline”
— MGMem paper abstract, arXiv