What is a context graph for AI agents?
A context graph stores the things an agent needs to know as nodes and named relationships, so the agent can follow a path from a question to the facts and rules that apply. A customer links to its contracts, a contract links to the clause that sets a discount limit, and that clause links to the person who owns it.
Vector search returns passages that read like the question. A graph returns connected facts, which helps when the answer depends on three or four hops: this invoice, from this vendor, under this purchase order, governed by this exception that expired last month.
The label covers databases you model yourself, pipelines that build a graph from documents, memory services for agents, and enterprise platforms that graph your apps or your data estate. If what you need is memory of users and past sessions, start with our comparison of memory layers for AI agents; this page is about the graph behind the agent.
What makes a context graph useful to an agent?
Four properties decide it: the agent can cite where each answer came from, the graph keeps up when sources change, someone controls what agents may read, and the agent can reach the graph through a protocol it already speaks.
Citation comes first because an agent’s answer gets checked by a person. Graphiti’s README says “Every entity and relationship traces back to the episodes (raw data) that produced it” github.com/getzep. Zep adds a caveat that applies to every tool here: source traceability “does not establish that the source content or a derived fact is true” help.getzep.com.
Freshness matters because a graph built last quarter can hand an agent a rule that no longer applies once a policy changes or a vendor gets new terms. Some tools keep history (Graphiti invalidates old facts instead of deleting them), some re-index on demand, and some re-parse when a source document changes.
Governance means deciding who can read what and who decides what goes in. Glean and Atlan carry over permissions from the source systems, and Neo4j and Zep have access policies of their own. Fewer put a person between a newly extracted fact and the agent that will act on it.
Last, the agent needs a way to read the graph. Six of the seven tools here document a Model Context Protocol (MCP) server; GraphRAG is the exception.
How do seven context graph tools compare?
They split by where the context comes from. Glean and Atlan connect to company systems for you, Zep hosts a graph that your code feeds, Neo4j, Graphiti and GraphRAG are building blocks you run yourself, and Trail graphs approved business rules.
| Tool | Context source | Agent fit | Enterprise knowledge fit | Limits |
|---|---|---|---|---|
| Trail | Policies, SOPs, contracts and records from Notion, Drive, Slack, Gmail, SAP, Salesforce, Snowflake, Jira and Zendesk | Any agent over a native MCP server, LangChain and LlamaIndex retrievers, or REST and GraphQL | Approved rules, each cited to document, page and line; role-scoped reads; managed, single-tenant or VPC | A governed rules layer, not a general graph database or search engine. Paid plans start at $20k a year and trailhq.com/docs is still a placeholdertrailhq.com |
| Neo4j | Whatever you model and load | Official MCP server with a read-only mode; Labs memory server | Fine-grained access control (RBAC, PBAC, ABAC) and change data capture on AuraDB Business Critical; self-managed or cloud | You build the model, the ingestion, the citations and any review stepneo4j.com |
| GraphRAG | A text corpus you supply | Python indexing and query pipeline; we found no MCP server | Thematic questions that span many documents, with references back to text units | README says largely in maintenance mode, a demonstration and not a supported Microsoft offeringgithub.com/microsoft |
| Graphiti | Episodes your code sends | Python library and LangGraph integration; the MCP server is a reference implementation with no authentication | Temporal facts with validity windows and lineage to source episodes | Governance and compliance listed as self-managedhelp.getzep.com |
| Zep | Business data, documents and conversations | SDKs for many agent frameworks plus MCP | RBAC, ABAC policies, source traceability, SOC 2 Type II; cloud, own keys or VPC | Docs say memory admission stays your application's jobhelp.getzep.com |
| Glean | Work apps indexed through its connectors | Remote MCP server, permission-aware per person; Glean Agents | Enterprise Graph of people, projects, teams and processes built in a single-tenant environment | Graph is inferred by machine learning; we found no approval step before agents read it, and no published pricesglean.com |
| Atlan | Warehouse SQL, BI definitions, pipeline code and business applications | Remote MCP hosted by Atlan, plus SQL and APIs; Atlan roles carry over | Domain experts certify context before it ships; versioned Agent Skills | Centered on data and metric definitions; we found no parsing of SOPs or contracts into cited rules, and pricing goes through salesatlan.com |
Facts in this table were checked against the sources listed at the end of this page, between and .
We also scored each tool on citation, freshness, approval and agent access, from the same pages. No vendor publishes this grid; it is our reading of their documentation.
| Tool | Cites the source | Keeps up with change | Person approves before agents read | How agents read it |
|---|---|---|---|---|
| Trail | Document, page and line on every rule | Re-parses a changed source and re-proposes affected rules; prior versions kept | Yes, a named approver with a timestamp | MCP, retrievers, REST, GraphQL |
| Neo4j | If you model it | Your pipelines; CDC on Business Critical | Not found; build it | Official MCP server |
| GraphRAG | Text unit references | An update command for an existing index | Not found | CLI and Python pipeline; no MCP server found |
| Graphiti | Lineage to source episodes | Old facts invalidated, not deleted | Not found | Python library; reference MCP server, not for production |
| Zep | Facts tied to source episodes | Bi-temporal valid and invalid timestamps | Optional, for Agent Skills only | MCP and SDKs |
| Glean | Not stated on pages checked | Graph evolves with the apps; document verification API | Not found; access follows source permissions | Remote MCP server |
| Atlan | Certified definitions with lineage | Says MCP context is updated automatically | Yes, experts certify before context ships | Remote MCP, SQL, APIs |
Facts in this table were checked against the sources listed at the end of this page, between and .
Which context graph works with enterprise knowledge sources?
Glean and Atlan come connected to company systems, Zep takes whatever business data you send it, and Neo4j, Graphiti and GraphRAG expect you to build the ingestion. Then ask which sources matter: Glean is built around work apps and Atlan around the data estate.
Glean has an Enterprise Graph that captures “relationships across people, projects, teams, and processes”. It says it builds that graph “entirely using machine learning by understanding the data structures of enterprise apps and automatically inferring entities”, and that this runs “in each customer’s single-tenant environment” glean.com. Agents reach it through a Remote MCP Server that is “tenant-specific and permission-aware. Each person uses their own Glean access” developers.glean.com. That suits an assistant answering employee questions across Slack, Drive and Jira, where the main risk is showing someone a document they should not see. The homepage shows SOC 2 Type II, ISO 27001 and ISO 42001 badges glean.com.
Atlan titles its homepage “The Context Layer for AI”. Its connectors pull “warehouse SQL, BI definitions, and business applications” into one Enterprise Data Graph. AI drafts descriptions and term links first, then “Your domain experts resolve conflicts between sources, annotate edge cases, and certify what’s production-ready” atlan.com. Certified context reaches agents through a Remote MCP server that is “hosted and managed by Atlan”, and “Your existing roles and data permissions apply automatically” atlan.com. Atlan is built for agents that answer data questions, such as what counts as revenue or which table holds monthly active users.
Zep describes itself as “the unified context layer for enterprise data”. You “Send data from across your business”, and it builds “a Context Graph for each user, account, or domain” whose facts “are dated and updated as your data changes” getzep.com. Its governance docs list RBAC, ABAC policies, source traceability, audit logs and API logs help.getzep.com, and it runs as Zep Cloud, with your own keys, or in your VPC. Its security page also says “Your application remains responsible for prompt construction, memory admission, tool permissions, and action authorization” help.getzep.com.
Policies, SOPs and contracts are a different kind of source. They hold rules, exceptions and thresholds, often with an owner and an expiry date. Glean can find the document, and Atlan can certify the definition of a metric, but we found no description on either site of turning an SOP clause into a rule an agent must apply.
Where do graph databases, GraphRAG and agent memory graphs differ?
They answer different questions. A graph database stores and queries a graph you designed, GraphRAG summarizes a fixed set of documents, and an agent memory graph tracks facts that change while agents work.
Neo4j is the database. It calls itself “The knowledge layer that makes AI accurate” neo4j.com and lists “the business rules that govern what AI can and cannot do” among the parts of a knowledge layer neo4j.com. In practice you choose the schema, write the loaders and decide how provenance is stored. Agents connect through the official Neo4j MCP server, whose read-cypher tool runs “read-only Cypher queries that do not modify database data”; writes can be switched off with NEO4J_MCP_READ_ONLY=true github.com/neo4j. AuraDB Free costs $0, and fine-grained access control comes with the Business Critical tier neo4j.com. Trail’s own blog puts the split this way: “A graph database gives a team the tools to build a context graph” trailhq.com.
GraphRAG is a pipeline from Microsoft Research. It slices a corpus into text units, extracts “entities, relationships, and key claims”, clusters the graph into communities and writes summaries for each, which lets it answer holistic questions about a whole corpus microsoft.github.io. Its own Responsible AI FAQ says the system “is designed for trusted users” and that “a domain expert should analyze its answers” github.com/microsoft. The README warns that indexing “can be an expensive operation” and says the project “is largely in maintenance mode, and won’t be accepting new PRs or implementing new features” github.com/microsoft. That makes it useful for studying a document set and a weak base for an agent that must act on current policy.
Graphiti is the open-source temporal graph behind Zep. Facts carry validity windows, so you can “Query what’s true now, or what was true at any point in time” github.com/getzep, and it runs on Neo4j, FalkorDB or Amazon Neptune help.getzep.com. The README says to choose it “if you want a flexible OSS core and you’re comfortable building/operating the surrounding system” github.com/getzep. Its MCP and REST servers are reference implementations that “are not production deployments” and have no authentication github.com/getzep. Zep’s comparison page lists Graphiti’s governance and compliance as self-managed help.getzep.com.
For how these memory graphs compare with mem0, Letta and others on recall, see the memory layer comparison. The governance side, meaning who approves memory and how rules are versioned, has its own guide on governing a memory layer for LLM agents.
How does Trail turn a corrected run into a graph change?
Trail, the memory and context layer for enterprise AI agents, builds a graph, the Context Graph, whose main objects are business rules. When a person corrects an agent, the correction comes back as a proposed rule change, and no agent sees it until a person signs it off.
The graph is parsed from what the company already wrote. The How it works page says each piece “keeps the document, page and line it came from”. A rule is stored “as a node wired into what it governs”, including the clause it came from and the approver who signed it. Named edges such as governed_by, supersedes and exempt_when carry the sentence they were drawn from. When an agent asks, it gets back “a short, ordered set of rules”, each cited and scored, rather than a page of retrieved text, and where confidence is low it names what is missing trailhq.com.
When a reviewer edits an answer or overrides a rule, the agent sends that back with the run it belongs to, and Trail proposes a change shown next to that run. Once approved, every connected agent reads it from the next question on. Of the agent, the page says: “It can report. It cannot approve.” If a source document changes, Trail re-parses it and re-proposes the affected rules through the same review trailhq.com. On the Rule Engine page, each rule carries “A named approver, with a timestamp”, and prior versions are kept so past decisions replay trailhq.com.
Agents connect through a native MCP server, LangChain and LlamaIndex retrievers, or REST and GraphQL, and it runs managed, single-tenant or in your VPC trailhq.com. There is a free plan with 100 rules; paid plans run from $20k to $150k a year trailhq.com.
It is not a replacement for Neo4j on fraud detection or a custom data model, Glean for company-wide search, or Atlan for certified metric definitions. Its developer docs page is a placeholder at the time of writing trailhq.com, so an API evaluation means a demo. For the rule side in finance and operations, see our comparison of AI rule engines for finance and operations agents.
Which context graph tool fits your environment?
Name the one thing the agent must not get wrong, then pick the tool built around it.
A decision rule for choosing a context graph
Step list- The agent must query a domain you model yourselfFor fraud rings, supply networks or a custom ontology, use Neo4j and budget for the ingestion, provenance and review you will build.
- The agent must summarize themes across a fixed document setGraphRAG fits research and analysis by trusted users. Account for indexing cost and the maintenance-mode notice.
- The agent must remember facts that change during its workGraphiti if you run it yourself, Zep if you want it managed with RBAC, ABAC and SOC 2 Type II.
- The agent must find what employees can already seeGlean, with permissions carried from each source app into its MCP server.
- The agent must use the right data definitions and tablesAtlan, with certified definitions and lineage served over MCP.
- The agent must apply company rules and show which clause it appliedTrail, or another rule graph with approval before agents read, version history and citations to the line.
Whichever group you land in, run these checks against your own sources before you sign.
Checks before you commit to a context graph
Checklist- Open three answers and follow the citationIf it stops at a document title, a reviewer still has to search the document for the clause.
- Change one source and time the updateRe-indexing, re-parsing and validity windows behave differently when a policy changes mid-quarter.
- Ask who signs off on new factsPermission mirroring controls who sees a document. It does not check whether an extracted fact is right.
- Connect the agent you already runConfirm MCP or API access from your actual agent platform, with the same identity and permissions.
- Ask what is managed and what you operateGraphiti and GraphRAG governance is yours; Glean and Atlan are managed services priced through sales.
How we checked seven context graph tools
We read each vendor’s homepage, product pages, documentation, MCP server pages and GitHub READMEs, plus the GitHub and PyPI APIs for GraphRAG. Neo4j, GraphRAG, Glean and Atlan were checked on 19 October 2026; Graphiti, Zep and Trail facts come from our 16 October 2026 research; on 19 October we re-fetched every cited page and grepped each quote again. The criteria were context source, agent access, enterprise fit, source citation, freshness, approval before agents read, and published pricing. Where a page said nothing about a criterion, the grid says “Not found”. We did not install, index or query any of these tools, so nothing here reports hands-on results. Trail publishes this page and is one of the seven tools compared.
Frequently asked questions
best context graph tools for AI agents?
It depends on what the graph must hold. Neo4j is a graph database you model yourself, GraphRAG builds a graph from a text corpus for question answering, Graphiti and Zep keep changing facts on a timeline, Glean graphs company apps for search, and Atlan graphs the data estate. Check citations, freshness and approval before choosing.
which context graph works with enterprise knowledge sources?
Glean and Atlan connect to company systems out of the box. Glean indexes work apps through its connectors with permissions intact, and Atlan pulls warehouse SQL, BI definitions and business applications into its Enterprise Data Graph. Zep is managed, but your application sends it the business data, documents and conversations. With Neo4j, Graphiti or GraphRAG you build the ingestion and the graph yourself.
best context graph tools for enterprise AI agents
For enterprise agents, weigh access control, an audit trail and a human sign-off on what agents read. Zep documents RBAC, ABAC and SOC 2 Type II, Glean's MCP server is permission-aware per person, Atlan has experts certify context before it ships, and Trail serves only rules a named person approved, cited to document, page and line.
Is GraphRAG still maintained?
Its README says the project is largely in maintenance mode and will not accept new pull requests or features, though bug fixes and dependency updates continue. Version 3.3.0 was published to PyPI on 8 October 2026.
Is a context graph the same as agent memory?
They overlap. Agent memory usually stores what an agent learned about users and tasks between sessions, while a context graph usually models how a company's people, systems, documents and rules connect. Graphiti and Zep sit in both groups.
Do context graph tools publish prices?
Some do. Neo4j lists AuraDB Free at $0 and paid tiers billed per GB per hour, GraphRAG and Graphiti are open source, and Zep has a free tier. Glean's pricing URL redirects to its homepage and Atlan's to a sales form, so both need a sales conversation.
Is a context graph a knowledge graph?
Usually it is one, built for agents. Zep's Graphiti docs describe a framework for building temporal knowledge graphs, which Zep calls Context Graphs. The context graphs compared here add what an agent needs at decision time, such as source citations, validity dates or read permissions.
Sources checked
Show 35 sources
- Neo4j homepage
- Neo4j knowledge layer
- Neo4j pricing
- Neo4j MCP README
- Neo4j Labs MCP servers README
- Microsoft GraphRAG README
- GraphRAG Responsible AI FAQ
- GraphRAG docs
- GraphRAG CLI reference
- GraphRAG on PyPI
- Glean homepage
- Glean Enterprise Graph
- Glean Remote MCP Server
- Glean developer docs index
- Atlan homepage
- Atlan MCP Server
- Graphiti README
- Zep docs: Zep vs Graphiti
- Graphiti docs overview
- Graphiti docs welcome
- Zep homepage
- Zep docs index
- Zep docs: governance
- Zep docs: security and compliance
- Zep docs: source traceability
- Zep docs: FAQ
- Zep docs: Agent Skills learning and admission
- Zep examples and integrations README
- Trail homepage
- Trail Context Graph
- Trail Context Graph: how it works
- Trail Rule Engine
- Trail pricing
- Trail docs placeholder
- Trail blog: why agent projects stall