Learn
What is a context graph? A definition for people who work with databases
A context graph is a graph of what an AI agent needs to reason about your data, with the reasons attached. For a database, the nodes are tables, columns, business entities, metrics and trusted queries. The edges are joins, derivations, approvals and corrections. Every edge records whether it was declared in the schema or inferred from the data, and whether a person has approved it.
Foundation Capital's essay, >AI's trillion-dollar opportunity: Context graphs, described a context graph as the record of why decisions happen, and interest in the term has grown fast since. Most of the pages that rank for it treat a context graph as memory for agents working across documents and chat. Databases need their own version, because the questions are numeric and the "why" behind a number is a chain of joins and definitions.
A context graph answers "why is this the number?"
Say someone asks why on-time delivery fell in March. Here is the part of a context graph the agent would walk:
on_time_delivery (metric)
└─ defined by → trusted query "OTD weekly" [approved by Operations, Aug 2026]
├─ reads → shipments
│ └─ joins orders on order_ref [inferred · 98% of refs match · approved]
├─ excludes → returns and replacements [rule]
└─ time basis → promised date [rule]
An agent with this graph can answer and show its working, including which definition it used and how sure it is about each join. If someone later decides replacement orders should count, the correction becomes a new edge, and every later answer uses it.
Context graph vs knowledge graph
A knowledge graph stores facts about entities: this customer placed these orders, this machine sits on that line. A context graph about your data stores facts about the data itself, how it connects and why each connection is trusted. The two can live in one graph. In Antcluster, the map of the database and the business ontology live in the same graph, and so does the memory of past investigations.
What goes into a context graph
- Schema metadata: tables, columns, types and declared keys.
- Data profiles: null rates, cardinality and value overlap between columns, which is how undeclared joins get found.
- Trusted SQL: the queries people already rely on.
- People's corrections and approvals.
- Results that passed or failed a check.
Who builds context graphs today
Several vendors now build graphs automatically. Glean infers entities across the business applications it connects to and builds an enterprise graph of content and people. PuppyGraph's assistant samples relational tables and proposes a graph schema for review, and Neo4j announced a private preview in May 2026 that proposes a graph model from relational tables. Antcluster builds its graph from the database itself, using data profiles and trusted SQL, and stores it in FalkorDB.
For a database, the test we'd apply to any of them is simple: does each edge say where it came from, and has a person approved the ones that matter?
Build a context graph of your own databases
Antcluster builds a context graph from your databases so your team can ask what the business already knows, record what only a few people know, and look for connections nobody has made yet. Coding agents took on bigger work partly because code gives them structure to check against, and a context graph gives your data the same. Every approved finding becomes part of the graph, so each investigation starts further ahead than the last.
Questions about context graphs
Is a context graph the same as a knowledge graph? A knowledge graph holds facts about the world or the business. A context graph holds the facts an agent needs to reason, including where each fact came from. For a database, you usually want both in one place.
Do I need a graph database to build one? A graph database makes the relationships easier to store and follow. Antcluster uses FalkorDB.
How is a context graph different from agent memory? Agent memory records what happened in past sessions. A context graph for a database also records what the data means and how it connects, so the agent can use it on a question nobody has asked before.