The "Just Add a Graph" Illusion: Why Long-Term AI Agent Memory Still Breaks in Production
When I sit down to review AI Agent projects that have been running inside a company for three weeks or two months, the most common ailment I see is not the model's reasoning ability. On day one, in front of the board, the Agent answers sharply, remembers the project name, and has the expense-approval process down cold. By week four, after a few hundred overlapping exchanges across five departments, it starts pulling a quote that was cancelled last month and applying it to a new order, or mixing customer A's constraints into customer B's contract.
People in the trade jokingly call this the "goldfish brain" of AI. The most popular cure of the past two years has been a similarity-search store built on vectors (Vector RAG): chop the chat history into chunks, turn each chunk into a string of numbers, and drop it into a database. When the model still remembered the beginning and forgot the end, the new wave of 2026 pointed straight at a very persuasive answer: throw out the flat vector store and move to a knowledge graph (Knowledge Graph, or GraphRAG) that ties every entity into a network.
When I built Munin myself (a long-term memory server on the MCP standard, born from the need to run our own internal fleet of Agents and later opened up to Claude Code, Cursor and Gemini), I walked straight into that pit of belief too, and climbed out with some scrapes. Graphs are powerful. But treating a graph as a miracle pill that cures forgetting the moment you plug it in is an expensive misconception.
A bad memory system does not die because it cannot find the data. It dies because it confidently puts an expired fact, or a fact stripped of its context, on the work desk.
Look at the math and the independent measurements published in 2025 - 2026 through the eyes of a systems architect, and you will see four major breaking points hiding behind the craze for upgrading AI Agent memory.
1. Million-token context windows and flat Vector RAG both run out of breath against the timeline
Before we talk about graphs, there is a question I always hear from CTOs: now that newer models have stretched the context window to hundreds of thousands or even a million tokens, why not pour the entire work history into one call and skip the maintenance cost of a long-term memory layer?
The group led by Di Wu (UCLA, Tencent AI Lab and UC San Diego) measured the answer very fairly in the LongMemEval benchmark presented at ICLR 2025 (arXiv:2410.10813). Instead of asking simple needle-in-a-haystack questions over a static document, the authors designed 500 questions seeded across a timestamped conversation history to test the five core abilities of a long-term assistant: information extraction, multi-session reasoning, temporal reasoning, updating new knowledge over old, and knowing when to refuse to answer because something was never mentioned.
The results poured cold water on the habit of leaning on long context: both commercial assistants and large-context models lost roughly 30% of their accuracy when they had to hold memory across a long chain of interactions. The more raw history you stuff into a single read, the higher the compute cost climbs with every question, the longer the latency, and the more the model's attention thins out across tens of thousands of fragmentary lines.
So what if we chop the history up and keep it in a flat Vector RAG store? A vector store solves the storage cost nicely, but it is born blind to the dimensions of time and causality.
Picture the shift handover logbook in a factory. On the 5th, the foreman writes: "Japan-bound order, pack in 5-ply cardboard cartons." On the 18th, the customer changes the requirement and the foreman writes a new line: "Switch the whole Japan order to moisture-proof plastic crates, cancel the cardboard carton spec." The worker reading the book understands immediately that the 18th entry cancels the 5th.
A flat vector store does not understand that cancellation mechanism. In the geometry of similarity measurement (cosine similarity), the question "What packing spec does the Japan order use?" sits near both note fragments with almost equal scores. Worse, the old note from the 5th sometimes matches the keywords more closely and climbs to the top of the list. The Agent reads a clear, assertive statement and confidently answers the customer with the spec that was cancelled. As the store swells over the months, expired facts like this pile up thick as delayed-action mines.
2. The LongMemEval paradox: when a naive graph loses to a flat vector store
Seeing the flat vector store break down at connecting facts and managing change, the natural reflex of engineers is to reach for a knowledge graph. The idea sounds perfectly reasonable: whenever a user talks to the Agent, we have a model pull out nouns as "nodes" and verbs as "edges" and store them as a tidy network of entities. When it is time to recall, the system just hops a few steps along the relevant edges to gather the full picture.
The catch is that an assumption that is reasonable on paper does not necessarily survive empirical measurement. In late August 2026, a research team of Theo Rusu, Sourena Khanzadeh and Manar Alalfi at Toronto Metropolitan University published a direct test titled Selective Forgetting: A Graph-Based Memory Framework for Long-Term LLM Agents (arXiv:2608.28978v1). They built exactly that pipeline, extracting each conversational turn into typed nodes and attributed edges, querying a two-hop subgraph (two-hop subgraph), and then pitting it head to head against a flat vector store on the 500 questions of LongMemEval under the same budget of 5 retrieved items.
The numbers that came back run against the expectations of the many people who deify GraphRAG.
Across the entire test set, the extracted-graph architecture scored a token F1 of only 0.417, clearly below the 0.468 of the basic flat vector store (a gap of -0.050, statistically significant over 500 questions). The collapse was heaviest in the group of questions that ask the assistant to recall specific content it had itself answered in earlier sessions: the accuracy under qualitative grading fell straight down from 91.1% for the flat vector store to just 60.7% for the graph.
Why would a seemingly more sophisticated structure lose so badly at the most basic problem?
The reason lies in the price of lossy compression (lossy compression). When you force a sentence full of context, constraints and nuance through the funnel of "Subject - Relation - Object" triple extraction, all the flesh of the wording (surface form) gets shaved off and only a dry skeleton remains.
In running a business, the words "but" and "unless" are where the money is held. A CFO's instruction like "Contracts under 200 million are allowed for department heads to sign themselves, except for new contractors who have not passed their first warranty period and client-entertainment spending above the quarterly limit", when chopped into nodes and edges by a small graph extractor, can easily deform into two stunted propositions: (Department head) - [CAN_APPROVE] -> (Contract under 200 million). The exception branches behind it either drop out during extraction or end up outside the two-hop radius at query time. A flat vector store is naive, but it keeps the raw paragraph verbatim, so when it pulls that paragraph up, the model can still read the full hedging conditions.

3. The graph is a navigation map, not a replacement for the verbatim record
Looking at the 60.7% figure above, if you rush to the conclusion that graphs are useless for AI memory, you step into another wrong extreme. The authors at Toronto Metropolitan University also say clearly that the result reflects the weakness of an approach that relies only on entities condensed by a small extraction model, not a verdict on every architecture that has a graph.
The core problem is a wrong division of roles between the navigation index layer and the evidence layer handed to the model to read.
One way of solving this was published in October 2026 by the group of Heng Wang at the AKBC 2026 workshop under the ACL association, through an architecture called GRACE-Mem (Graph Retrieval with Agentic Curation of Evidence for Long-Term Conversational Memory, ACL Anthology 2026.akbc-1.21). Instead of making the model answer from trimmed graph fragments or pre-compressed summaries, they split the long-term memory retrieval process into three independent beats:
- Use the graph to trace multi-hop links: When a question requires chaining together several scattered events across several weeks, the graph records (graph records) act as a guide, hopping across entity relations to gather a wide candidate set that a single vector similarity measure easily misses.
- Use the compressed records to re-rank quickly: The condensed records (compressed records) only do the job of coarse filtering and priority scoring through two ranking rounds, to keep compute cost low.
- Restore the original conversation text with its source attached before answering: This is the step that turns the tide. An evidence curation agent (Evidence Curation Agent) takes the top candidate list, looks back into the raw conversation store through provenance identifiers (provenance identifiers), removes noise, fills in missing passages, and rebuilds the final context from the very words as they were spoken when the events happened.
Thanks to that single principle of keeping a path back to the source text, GRACE-Mem lifts overall accuracy to 85.3% on the LoCoMo benchmark and 73.2% on LongMemEval when running with GPT-4o-mini (even reaching 80.2% on LongMemEval in the open 120B model configuration), beating the previous records by 7.9 and 3.4 percentage points respectively.
It is exactly how a good lawyer works through a major case file. Nobody sits down and rereads ten boxes of paper from page one every time a client asks a question. The lawyer uses a tree diagram and a summary index to locate, in thirty seconds, which minutes and which date a detail sits in. But when it is time to stand and argue before the court, what they pull out and read must be the original minutes with the wet signature, never the shorthand note on the sticky paper outside the file cover.
At Munin we kept exactly that division of roles: from the first release with a graph layer (March 2026) to the v2 ranker rewrite (October 2026), the scoring that picks which memories come back has never read the graph. The main search layer keeps the text exactly as the Agent wrote it, scores a BM25 keyword signal and a vector similarity signal side by side, normalizes both over the same candidate set and blends them at 0.3 keyword to 0.7 vector, and then a cross-encoder reranker reorders the top twenty or so candidates. The GraphRAG layer uses a model to extract entities and relationships from each memory, folds different spellings of one name (Claude AI, claude-ai, claude ai) into a single node, and draws a Mermaid link diagram next to the search results (plus a 2D graph view in the web app on the Elite plan), but it has no say in which memories come back. If you isolate just the step of finding the right original memory fragment to put into context (Retrieval Recall, which is different from the end-to-end answer score above), our October 2026 run on a dedicated benchmark host running the production search path, with every memory aged to its real date in the dataset, measured 99.8% Recall@5 on LongMemEval (470 questions, excluding the abstention set) and 96.7% Recall@10 on LoCoMo at session level, excluding the adversarial questions (95.1% with the reranker switched off). Those numbers come from keeping the source text verbatim, the keyword and vector blend and the reranker, not from the graph; split LoCoMo down to individual turns and Recall@10 drops to 83.7% (measured without the reranker, so the fair comparison is 95.1%), so there is still ground to cover.

4. A memory built for long-term work must learn how to forget and how to build partitions
Even when you have combined hybrid search (Hybrid Search), a guiding graph and a mechanism that pulls verbatim text with its provenance, an AI Agent memory system running in an enterprise will still degrade over time without two data lifecycle governance mechanisms: overwriting with selective pruning and context space isolation.
Look again at the second empirical figure in the study by Rusu, Khanzadeh and Alalfi (arXiv:2608.28978v1). Even though their entity-extraction branch pays a penalty on detail-recall scores, the accompanying selective forgetting (Selective Forgetting) module shows a very pragmatic direction. They score the vitality of each memory node using four measurable quantities: how recently it was touched (recency), how often it is called up for use (access frequency), how central it is in the network (degree centrality), and how long it has existed (age).
When they ran a one-time pruning experiment on a persistent graph of 27,021 nodes, the algorithm cleared out 9.8% of the low-value junk nodes and freed 9.5% of storage, while the token F1 score stayed practically unchanged (+0.001).
In real operations, I split the cleanup of an Agent's memory into three disciplines that must exist from the very first design:
- Edit in place instead of only appending to the end: An Agent's memory is not a diary that only adds new lines (append-only log). Before saving a new decision about selling price, staffing or server configuration, the system must run a lookup step to check whether the store already holds a note about the same subject. If it does and the facts have changed, the old record must be overwritten with the new state or marked as no longer valid with a clear timestamp (temporal invalidation), to avoid two contradictory truths living side by side.
- Give short-term memories an expiry date: A note like "this week the Binh Duong warehouse is pausing Friday afternoon receiving for stocktaking" is a fact with a natural shelf life. A good memory system must let you attach an expiry date at the moment of recording, so it can automatically lower the priority once that time passes and keep the hot retrieval zone clean.
- Build context partitions per project and per role: Many engineering teams pour a user's whole chat history into one single reservoir. For an employee who does one repetitive job, that approach does not show its flaw yet. But for a business owner or executive manager running four different projects at once, dumping all memory into one basket is a disaster. The security rules of a banking project bleed into a marketing content project, and the environment variable names of one system easily get picked up by mistake for another. Splitting memory into independent context cores (Context Cores) with their own retrieval policy per task type (locked tightly to the latest truth when reconciling figures, opened to a wider range of associations when brainstorming) is the checkpoint that keeps the Agent from going off the rails.
These three disciplines sound like principles on paper, and to be honest, Munin has only hardened part of them into code so far. What runs today: every write keeps version history (the last five versions; viewing, diff and rollback are on paid plans); the validity window (validFrom - validTo) is enforced on every search; short-term memories that carry an expiresAt field are swept by a background job every minute once they expire; and each project lives in its own compartment, sharing reads only with a central project when the account owner explicitly turns that on (an Elite-plan feature today). What is still unfinished: the AI Memory Guard layer (scan same-project memories above a cosine similarity threshold of 0.85, then ask a model whether the new fact contradicts an earlier one) currently runs only when a memory is created or edited in the web app, and its verdict is only returned in the API response, not yet shown as a warning in the UI; it does not run on the MCP path that Agents write through every day; projects with end-to-end encryption (E2EE) skip the check because the server cannot read the plaintext; pinning is still a small ranking bonus rather than a hard pin; retrieval policy is still just a per-project configuration label with no effect on ranking; and recognizing that a fact has been superseded still depends on the Agent overwriting the same key or setting an end-of-validity date itself. The three-step test at the end of this article is also the yardstick we chose for closing those gaps.

Do not buy the word "Graph" on the box, test the path of a fact that got changed
The race to build AI Agents in 2026 has shifted clearly from the question "Which model writes the smarter answer?" to the question "Which system keeps a clear head on the job through month six?".
At that foundational layer, the biggest trap for engineers and for people shopping for solutions alike is being swept along by the name of a technology. Yesterday they heard Vector RAG was the standard, so everyone rushed to chop up text and stuff it into a vector store. Today they hear the media hail GraphRAG as a cure-all, so they hurriedly tear everything out to build an entity graph, only to be stunned when the Agent forgets even the constraints in the very sentence it spoke yesterday.
Every time I need to assess whether the long-term memory of an AI Agent system is real production architecture or just a coat of showroom paint, I do not ask which vendor's graph database they use. I run exactly one very down-to-earth three-step test: on day one, teach it a rule with an odd exception; on day two, announce that half of that rule is being switched to a new approach; on day three, come back and ask about a situation that falls squarely inside the original exception.
A properly designed memory system will use the graph and keywords to locate the right chain of events, recognize which half of the rule has been superseded along the timeline, and then pull up the exact original sentence containing the exception to reason from. Because in the end, the value of artificial memory in a business does not lie in how many nodes you can gather on a visualization screen, but in the fact that next Monday morning, when you open your machine, your assistant does not take a decision cancelled last month as the compass for today's work.
If you or your engineering team work daily with Claude Code, Cursor, Windsurf, Gemini CLI, or build your own Agent systems over the MCP protocol and want to save the effort of rewriting from scratch the BM25 + Vector hybrid ranking layer, version history, validity windows and TTL, you can plug in and try the Kalera memory layer running at munin.kalera.ai (the free tier includes hybrid ranking and TTL, E2EE end-to-end encryption is on the Elite plan, and MCP adapters are ready so you can run the three-step test above on a real project).