Why graphs

Agents think in relationships, not rows.

When an agent reasons, it doesn't want a similarity score. It wants to traverse — from the user, to what they prefer, to the task they care about, to what's blocking it, to who said what about it last Tuesday.

Memory isn't a list of paragraphs to retrieve by similarity. It's a web of entities — people, tools, facts, decisions, tasks — connected by typed edges that carry meaning: prefers, depends on, derived from, mentioned in.

The closer your storage model matches that mental model, the less code your agent needs and the less your prompts have to do.

One picture, one query

A handful of edges express a week of agent activity. One Cypher query then answers a question that would take three SQL joins and a Python loop.

cypher
// the graph
(maya:Person {name:'Maya'})-[:WORKS_AT]->(:Company {name:'Wexa'})
(maya)-[:PREFERS]->(:Style {tone:'concise'})
(task:Task {goal:'Q3 report'})-[:DEPENDS_ON]->(t2:Task {goal:'pull metrics'})
(task)-[:MENTIONED_IN]->(:Message {ts: datetime()})
(t2)-[:BLOCKED_BY]->(:Tool {name:'metrics-api', status:'rate-limited'})

// the question: what's blocking Maya's Q3 report, and why?
MATCH (m:Person {name:'Maya'})<-[:OWNED_BY]-(t:Task {goal:'Q3 report'})
MATCH path = (t)-[:DEPENDS_ON|BLOCKED_BY*1..5]->(blocker)
RETURN blocker, path

Instant in a graph. Painful anywhere else.

What you get for free

These aren't features you have to build. They fall out of choosing the right shape for the data.

  • Variable-length traversal
    [*1..5], shortestPath, allShortestPaths — ask how X connects to Y in any number of hops with one query, not a tower of CTEs.
  • Native relationships
    Edges are first-class citizens. DEPENDS_ON, MENTIONED_IN, DERIVED_FROM are just there, not synthesized from foreign keys.
  • ACID transactions
    Memory updates are atomic across nodes and edges. No half-written thoughts, no inconsistent context mid-reason.
  • Schema when you want it
    Indexes plus UNIQUE / EXISTS / NODE KEY constraints when you need invariants, fully optional while you're moving fast.
  • Pattern matching as a language
    Cypher reads like the thing you're actually asking. (user)-[:KNOWS]->(topic) is what your whiteboard already looks like.
  • Provenance for free
    Every fact can carry an edge back to its source: which tool call, which document, which timestamp.