Skip to content

What is the difference between simple key-value state storage and graph-based associative memory for AI workflows? ​

The question in the title sounds like a choice between a simple key-value store and a graph of linked memories. The documentation of the eleven systems below, ours among them, reads less like a choice: every one keeps a by-name side, and many keep a search or graph side next to it. The difference sits in two places that are easy to miss, how a stored value changes and what an empty answer means, and this page reads both from each vendor's own words, as of 24 November 2026.

TL;DR

  • A key answers a question that names its answer; a graph can also answer a question about connections. ADK keeps session.state as key-value pairs; GraphRAG local search starts from entities and fans out "to their neighbors and associated concepts".
  • Every system on the map keeps a by-name side, and many keep a search or graph side next to it. The map is in the table below, row by row, with the vendor's own words.
  • A value changes by rule on the key side and by timestamped fact or separate index run on the graph side. LangGraph: "Most channels use last-write-wins." Zep: "Each fact has two timelines".
  • An empty answer is a statement about a scope. For a key, the name, the namespace, the session or the expiry; for a graph, what was loaded, extracted and walked. Zep sets truncated when a budget stops the walk.

For example, reading user.timezone is a lookup by name. Finding what a changed requirement touches is a question about connections. One system can serve both, and most of the systems below do.

Key-value state is workflow data kept under names that a step reads back by name. Google ADK puts it in one sentence: "Session state is a lightweight key-value store." (data handling) That ADK page is about workflows built as graphs, which is a graph of the process, not a graph of memories.

Graph memory is stored knowledge whose entities or facts are linked, so that retrieval can follow the links. Zep says "Facts are time-stamped claims stored on edges that capture relationships about specific events." (facts) For what associative memory itself means, see long-term associative memory in Python.

Mapping where each framework keeps its by-name side and its search or graph side is this page's framing; every behaviour is quoted or paraphrased from the vendor's documentation or a practitioner's own words. That every system in the table keeps a by-name side, that key-value state has its own rules for changing a value, and that an empty answer on either side is a statement about a scope are this page's conclusions from the quoted documents.

Where each framework keeps its key-value side ​

The table describes documentation read on 24 November 2026, not behaviour we tested. Text in quotation marks is verbatim; the rest is paraphrased. "Not described on the pages read" marks the edge of the documentation, not a limit of the product.

SystemBy-name sideSearch or graph sideHow a value changesStatus on the read date
LangGraph"LangGraph stores that data in channels: named slots in the state schema (the keys of your state object)." The store holds "arbitrary key-value data accessible from any thread".The store "also supports semantic search, allowing you to find memories based on meaning rather than exact matches". The Graph API graph is "a graph of state, nodes, and edges": the workflow."Each channel holds a value and defines how updates merge into it." "Most channels use last-write-wins."No release label on the pages read.
Google ADK"Conceptually, session.state is a collection (dictionary or Map) holding key-value pairs."The memory service is "a searchable archive or knowledge library the agent can consult"; the in-memory one "performs basic keyword matching for searches"."State should always be updated as part of adding an Event to the session history using session_service.append_event()."The workflow data page sits under the docs' ADK 2.0 section.
RedisA key. "After the timeout has expired, the key will automatically be deleted." (EXPIRE)Redis Agent Memory: "Search long-term memory semantically and narrow results with filters.""Any previous time to live associated with the key is discarded on successful SET operation."No release label on the pages read.
OpenAI Agents SDK"Sessions store conversation history for a specific session".Sandbox memory: "Memory reads require shell access so the agent can search and open memory files.""The pop_item method is particularly useful when you want to undo or modify the last item in a conversation"; sandbox memory: "live memory updates also require Filesystem".No release label on the pages read.
LlamaIndex"By default, workflows initialize an untyped state store."Memory blocks, such as "FactExtractionMemoryBlock: A memory block that extracts facts from the chat history."; the property graph index attaches "entities and relations as metadata".Workflow state: "lock the state with edit_state() so the update is atomic". A rule for a changed fact in the property graph: not described on the pages read.The older chat memory classes are marked deprecated; the memory blocks are the current page.
Letta"A memory entry's label becomes its path in the repository" (SDK memory)."Agents find memory in its Markdown files with normal file-search and read tools." "MemFS does not include a semantic or vector index by default.""Every memory edit is committed to the MemFS git repository. This provides version history, conflict resolution, and a clear boundary between saved memory and uncommitted changes."The source code now lives in a separate repository, per the project README.
Mem0 (how it works)An ID: "Use search or dashboard inspection to capture the memory_id you want to change."Platform: "Mem0 Platform builds a native graph linking people, places, and concepts across your memories, with no external graph database to provision." "Graph Memory affects ranking, not the response shape." The open-source path "boosts on entity overlap alone"."Use explicit update or delete operations when your application needs to correct or remove a memory." "immutable: Flagged memories that must be deleted and re-added instead of updated."Platform and open-source retrieval are described separately; the graph page says it is always on, all plans.
Zep and Graphiti"List the edges of a graph, fetch an edge by UUID, or search a graph for facts." Graphiti allows typed attributes on nodes."Biases results toward information connected to specified starting nodes, useful for contextual relevance" (search)."Each fact has two timelines: when the fact applies in the world, and when Zep records or invalidates it."The pages read are the current Zep documentation; no release label.
Cognee"Dataset-aware: searches run against one or more datasets you can read"Graph completion builds "a temporary, in-memory graph object" for one query; a wider candidate pool "costs more but is less likely" to miss relationships."It is the review_conflicts stage of improve, on by default" (cognify); a record field names the "record that superseded this one" (COGX)."search() is a legacy operation. In Cognee v1.0, most users should use recall() instead." The cognify page is under Legacy Operations too.
SupermemoryThe v5 get-memory call takes a memory ID and can "include its versions (up to three steps away, nearest first)"."After (and alongside) indexing, dreaming continues building the graph: extracting facts, linking related memories, resolving updates"."New fact replaces what was true before for search purposes; history can remain for audit." (graph memory)The pages read are v5; the docs say v3 and v4 are deprecated.
Mnemoverse (publisher)Fetch by ID ("Fetch a single atom by ID."), or by the client's external_ref; domain is a "Namespace, up to 100 characters"."Query memory with semantic search plus expansion through learned concept associations." POST /memory/graph is a "Bounded read of the concept-association graph around seeds."supersedes: "A target is not deleted; it gains a superseded_by pointer to the new atom and stays fetchable by ID". The filter that hides a replaced revision from default reads is "off by default".Public API reference (overview).

Two cautions on reading the table. LlamaIndex documents key-value stores under its document and index stores, and says "At the moment, these storage abstractions are not externally facing"; they are not counted here as its by-name side. And the graph in the LangGraph and ADK rows is the workflow graph, not a memory graph.

Which kind of question picks which store ​

Start with the question the next step must answer.

If the step needs a known value, name it. A flag controlling the next response is an example in the ADK state guide. A LangGraph channel can hold a value under a state key. A known path can direct an agent to a Letta memory file. These are direct access patterns; they do not require the caller to discover a relationship first.

If the question is about connections, a graph can make those connections part of retrieval. Microsoft GraphRAG local search uses selected entities as access points to related entities, relationships, and reports; the overview says local search works "by fanning-out to their neighbors and associated concepts". Zep documents search biased toward information connected to specified starting nodes. The caller still needs a starting point and a policy for how much of the neighborhood to inspect. Navigating knowledge graphs examines that traversal choice.

Extraction also changes what must be kept. In a Hindsight pull request, the authors report that extraction reworded exact strings such as paths and commands, while recall with source chunks found them. Hindsight is a product of Vectorize, a memory vendor and competitor of this page's publisher. Their report is a reason to test exact source retrieval separately from extracted facts, not evidence that every system that extracts facts loses strings.

Santosh Vaidya, a practitioner who describes an agent built for payments support, describes an application whose graph contains business rules, query templates, identifiers, and database entities, and whose code traverses it using breadth-first search. Their account illustrates a question where connected business vocabulary matters.

This page's conclusion: use a named value when the next step knows what to ask for. Consider graph retrieval when the question depends on relationships that are worth extracting, maintaining, and traversing. Neither choice rules out semantic search or access to the original source.

How a value changes on the key-value side ​

A lookup key says where to read. It does not, by itself, say how concurrent or successive writes should be combined.

Redis SET overwrites an existing value. It also discards that key's previous time to live on a successful write. If expiry matters, the application must account for that behavior rather than assume the old timeout remains.

LangGraph channels make the update rule explicit. Most use last-write-wins; a reducer can instead combine updates, such as appending to a list. ADK directs state updates through events so they are tracked and applied by the session service.

Persistence is a separate decision. An in-memory value can be useful during a run without being the right place to recover after a restart. For recovery, choose an appropriate persistent checkpointer or session service and consider the plan and tool calls in flight. See how to store agent state across restarts.

A stable key can also help with corrections. In a dev.to comment under Haoning Kan's article, the commenter Max Quimby describes keying a memory by a normalized subject and predicate, with a replaceable natural-language body. They also point out a difficulty: a more specific statement is not necessarily a contradiction of a broader one. An overwrite can lose information either way. Their comment is a practitioner's account, not a general measurement.

On the graph side the rule is different. Zep (entities): "Every time a new fact is added to the graph, the summary for each affected entity is updated using the previous summary plus the new information." Supermemory: "isLatest (and related graph fields) keep retrieval on the current fact without erasing the past." GraphRAG updates its index with a separate command, described as "Update an existing knowledge graph index." Mnemoverse documents supersedes, with the old memory kept and the hiding setting off by default (as of 2026-09-16, per its reference).

This page's conclusion: key-value state has its own rules for changing a value (last write, reducer, event, expiry, version), and choosing a store means choosing among them.

Profile or collection: the choice inside a key-value store ​

Even before adding a graph, decide whether the named object is a profile or whether memories are a collection.

LangChain's memory guide describes a profile as a JSON document with selected fields. A profile makes a known field convenient to read, but new information must be reconciled with the existing document. That is useful when the application has a clear schema and needs a current value, such as a preference it will use on the next turn.

A collection grows through separate documents. LangChain says a model can find it easier to create a new object than reconcile information with a profile, but updating or deleting the right existing item can be tricky. It also notes that the structure of individual memories may not capture the relationships between them.

These are update and retrieval tradeoffs, not a verdict that a collection is a graph. If an application needs both a current field and the evidence behind it, it should specify which representation answers each request. For a related correction pattern, see learning from user corrections.

What an empty answer means on each side ​

For a named lookup, first check what was named and where. Redis GET returns nil when the key does not exist; expiry can delete a key after its timeout. A missing value in a session or namespace is therefore a statement about that lookup's scope, not a complete account of everything an application has stored elsewhere.

A graph result has additional conditions. Was the source loaded? Did extraction identify the relevant entity and relationship? Did the query select the right starting point? Did the walk reach the part of the graph containing the fact? An empty response cannot answer those questions by itself.

Zep's graph-reading documentation says a budget can stop expansion and set truncated to true, with a truncation_reason. Search iteration also ends after its limited ranked result set ("Search ranks a limited set of results, so iteration over a search pager ends after that set."). These are different boundaries: one concerns graph expansion, the other a search result set.

Mnemoverse's reference says of POST /memory/graph that "an all-unknown seeds list is a 200 empty graph, not a 404", and describes truncated as "True when either a per-hop server-side cap or the request's limit cut the walk short". It is a boolean; the reference names no field that says which limit applied.

This page's inference: treat an empty graph response as a prompt to inspect inputs, extraction, seeds, and limits before deciding that the underlying fact is absent. For source-selection questions after retrieval, see which source to trust.

A graph needs relationships to traverse, and the work does not stop once the first relationship is written. The cost depends on how a system extracts candidates, resolves entities, handles changes, and selects a neighborhood at read time.

LlamaIndex describes extractors that attach entities and relations to chunks. Some extraction can parse properties already present on nodes; other configurations use language-model-based extraction. Zep says its major graph-creation steps use a language model after an episode is accepted, and describes entity resolution as best-effort.

Resolution is a substantive design choice. Neo4j Agent Memory explains that missed matches fragment knowledge, while false merges combine things that should remain separate. Neo4j describes Agent Memory as an experimental, community-supported Neo4j Labs project (framework comparison). A shared name or description can suggest relatedness without establishing identity.

Maintaining an edge is also different from creating it. In a Hacker News comment, trashhalo, who says they built Bosun, argues that edges need evaluation for support, redundancy, and continued truth. That is a builder's warning, not a benchmark.

Read-time scope has a cost too. Cognee describes a narrower candidate pool as cheaper but more likely to miss relevant relationships; a wider pool costs more. Microsoft estimates, in documentation read on 24 November 2026, that graph extraction constitutes roughly 75% of GraphRAG indexing cost. That is Microsoft's estimate for its indexing process, not a rate to apply to other products. See the GraphRAG cost discussion for the article-level context.

What this page does not claim ​

No benchmark of any system. Mapping where each framework keeps its by-name side and its search or graph side is this page's framing; that every system on the map keeps a by-name side, that key-value state has its own update rules, and that an empty answer on either side is a statement about a scope are this page's conclusions from the quoted documents. The practitioner accounts are single accounts, with their authors' interests named beside them. The behaviours are the vendors' documented ones on the date in Sources; your version may differ.

Common questions ​

What is the difference between simple key-value state storage and graph-based associative memory for AI workflows? ​

Key-value state returns a value by a name the caller already has: a state key, a path, an ID. A graph memory can also return what is connected to a starting point, so it fits questions whose answer depends on relationships. The two differ in what changes a value (an overwrite, a merge rule, an event, or a timestamped fact), in what an empty answer means, and in who pays to build the links.

Which AI agent memory layers use association graphs instead of flat vector database indexes? ​

Among the systems read, the documentation describes a graph of connected entities or memories in Zep with Graphiti, Cognee, Microsoft GraphRAG, the LlamaIndex property graph, Neo4j Agent Memory, Supermemory and the Mem0 Platform. The list is not complete and not a ranking. Mnemoverse, the publisher of this page, documents in its public API reference a graph of concepts that occur together in a memory or in a rated recall, readable with memory_graph.

Is a key-value store enough for an AI workflow's state? ​

For small values that the next step reads by name, yes, and frameworks keep state that way: Google ADK session.state and LangGraph channels. The store needs a rule for how a value changes and, to survive a restart, a persistent checkpointer or session service; ADK advises passing a value along the edge when only the next node needs it. A key store does not answer which things are connected to which.

What happens in a graph memory when a fact changes? ​

It depends on the system. Zep keeps two timelines for a fact and rebuilds an entity summary from the previous summary plus the new information. Supermemory keeps versions and an isLatest flag. Cognee runs a review_conflicts stage and a record can name what superseded it. GraphRAG updates an index with a separate command. Mnemoverse documents a supersedes field that keeps the old memory fetchable by ID; the setting that hides the replaced memory from default reads is off by default. On a key, the last write wins unless a reducer says otherwise.

Does an empty graph result mean the fact does not exist? ​

No. An empty result is a statement about what was loaded or extracted into the graph, which starting points were used and how far the walk went. Zep sets truncated when a budget stops the expansion, and the Mnemoverse graph read has a truncated flag too. An empty key lookup is also a statement about a scope: the namespace, the session, the expiry.

Sources ​

Read on 24 November 2026. Addresses are the final ones.

Workflow state and memory

Graphs, updates and cost

Practitioner accounts and vendors speaking for themselves

Sources were read on 24 November 2026; the page describes them as of that date.

Who wrote this. Mnemoverse publishes this page and is one of the systems in its table, so we are an interested party. Every behaviour is quoted or paraphrased from the vendor's own documentation on the date in Sources, ours included. Send corrections through contact.

Edward Izgorodin · Mnemoverse · 25 November 2026