Concepts / Context Graph
Concept guide · Updated November 2026
What is a context graph? Definition, structure and how to build one
A context graph is a decision-aware structure that records not just what exists in your enterprise, but why each decision was made: its inputs, the policy version applied, the authority behind it, how long it stays valid and whether it can be reused. ElixirData assembles a governed context graph for each decision, at the moment an AI agent needs it.
By Navay Gill, Founder & CEO, XenonStack · Reviewed by the ElixirData product team · Last updated · 9 min read
Key takeaways
- Systems of record capture state. A context graph captures the reasoning behind it.
- Decisions become first-class objects with inputs, policy, authority, validity and outcome.
- A knowledge graph supplies raw material; a context graph is a policy-curated extract for one decision.
- A shared context graph lets several agents coordinate instead of colliding.
- Reuse checks stop yesterday’s exception from quietly becoming today’s precedent.
What is a context graph?
A context graph is the decision-aware record of why things are the way they are. Where a CRM or ERP stores the current state, a context graph stores the reasoning behind each change, so an AI agent can check what applied before, who approved it and whether it may do the same now.
Enterprise systems are good at recording what happened. A CRM holds the current discount; an ERP holds the approved invoice. Neither records why the discount was allowed, who approved the exception or whether it should apply again. AI agents inherit this gap, and it is where most production failures start.
Think of two clocks. A state clock tracks the current value of things, which is what systems of record do. An event clock tracks the reasoning that changed them. A context graph keeps the event clock, so an agent can answer “why is it like this, and may I do the same?” before it acts.
What does a context graph contain?
A context graph stores each decision as a node with eight elements: inputs, policy version, conflicts, judgment, authority, temporal validity, reuse constraints and outcome. Using the same structure for every decision is what lets agents and auditors check, compare and safely reuse them.
What is the difference between a context graph, a knowledge graph and a decision graph?
A knowledge graph stores what the organisation knows. A context graph is a policy-curated extract of it, assembled for one decision at the moment it is made. A decision graph links decisions to each other over time. Most enterprises need all three, each answering a different question.
| Context graph | Knowledge graph | Decision graph | |
|---|---|---|---|
| Question it answers | What does this agent need to know to make this decision correctly? | What does the organisation know? | How do decisions relate to each other over time? |
| Scope | One decision | The whole organisation | Many decisions |
| When it is built | Assembled at decision time | Maintained continuously | Grows as decisions are made |
| Governed by | Policy: only what this decision may use | Data ownership and access rules | Decision lineage and outcomes |
| Used for | Grounding and checking an agent action | Search, discovery and reasoning | Audit, precedent and learning |
Why do AI agents need context graphs?
AI agents need context graphs because systems of record do not explain themselves. Without the reasoning behind past decisions, agents collide with each other, reuse exceptions outside their scope and leave no evidence for auditors. A shared context graph fixes all three.
What types of context graph are there?
Context graph AI projects usually start with one of four types. They share the same structure of entities, relationships, policy and decision history, but differ in what they connect and which agents use them.
| Type | What it connects | Typical use |
|---|---|---|
| Enterprise context graph | Entities, owners, policies and past decisions across business systems | Shared context for every agent in the organisation |
| Customer context graph | One customer’s accounts, contracts, interactions, entitlements and past decisions | Service, sales and credit agents |
| Code context graph | Repositories, services, dependencies, deployments and incidents | Debugging and incident-response agents (see Agentic Debugging) |
| Agentic context graph | The context agents read before acting and the decision traces they write back | Multi-agent workflows that learn from earlier decisions |
A practical path is to start with one customer or code context graph for a single decision, then grow it into an enterprise context graph as more agents come online.
How do you build a context graph?
Build a context graph in seven phases: resolve entities, instrument decisions, define the graph structure, bridge operational and analytical data, enforce reuse constraints, expose a query layer and close the feedback loop. Start with one high-value decision and widen from there.
- 1Resolve entities. Match customers, assets and accounts across systems so every decision points at the same thing.
- 2Instrument decisions. Capture inputs, policy, authority and outcome where decisions are made today.
- 3Define the graph structure. Model decision nodes and their links to entities, policies and other decisions.
- 4Bridge operational and analytical data. Connect live system state with historical and analytical context.
- 5Enforce reuse constraints. Check validity, authority scope, conditions and conflicts before a precedent is reused; escalate any failure.
- 6Expose a query layer. Let agents ask for decision-specific context through one governed interface.
- 7Close the feedback loop. Feed outcomes back, review drift and govern the graph itself. Sample targets: precedent reuse above 40%, false precedents below 2%.
What are the risks of a context graph, and how do you manage them?
The five main risks are judgment fossilisation, context collapse, exception drift, bias encoding and stale context. Each has a direct control: expiry dates, per-decision scoping, reuse checks, outcome audits by segment and freshness tracking.
| Risk | What goes wrong | How to manage it |
|---|---|---|
| Judgment fossilisation | Old decisions keep being reused after conditions change. | Give every decision an expiry and review precedents on a schedule. |
| Context collapse | Too much context drowns the signal an agent needs. | Assemble context per decision, scoped by policy. |
| Exception drift | One-off exceptions become de facto policy. | Run reuse-constraint checks before any precedent is applied. |
| Bias encoding | Past unfair outcomes are repeated at scale. | Audit outcomes by segment and flag skewed precedents. |
| Stale context | Agents act on facts that are no longer true. | Track temporal validity and freshness for every input. |
How does ElixirData build context graphs?
ElixirData Context OS compiles a governed context graph across 50+ enterprise systems, scoped and versioned at the moment of decision. Two deterministic gates check policy and authority, one before the agent reasons and one before it executes, and every decision is stored as a decision trace that improves the next one.
What does a context graph look like? A worked example
Take one decision: a relationship manager asks an AI agent to raise a corporate customer's credit limit by 20% outside the normal cycle. The context graph records the decision as connected nodes, not as a line in a log.
| Node | What it records | Example |
|---|---|---|
| Decision | What was decided and by which agent | Raise credit limit for Customer X by 20%, proposed by the credit agent |
| Inputs | The facts used, with source and time | Exposure from core banking at 10:42; risk rating from model version 3.2; 24 months of on-time payments |
| Policy | The rule and version that applied | Credit policy CP-7, version 12: exceptions up to 25% need the regional credit head |
| Authority | Who approved, under what delegation | Regional credit head, under authority delegated by the CRO |
| Validity | When the reasoning stops holding | Until the next risk review, or if exposure rises more than 10% |
| Outcome | What happened afterwards | Approved; facility used and repaid on schedule over the next 90 days |
Next quarter, a similar request arrives for another customer. The agent retrieves this decision as a precedent, sees the policy and authority behind it, and checks validity. If CP-7 has moved to version 13 in the meantime, the precedent is flagged as no longer applicable rather than silently reused. That is the difference between a context graph and a log: the log says the limit changed; the context graph says why, under which rules, and whether that reasoning still holds.
Where are context graphs used?
Context graphs pay off wherever decisions repeat, carry risk and need to be explained later.
- Financial services: credit exceptions, payment release and fraud review. See context and decision graphs in financial services.
- Manufacturing: root cause analysis and maintenance decisions across OT and IT data. See context graphs in manufacturing.
- IT operations: linking alerts, changes and services to find the real incident. See context graphs for incident correlation and blast radius mapping.
- Travel and logistics: disruption, rebooking and routing decisions under time pressure. See travel and shipping and logistics.
- Public safety: coordinated decisions during emergencies. See disaster management.
- Go-to-market: pricing, discount and deal-desk decisions. See GTM context graphs.
How do you evaluate a context graph platform?
Ask vendors to show these capabilities on one of your own decisions, not in a slide.
| Criterion | What good looks like |
|---|---|
| Decision capture | Inputs, policy version, authority and outcome are recorded automatically for every agent decision |
| Temporal validity | Each decision carries conditions that tell agents when its reasoning has expired |
| Entity resolution | Customers, assets and accounts are matched across systems before decisions are linked to them |
| Policy and authority links | Decisions point to the exact rule and delegation that applied, not just a free-text reason |
| Agent interface | Agents query precedents and context through a governed interface such as MCP, scoped to their task |
| Access control | Agents and users see only the decisions and facts they are entitled to |
| Replay and audit | Any decision can be reconstructed as it was at the time it was made |
| Deployment | Runs in your cloud, on-premises or in a sovereign environment when data cannot leave a jurisdiction |
For the underlying facts a context graph builds on, see knowledge graph for AI agents; for the record of each decision, see what a decision trace contains.
Related concepts
Frequently asked questions
What is a context graph in AI?
In AI, a context graph is the structured set of information an agent needs to make one specific decision correctly: relevant facts, the policies in force, who holds authority, prior decisions that apply and how long each piece stays valid.
Is a context graph the same as a knowledge graph?
No. A knowledge graph is a persistent store of what the organisation knows. A context graph is assembled from it for one decision, filtered by policy and enriched with authority, validity and reuse rules.
What is a temporal context graph?
A temporal context graph records when each fact and decision was true. Agents can then ask what was known and allowed at a specific moment, which matters for audits and for reusing past decisions safely.
How do context graphs help multiple agents work together?
Agents read and write to one shared decision ledger. Before acting, each agent sees pending proposals from the others, so a query-tuning agent can account for a repartition another agent is about to make.
What is an enterprise context graph?
A context graph that spans the whole organisation. It connects entities, owners, policies and past decisions across business systems, so every AI agent works from the same governed context.
What is a code context graph?
A context graph of software: repositories, services, dependencies, deployments and incidents. Debugging and incident-response agents use it to trace a fault to its root cause and see what changed.
How long does it take to start?
A typical ElixirData deployment takes about four weeks and starts in shadow mode, so the context graph proves itself before agents act on it.