The world’s first unified interface for agent harnessesOpen Source4.6kPowered by UHP

InsightsNov 30, 202610 min read

Two graphs in every agent stack: one decides what happens next, one remembers what's true

Graph engineering and graph memory are two different graphs. Richard draws the line at the harness, compares them on ten dimensions and looks at what six graph memory products store.

Richard's original cover for Two graphs in every agent stack: the control-flow graph above the harness and the data graph below it.

Same word, opposite jobs

"Graph" has become the busiest word in AI engineering, and it now means two different things.

When people say graph engineering, they mean orchestration: several agents wired together, where each arrow is a handoff of work. When people say graph memory, they mean a knowledge graph or a property graph: entities and the relationships between them, which an agent reads and writes so it can remember.

Rick Hightower put it well in August: graph engineering is "two ideas wearing one name". I want to go one step further, because there's a clean line between the two ideas, and it's the harness.

The control-flow graph sits above the harness. It decides which agent runs next and what gets handed over. The data graph sits below the harness. It holds what your agents know, and every harness reads and writes it through tools.

Same word, opposite jobs. They live for different lengths of time, fail in different ways, need different tests, and get built by different people. Mixing them up is how teams end up buying a graph database to fix a handoff problem, or building an orchestration framework to fix a memory problem.

Below: what each graph is, how they differ on ten dimensions, what the market actually ships today, where the two meet (that's where our worst bug lived), and what I'd do about it.

Richard's original animation: the control-flow graph above the harness, where Codex, Claude Code, Hermes and a person hand work along with a send-back edge, and the data graph below it, where the user's San Francisco edge has ended and the New York edge has begun.

First, the harness

A harness is everything around a model that lets it act: the loop that keeps it going, the tools it can call, the context it assembles on every turn, and the checks that decide when it's done. Claude Code, Codex, Cursor and Hermes are harnesses.

The harness is the natural dividing line because it's where a single agent begins and ends. Anything that coordinates several harnesses has to sit above them. Anything that several harnesses need to share, and that should outlive any one of them, has to sit below them.

The graph above the harness: control flow

A control-flow graph describes work. Each node is a unit of work, each edge says what runs next, and some state travels along the edges from one node to the next.

There are now three scopes of it, and it helps to keep them apart:

  1. Inside one app. This is what LangGraph, Google's ADK 2.0 and Microsoft Agent Framework call a graph. LangGraph's nodes are functions that read shared state, do some work and return updates, and its edges decide what runs next. Google describes ADK 2.0 as a way to "map the refund process as a deterministic directed graph". Microsoft Agent Framework 1.0 shipped in April with a graph-based workflow engine, replacing Semantic Kernel and AutoGen. Graph-shaped control flow is now how most agent frameworks work.
  2. Inside one harness. Claude Code's dynamic workflows (May 2026) and Codex's subagents (March 2026) let the agent write its own graph for the task in front of it: fan out to many subagents, have others check their work, and merge what survives. Every node is still the same harness.
  3. Across harnesses. This is graph engineering as I use the term. Each node is a whole harness running its own loop, possibly from a different vendor, and each edge is a handoff between two of them. Codex scrapes the data, Claude Code curates it, Hermes checks every citation, and a person approves the result.

The interesting part of a control-flow graph is the edges. An edge is a handoff, and a handoff needs a contract: what has to cross (the spec, the evidence, the assumptions), what format it arrives in and what it means, what happens if the next node fails, and which edges need a person.

Control flow in three scopes: inside one app, inside one harness and across harnesses, with the four parts of a handoff contract: what crosses, format and meaning, what happens on failure, and which edges need a person.

Two open protocols now cover the wiring. MCP connects an agent to tools, and Anthropic donated it to the new Agentic AI Foundation under the Linux Foundation last December. Its current spec is dated 2026-07-28. A2A connects agents to each other. It reached version 1.0 in March and joined the same foundation in August. Neither one tells you what should cross an edge. That part is still yours to design.

A control-flow graph lives for a run, or for as long as you keep that workflow deployed. It's code, or a plan an agent wrote. When it breaks, it breaks at a handoff: something didn't cross, something crossed with a different meaning, or a step looped and burned its budget.

The graph below the harness: data

A data graph describes the world your agents work in. Each node is a thing (a person, a company, a ticket, a city), each edge is a relationship between two things, and both can carry properties.

For agent memory, the graph matters because facts change, and the change is the information. Say a user told your agent two years ago that they love their dentist in the Mission, and told it last month that they moved to New York. Ask the agent to find a dentist near home. A vector search ranks the old sentence first, because "dentist" matches "dentist". A memory graph knows that the "lives in San Francisco" relationship ended last month and the "lives in New York" one began, so it can answer from the current city and still tell you the old dentist exists.

That doesn't make vector search the villain. It answers a different question: what's similar to this? The graph answers another one: what's true now, and since when? An agent's memory has to answer both, and how the two should work together is a bigger question than this post.

That only works if time lives on the relationship itself. A good memory edge carries when the fact became true, when it stopped being true, and where it came from. When a new fact replaces an old one, the old edge gets an end date instead of being deleted, so you can still ask what was true back then.

Time lives on the edge: vector search ranks the old dentist sentence first, while a memory graph ends the San Francisco edge and answers from New York; below, one fact as a property-graph edge with three properties and as an RDF triple.

There are two families of data graph:

  • Knowledge graphs in the RDF sense store facts as subject–predicate–object triples, with ontologies (OWL) and a query language (SPARQL) on top. Attaching a date or a source to a single triple is awkward: you either add four extra "reification" triples or turn the relationship into its own node. RDF 1.2 adds a cleaner way, but as of this month it's still a W3C draft, not a standard.
  • Property graphs store nodes and relationships that both carry key-value properties, so "Alice worked at Acme from January 2024 to June 2025, source: email 42" is one relationship with three properties. The ISO standard for querying them, GQL, was published in April 2024, and SQL:2023 added property-graph queries to SQL itself.

A data graph lives as long as the user does. It's state, not code. The harness reaches it through tools, usually over MCP, which is exactly why it belongs below the harness: if memory lives inside one harness's session format, everything your agent learned is gone the day you switch from Claude Code to Codex. When a data graph breaks, it breaks on writes: the wrong fact gets retired, a date never lands on the fact, or an update never closes the old value.

Ten differences, side by side

Control-flow graph (above the harness)Data graph (below the harness)
A node isa unit of work: an agent, a harness, a persona thing: a person, a company, a ticket
An edge is"what runs next" plus a handoffa relationship between two things
What it answerswhat should happen next?what's true, and since when?
Who writes itan engineer, or an agent planning the runevery agent, on every turn
How long it livesone run, or one deployed workflowas long as the user
How big it getssmall: a handful to a few hundred nodeslarge, and it grows on every turn
How it breakslost context at a handoff, loops, bad routingwrong writes, missing time, stale facts served as current
How to test itper node, per edge, end to end, cost per successper question type over time: updates, contradictions, temporal questions
Standards and protocolsMCP, A2AGQL, SQL/PGQ, RDF/SPARQL
Typical toolsLangGraph, ADK, Agent Framework, harness subagentsGraphiti, Neo4j-style stores, GraphRAG indexes
The ten differences between the control-flow graph above the harness and the data graph below it, as shown in the original article.
The same ten differences, as the figure in the original article.

What the market ships today

On the data side, "graph" covers very different products. Here's what six of the best known ones actually store:

  • Microsoft GraphRAG (paper April 2024, open source July 2024) builds a graph of entities from a fixed set of documents and summarizes communities of related entities. It's built for "global sensemaking" questions over a whole corpus, like "what are the main themes?" Its lighter sibling LazyGraphRAG skips the up-front summaries, which cuts indexing cost to about 0.1% of GraphRAG's. Neither describes time on its edges. It's memory over documents, tuned for questions about the whole set rather than facts that change on every turn.
  • LightRAG and HippoRAG 2 also build entity graphs from text to improve retrieval, and neither describes time on its edges.
  • Cognee builds a knowledge graph with custom ontologies, and stores dates as separate timestamp nodes rather than on the relationships.
  • Mem0 published a graph variant in April 2025. In that paper's own LoCoMo results, simply putting the full conversation in context scored 72.90, ahead of the graph version at 68.44 and the base version at 66.88. In April 2026, Mem0's 2.0 open-source release replaced graph memory with built-in "entity linking". Its hosted graph now relates two entities when they appear in the same memory, without typed relationships.
  • Zep's Graphiti is the only one of the six that keeps time on every edge: when the fact was true, and when the system learned it. A contradicted fact gets an end date instead of being deleted. In October, Zep started calling the product a "context graph".

So of these six, only one keeps time on its edges. That's the part I'd look at first in any "graph memory" product, because the graph's shape is the easy part. What's written on each edge, and the rules for writing it, decide whether memory works.

What six graph memory products store, from GraphRAG, LightRAG, HippoRAG 2 and Cognee to Mem0 and Zep's Graphiti, and whether each keeps time on its edges; only Graphiti does on every edge.

Where the two graphs meet

The two graphs touch at one place: every node in the control-flow graph reads from and writes to the data graph. Shared memory is the state that passes between your agents, even when no edge says so.

That's where our worst bug lived. In our own memory system, a writer agent reads each conversation and saves facts about the user, and a reader agent answers questions from those facts. Some facts can only hold one value, like the city you live in, so when a new value arrives, the store retires the old one. The writer saved preferences as that kind of fact. So every time a user mentioned a new preference, the store retired the previous one, even when the two had nothing to do with each other.

In the 1M-token tier of BEAM, a public benchmark for long-term memory, 133 of 176 preferences in the memories we checked had been retired this way. Each agent passed its own tests. The overall score barely registered it: after the fix (and showing the reader each user's current preferences), preference questions rose 9.2 points while the overall score moved by −0.6, inside the noise.

When we traced the questions we kept failing, the pattern held. Of 34 repeat failures in four question types on BEAM's 100K tier, retrieval caused one, and in 33 the evidence was already in the reader's prompt. Giving the reader the entire memory improved the score by less than a point. The data graph's problems were in what got written and how, not in how it was searched.

Where the two graphs meet: a writer agent saves facts to the memory store and a reader agent reads them; each new preference retired the last one, with the handoff contract above and the write contract below.

So the seam needs its own contract. Above the harness, a handoff contract says what crosses between agents. Below it, a write contract says what a new fact is allowed to change, for example "a new fact can only retire an old fact about the same thing". Most teams have neither written down.

Five confusions worth clearing up

  1. "GraphRAG and agent memory are different things." They aren't. Any knowledge base an agent can read and write is part of its memory, and a graph built from your documents counts. The difference is how it gets written. GraphRAG builds its graph from a set of documents and precomputes summaries for questions about the whole set. Memory that agents write on every turn also needs cheap incremental writes and time on the edges, so a new fact can retire an old one.
  2. "LangGraph is graph memory." LangGraph's graph is control flow: the steps of a run and the state that moves between them. It can sit next to a memory store, but the graph itself is the steps, not the facts about your users.
  3. "Graph engineering means using a graph database." Graph engineering is about wiring agents. You can do it without any graph database, and a graph database won't do it for you.
  4. "A knowledge graph will fix our multi-agent handoffs." Handoffs are fixed by contracts on the edges of the control-flow graph. Shared memory helps every node see the same facts, but it doesn't decide what one agent owes the next.
  5. "More graph means better memory." The evidence above points the other way. The graph's shape matters less than time on the edges and the rules for writing them.

What I'd do as a builder

  • Put memory below the harness, outside any single harness's session format, behind tools every harness can call. That's what makes it survive switching harnesses.
  • Put orchestration above the harness, as code or as a plan an agent writes and a person can review before it runs.
  • Write two kinds of contract: handoff contracts on the edges above, and write rules for memory below.
  • Test them separately. Test the control-flow graph per node, per edge, end to end and per dollar. Test the data graph per question type over time: knowledge updates, contradictions, event order. BEAM (10 abilities, conversations from 128K to 10M tokens) and LongMemEval-V2 (May 2026, memory for agents) both test exactly that.
  • Read the failures one by one before you upgrade anything.

My bets for Q1 2027 (hold me to them)

  1. Every serious agent stack names both graphs explicitly, and they're owned by different teams.
  2. Graph memory products compete on time and write rules, not on how big the graph is.
  3. Memory becomes a shared service below every harness, the way the database sits below every app.

The word "graph" won't go away. It just needs to stop doing two jobs at once.

→Next

Run agents from any harness

Run supported harnesses through HarnessRouter and use task traces to inspect their execution.