campaign-icon

The Context OS for Agentic Intelligence

Book a Context Workshop

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.

Inputs
The facts and signals the decision relied on, with their sources.
Policy version
Which rule set applied, and which version was in force.
Conflicts
Competing signals or rules, and how they were resolved.
Judgment
The reasoning that connected inputs to the outcome.
Authority
Who or what was allowed to make this call, and on whose behalf.
Temporal validity
When the decision applies from and when it expires.
Reuse constraints
The conditions under which it may serve as a precedent.
Outcome
What actually happened next, fed back to improve later decisions.

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 graphKnowledge graphDecision graph
Question it answersWhat 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?
ScopeOne decisionThe whole organisationMany decisions
When it is builtAssembled at decision timeMaintained continuouslyGrows as decisions are made
Governed byPolicy: only what this decision may useData ownership and access rulesDecision lineage and outcomes
Used forGrounding and checking an agent actionSearch, discovery and reasoningAudit, 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.

Agents stop colliding
On one healthcare data platform, three agents tuned queries, partitions and indexes. Each recommendation was sound alone; together they conflicted. A shared context graph showed each agent the others’ pending changes before it acted.
Exceptions stay exceptions
A scoped SLA penalty waiver granted to one customer was later reused outside its scope. A runtime “can I reuse this?” check on validity, authority and conditions would have escalated it instead.
Audits take hours, not weeks
Because every decision records its inputs, policy and authority, auditors read the reasoning directly instead of reconstructing it from logs.

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.

TypeWhat it connectsTypical use
Enterprise context graphEntities, owners, policies and past decisions across business systemsShared context for every agent in the organisation
Customer context graphOne customer’s accounts, contracts, interactions, entitlements and past decisionsService, sales and credit agents
Code context graphRepositories, services, dependencies, deployments and incidentsDebugging and incident-response agents (see Agentic Debugging)
Agentic context graphThe context agents read before acting and the decision traces they write backMulti-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.

  1. 1Resolve entities. Match customers, assets and accounts across systems so every decision points at the same thing.
  2. 2Instrument decisions. Capture inputs, policy, authority and outcome where decisions are made today.
  3. 3Define the graph structure. Model decision nodes and their links to entities, policies and other decisions.
  4. 4Bridge operational and analytical data. Connect live system state with historical and analytical context.
  5. 5Enforce reuse constraints. Check validity, authority scope, conditions and conflicts before a precedent is reused; escalate any failure.
  6. 6Expose a query layer. Let agents ask for decision-specific context through one governed interface.
  7. 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.

RiskWhat goes wrongHow to manage it
Judgment fossilisationOld decisions keep being reused after conditions change.Give every decision an expiry and review precedents on a schedule.
Context collapseToo much context drowns the signal an agent needs.Assemble context per decision, scoped by policy.
Exception driftOne-off exceptions become de facto policy.Run reuse-constraint checks before any precedent is applied.
Bias encodingPast unfair outcomes are repeated at scale.Audit outcomes by segment and flag skewed precedents.
Stale contextAgents 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.

NodeWhat it recordsExample
DecisionWhat was decided and by which agentRaise credit limit for Customer X by 20%, proposed by the credit agent
InputsThe facts used, with source and timeExposure from core banking at 10:42; risk rating from model version 3.2; 24 months of on-time payments
PolicyThe rule and version that appliedCredit policy CP-7, version 12: exceptions up to 25% need the regional credit head
AuthorityWho approved, under what delegationRegional credit head, under authority delegated by the CRO
ValidityWhen the reasoning stops holdingUntil the next risk review, or if exposure rises more than 10%
OutcomeWhat happened afterwardsApproved; 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.

How do you evaluate a context graph platform?

Ask vendors to show these capabilities on one of your own decisions, not in a slide.

CriterionWhat good looks like
Decision captureInputs, policy version, authority and outcome are recorded automatically for every agent decision
Temporal validityEach decision carries conditions that tell agents when its reasoning has expired
Entity resolutionCustomers, assets and accounts are matched across systems before decisions are linked to them
Policy and authority linksDecisions point to the exact rule and delegation that applied, not just a free-text reason
Agent interfaceAgents query precedents and context through a governed interface such as MCP, scoped to their task
Access controlAgents and users see only the decisions and facts they are entitled to
Replay and auditAny decision can be reconstructed as it was at the time it was made
DeploymentRuns 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.

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.

See where governed agents fit in your stack

A half-day Context Workshop, at no cost. We map one decision your agents should own, the context it needs and the policies that must hold.