“Context graph” now names several different products. Graphiti uses it for a graph of facts that records when each fact stopped being true. Neo4j’s blog uses it for decision traces, where the graph “links the request, reasoning steps, tool calls, and data sources into a single trace.” Atlan and Glean apply the idea to graphs of data assets and of people and projects, and at least one product uses it for a governed set of company rules. Two things decide fit better than the label does: how the graph gets built, and what an agent receives when it asks a question.
What counts as a context graph tool for AI agents?
Any tool that stores entities and the relationships between them, and lets an agent retrieve along those relationships instead of matching text alone. The line between a context graph and a knowledge graph is blurry, and vendors cross it freely: a knowledge graph is usually a map of a domain, while a context graph is shaped around the moment an agent acts, as with facts that expire in Graphiti or decision traces in Neo4j’s writing. Inside that definition the tools split on who writes the graph, whether a person checks it before agents read it, and whether a query hands back facts, passages or finished rules.
Most of them have a model write the graph. Graphiti, Zep, Cognee, WRITER and Neo4j’s LLM Knowledge Graph Builder all have an LLM read your text and pull out entities and relationships. Glean says it builds its Enterprise Graph “entirely using machine learning” from the structure of the apps it indexes.
Neo4j can also be the place where you write the graph yourself. It is a graph database first, and with Cypher and its official GraphRAG package you design the schema and the pipeline.
Atlan builds a metadata graph from connectors to warehouses, BI tools and business applications, and each domain has an owner who approves definitions and policy exceptions. Trail parses documents into entities and typed edges, then holds every rule it derives until a person approves it.
If the job is remembering users and conversations rather than company knowledge, start with memory layers for enterprise AI agents instead.
Where to start if your graph must hold company rules
Start with Trail when your agents field questions about what policy allows: approval limits, exceptions, which contract clause governs a case. Its graph is organised around rules and precedence, and a query returns a short ranked set of approved rules with citations instead of a page of retrieved text.
How its graph gets built
Connectors read company systems and uploaded files; the source list, and how each one connects, is in context graphs for enterprise knowledge sources. Each source is parsed whole into entities and named edges, with types such as child_of, governed_by, supersedes, exempt_when, approved_by and proves. Every edge keeps the sentence it was drawn from, so a reviewer can read it and argue with it.
Rules sit in the graph as nodes, wired to the entities they govern, the SOP step they belong to, the clause they came from and the person who signed them off. No agent can reach a rule before your team approves it.
What an agent gets back
Agents ask over a native MCP server, a LangChain or LlamaIndex retriever, or plain REST and GraphQL. Trail walks the graph and ranks candidate rules on scope fit, path distance, standing and corroboration; its own summary of the ordering is “Approved beats proposed; a current source beats one that a later document superseded.” The answer lists rules in rank order with a citation to document, page and line, a confidence score, the path it took and what it left out. Conflicts are flagged and never settled silently, and below a confidence threshold your team sets, the agent has to stop and ask.
One nuance for engineers: the walkthrough says an incoming question “is matched two ways: by similarity and by entity,” so similarity search still plays a part at query time even though ingestion skips embedding.
Where it falls short
Paid plans start at $20k a year (the pricing page shows dollars and no regional price); the free plan holds 100 rules and 1 editor, enough to model one process. There are no public developer docs yet, and /docs reads “This page is on the roadmap”, so teams who want to read an API reference before a call will have to book a demo. It is also built for company rules and policies. An agent that mainly needs to remember a user’s preferences across chats is better served by Zep or Cognee.
How do these tools build the graph and answer a query?
They differ most at two points: whether anyone checks the extracted structure before agents use it, and what the agent receives. The table gathers what each vendor’s own pages say; “not publicly documented” means we found nothing on the pages we checked that day, and the feature may still exist.
| Tool | Context graph | Human approval | Cites sources | Versioning and history | Shared across agents | Interface |
|---|---|---|---|---|---|---|
| Trail | Yes: sources are parsed into entities and named edges (governed_by, supersedes, exempt_when), and rules are stored as nodes Verified | Yes: proposed rules are edited, approved or rejected by your team, and an unreviewed rule is not reachable by any agent Verified | Yes: each rule and each answer cites the document, page and line it was drawn from Verified | Rules are versioned against their source; prior versions are retained and visible in the audit log. No rollback or revert described Verified | Yes: one rule set served to Claude, ChatGPT, Copilot or your own stack, with reads scoped by role Verified | MCP server, LangChain and LlamaIndex retrievers, REST and GraphQL APIs, and a web app; no public API reference Verified |
| Graphiti | Yes: temporal context graph of entities, facts (edges) and episodes Verified | Not publicly documented | Every entity and relationship traces back to the source episodes that produced it (provenance, not answer-level citations) Verified | Facts have validity windows; old facts are invalidated, not deleted, with point-in-time queries; no review or rollback workflow found Verified | Agents pointed at the same graph or MCP server share it; MCP server over HTTP or stdio with group_id namespaces Verified | Python library (graphiti-core), FastAPI REST service, MCP server; no UI Verified |
| Zep | Yes: temporal Context Graphs of entities and time-stamped relationship facts Verified | We found no review step for ordinary memories (docs say memory admission is the app's job); optional human review for Agent Skills only, default auto Verified | Facts, entities, observations and summaries keep links to the source episodes they came from; raw episodes retrievable verbatim Verified | Facts carry valid_at and invalid_at timestamps for point-in-time queries; compare and restore versions for Agent Skills only Verified | Yes: shared Context Graphs per project or domain; Context MCP Server lets Claude, ChatGPT, Cursor and Codex use the same memory, scoped by policies Verified | SDKs for Python, TypeScript and Go; Context MCP Server; web dashboard Verified |
| Neo4j | Yes: a property graph of entities and relationships; Neo4j also describes context graphs that record decision traces Verified | Not publicly documented | LLM Knowledge Graph Builder chat shows the documents, chunks and entities used, and its prompt asks the model to cite sources (Labs project) Verified | Not publicly documented | Yes: the official Neo4j MCP server works with all deployment types, and Aura Agent can be wrapped as an MCP server Verified | Cypher and drivers, Python GraphRAG package, MCP server, Aura Agent and Graph Builder web apps Verified |
| Cognee | Yes: text becomes entities, relationships and searchable chunks in a knowledge graph; code becomes a graph of symbols and dependencies Verified | Not publicly documented | Cognee says agents retrieve cited facts and lists provenance on every answer as an Enterprise feature; apps can inspect the retrieved evidence Vendor-reported | Each node carries a version counter and timestamps; conflict review marks outdated facts superseded instead of deleting them; an opt-in provenance ledger records when and from which source each entity was written; no old copies are kept, so rollback means restoring your own export Verified | Yes: MCP API Mode lets several assistants share one knowledge graph; each MCP instance writes as one Cognee user Verified | Python SDK, REST API, MCP server, Cloud web app; Rust and TypeScript SDK docs Verified |
| Atlan | Yes: Enterprise Data Graph of metadata, lineage, glossary and ownership Vendor-reported | Yes, as a workflow: Context Engineering Studio proposes and a person approves; each domain has one accountable owner who approves definitions, and where sources conflict "Domain owners arbitrate" and the layer records the canonical definition and rationale; Atlan says humans "certify before context ships" and that its MCP "delivers certified business context". No setting found that blocks agents from reading uncertified assets Vendor-reported | Not publicly documented | Change tracking: the Activity tab on each context repository shows what changed upstream since the model was last built, and who changed it; no version history or rollback documented Vendor-reported | Yes: context repositories are shared across agents and runtimes through the hosted MCP server and APIs Vendor-reported | Hosted MCP server, SDKs and APIs, web app, Slack and Teams Vendor-reported |
| Glean | Yes: Enterprise Graph of people, projects, teams, products and processes, inferred by machine learning Vendor-reported | Optional moderator approval before shared-agent changes go live (Governed Agent Publishing), and optional approval before agent write actions; no approval step for individual rules or facts found Verified | Yes: inline citations, and text-level citations with exact snippets from the source document (REST API support in beta) Verified | Agents: drafts, permanent published snapshots, version restore and GitHub pull-request review; skills get immutable versions Verified | Yes: a managed remote MCP server over the same permission-aware graph, plus A2A and APIs Verified | Web app (Assistant, Agent Builder), REST Client and Platform APIs, Python and TypeScript SDKs, MCP server, A2A Verified |
| WRITER | Yes: graph construction identifies entities, concepts and relationships, and queries traverse the graph Verified | Not publicly documented | Yes: inline citations show which sources support each part of an answer, enabled with inline_citations: true Verified | Agent Builder v2: a snapshot per upload, version history, rollback and dev to prod promotion; no versioning of Knowledge Graph content found Verified | Knowledge Graphs are queried by ID through the API, chat tool calling and no-code agents, and several graphs can be queried together; the MCP server covers playbooks, not the graph Verified | REST API, Python and Node.js SDKs, MCP server, web apps (WRITER Agent, AI Studio, Agent Builder) Verified |
Read the human approval column first if a wrong answer would cost money. Of the tools we checked on 18 Oct 2026, the review steps sit at different levels. Glean’s Governed Agent Publishing approves changes to an agent, Atlan’s domain owners approve definitions and policy exceptions, and Zep offers human review only for Agent Skills, where the default is auto. Cognee’s closest step is a conflict review you run with improve(review_conflicts=True). On the Graphiti, Neo4j and WRITER pages we found no mention of an approval step for extracted facts.
Which context graph handles facts that change over time?
Graphiti, or Zep if you would rather not run it. Both store facts as time-stamped edges, so an agent can ask what is true now and what was true on a given date.
Graphiti, if you will run it yourself
Graphiti describes itself as “a framework for building and querying temporal context graphs for AI agents.” Its README says facts carry validity windows and that a changed fact is invalidated, not deleted, which keeps the history queryable. Every entity and relationship traces back to the episode of raw data that produced it. Retrieval mixes semantic embeddings, BM25 keyword search and graph traversal, with no LLM reranking step. You can fix entity and edge types up front as Pydantic models or let them emerge from the data, and the graph runs on Neo4j, FalkorDB or Amazon Neptune, with an MCP server and a FastAPI service on top.
The cost is operations and LLM calls. Graphiti is self-hosted only, and its comparison page lists governance and compliance as “Self-managed”. Ingestion is model-heavy: the MCP server README warns that “each episode involves multiple LLM calls (entity extraction, deduplication, summarization)”, and the README recommends models that support structured output, warning that others may cause ingestion failures. We found no mention of connectors; you send it text and JSON episodes. Telemetry is on until you opt out.
Zep, if you want it managed
Zep runs Context Graphs on Graphiti as a hosted service. Facts carry valid_at and invalid_at timestamps for point-in-time questions, and governance comes built in: RBAC, ABAC policies, audit logs and API logs, with SOC 2 Type II.
What Zep leaves to you is deciding what gets in. Its security page says “Your application remains responsible for prompt construction, memory admission, tool permissions, and action authorization.” Its traceability docs add that tracing a fact to its source “does not establish that the source content or a derived fact is true.” Self-hosting Zep itself is no longer an option, since the Community Edition is deprecated, and running it in your own VPC is an Enterprise arrangement.
These two fit graphs about users, accounts or a domain whose facts drift, such as a customer’s plan, an account owner or a preference that changed last week.
Should you build your own context graph on Neo4j?
Yes, if you have engineers who want to own the schema and the pipeline. Neo4j supplies the database and several of the parts, and you assemble the rest.
The LLM Knowledge Graph Builder turns documents into a lexical graph of chunks with embeddings plus an entity graph, both stored in your Neo4j. The neo4j-graphrag package holds “the official Neo4j GraphRAG features for Python.” The official MCP server lets an agent read the graph schema, run read and write Cypher, and call graph algorithms. Deployment runs from AuraDB Free through a dedicated cloud with VPC isolation to a GPL3 Community Edition you host.
The Graph Builder is a Labs project, and Neo4j says it does “NOT offer support for Labs projects”, with no SLA or compatibility guarantee. We found no mention of human approval or content versioning for rules or memories on the pages checked, and Neo4j’s context-engineering post says “LangGraph models stateful workflows with branching, error handling, and human-in-the-loop steps.” Precedence between documents, review before agents read, and what each agent may see are design work for your team.
Is Cognee enough for an open-source agent memory graph?
Often, for a team that wants graph memory under an Apache-2.0 licence and does not yet need finished compliance paperwork. Cognee turns text into “entities, relationships, and searchable chunks” and code into a graph of symbols and dependencies, and it combines graph, vector and relational retrieval. It runs locally, in Docker, on-prem, on Cognee Cloud or in your own cloud. In MCP API Mode several assistants share one knowledge graph, although each MCP instance signs in with a single token, so everything it writes belongs to one Cognee user. It can import memory from mem0, Letta, Zep or Graphiti.
The gaps are governance. The enterprise page says “SOC 2 is in progress.” The Postgres graph store in the open-source package is labelled a demo, with the production version sold under licence. We found no mention of an approval queue before memories are stored, or of audit logs.
Where do Atlan, Glean and WRITER fit for agent context?
All three build graphs, but around a data estate, a workplace or a document store, so fit depends on where your knowledge lives. Connectors, permissions and sync are covered in which context graph works with enterprise knowledge sources; here the question is how each builds and answers.
Atlan unifies metadata, semantics, lineage and access policy and serves them through a hosted MCP server. Each context repository has an Activity tab that “shows what changed upstream since the model was last built, and who changed it.” The catch is that Context Engineering Studio, where those repositories are built, “is gated behind an Atlan Labs toggle”, and Atlan says the platform “isn’t a drop-in replacement for a lightweight, per-agent personalization store.” The Atlan pages we read say nothing about answers pointing back to a source passage.
Glean infers a graph of people, projects, teams, products and processes from the apps it indexes and says this supports multi-hop reasoning across connected work. Chat answers can cite “exact snippets from the source document”, with REST support for that still in beta. Its approval step covers changes to agents, and we found no review step for individual rules or facts.
WRITER calls its Knowledge Graph graph-based RAG: construction identifies entities, concepts and relationships, and queries traverse the graph. Inline citations switch on per query with inline_citations: true. Through its MCP server you can “run published playbooks, work with their outputs, and access your Writer Meet recordings”, and we found no Knowledge Graph query tool there, so outside agents reach the graph through the REST API or SDKs.
Context graph vs RAG: when is plain retrieval enough?
When your agents answer from documents that rarely contradict one another, ordinary retrieval works and a graph only adds build and upkeep cost. Trail’s own blog post on building one says “A graph does not always win.”
A graph pays for itself when the answer depends on a relationship no single passage states. Watch for these signs in your own questions:
- An exception applies to one vendor, customer or region, and only until a date.
- A newer document replaces an older one, and both are still in the drive.
- Two teams’ policies cover the same case and disagree.
- Someone will later ask why the agent decided what it did, and “the top three passages” will not satisfy them.
If none of these show up in a week of real agent questions, a vector index with good chunking is the cheaper choice.
One discount question asked of a rules graph and a fact graph
The policy. Section 3 of the company’s discount policy says “discounts above fifteen percent require approval by the regional director, and may not be combined with promotional pricing within the same order”. (This is the policy excerpt on Trail’s rule-engine page; the deal and the memo below are invented.)
The question. A sales agent asks: “Deal 4471 is on spring promo pricing. Can I give 18%?”
In the rules graph. The policy was parsed when it was connected, and the derived rule waited until the policy owner approved it. The rule node links to discounts, to promotional pricing and to the regional director as approver. The query returns that rule first, with a citation to section 3, a confidence score and the path through “promotional pricing”. The agent answers that 18% cannot go on a promo-priced order at all, that the same discount without the promo would need regional director approval, and quotes the clause.
In the temporal fact graph. The policy went in as an episode. Extraction produced entities for the policy, promotional pricing and the regional director, with facts linking them and a validity window on each. Hybrid search returns those facts and the source episode, and the agent’s model reads them and decides. A month later a memo raises the threshold to 20%; once the memo is ingested and extraction links it to the old fact, that fact is invalidated. The pages we checked describe no approval step before the new fact is served.
Both graphs answer the first question. They part ways when the memo arrives: one waits for the policy owner, the other updates as soon as extraction runs. Which platforms let humans approve rules before agents use them goes further into that review step.
What to ask a context graph vendor in the demo
Bring one real policy with a known exception to the demo, and ask:
- What does the graph store for this document? Ask to see the entities, the edge types and the source sentence behind one edge.
- Who approves extracted structure, and can an agent read anything unapproved? “An admin can review it” is a different answer from “nothing is served until reviewed”.
- What does a query return? Ask for the raw response: facts, passages, or rules with citations and a confidence score.
- What happens when two sources disagree? Newest wins, the model decides, or a person is asked. Ask to see it happen.
- What does staying current cost? LLM calls per document, the sync schedule, and how much re-review a changed source triggers.
Score each answer against that one exception. If the vendor cannot show how the graph handled it in the demo, ask for a trial on your own documents before you sign.
How we chose
We compare tools on what their own public pages say, checked on the dates shown, and label every claim. How we compare tools.
FAQ
Best context graph tools for AI agents?
For company rules and policies that need a human sign-off and a citation, Trail is built for that job; for facts about users and accounts that change over time, Graphiti (self-hosted) or Zep (managed) fit. Neo4j suits teams that want to design their own graph, and Cognee suits teams that want an open-source memory graph.
Which context graph platform should I use for AI agents?
Choose by who builds the graph and who checks it. With engineers who want to own a schema, a database such as Neo4j or a framework such as Graphiti gives you control; if you want a vendor to run it, Zep, Glean and WRITER are hosted. If a wrong answer is expensive, ask about human review first, because most tools we checked describe no review step for extracted facts.
Context graph vs knowledge graph: what is the difference?
The terms overlap, and vendors use them loosely. A knowledge graph usually means entities and relationships about a domain, while context graph tends to mean a graph shaped around what an agent needs when it acts, such as Graphiti's facts with validity windows or Neo4j's decision traces. Ask what the graph stores and what a query returns instead of relying on the name.
Sources checked
Show 34 sources
- Context graph, how it works: build, serve, learn, checked
- Rule Engine: rules your team approves, checked
- Product walkthrough (trailhq.com), checked
- Pricing: Plans for Governed AI Agents, checked
- Docs placeholder page (trailhq.com), checked
- How to create and use a context graph, checked
- Graphiti README, checked
- Graphiti overview, checked
- Graphiti MCP server README, checked
- Zep vs Graphiti, checked
- Zep documentation index (v4), checked
- Zep governance, checked
- Zep security and compliance, checked
- Zep Agent Skills: learning and admission, checked
- Zep FAQ, checked
- Neo4j: tools for context engineering in agentic AI systems, checked
- Neo4j LLM Knowledge Graph Builder, checked
- Neo4j Labs, checked
- Neo4j pricing, checked
- Neo4j and the Model Context Protocol, checked
- Cognee README, checked
- Cognee: review conflicts, checked
- Cognee MCP overview, checked
- Cognee for the enterprise, checked
- Atlan homepage, checked
- Atlan: build an enterprise context layer, checked
- Atlan Context Engineering Studio: get started, checked
- Atlan: memory layer for agents, checked
- Glean Enterprise Graph, checked
- Glean: review and publish agents, checked
- Glean: deep-linked citations, checked
- WRITER Knowledge Graph concepts, checked
- WRITER inline citations, checked
- WRITER MCP, checked