In the previous lesson, you learned why short-term and long-term memory leave a critical gap: without a record of reasoning, decisions made by an agent cannot be explained, audited, or defended. A context graph closes that gap by making decision reasoning a first-class, queryable graph asset.
In this lesson, you will learn what a context graph is, how it differs from a traditional audit log, and how its three structural layers capture the full decision-making process.
A Context Graph is a knowledge graph specifically designed to capture decision traces — the full context, reasoning, and causal relationships behind every significant decision.
February 2026
The key differentiator from a traditional knowledge graph or audit log is the emphasis on the decision-making process as a first-class citizen. A context graph does not merely record facts about the world; it records the path from inputs to conclusions.
Comparing a context graph with a traditional audit log
| Traditional Audit Log | Context Graph |
|---|---|
Records actions only |
Captures the full "why" |
"Transaction rejected at 14:32" — isolated timestamp |
Decision traces and causal chains — full provenance |
No relationships between events |
Entities, relationships, events — all connected |
No causal chain or reasoning |
Tribal knowledge made queryable |
Flat, disconnected records |
Connected, traversable structure |
Understanding the three structural layers
Every context graph is built from three conceptual layers — entities, events, and context — that answer progressively deeper questions about any decision:
| Layer | Question Answered | Example Nodes |
|---|---|---|
Entities (What exists) |
Who and what are involved in this system? |
Person, Account, Transaction, Organization |
Events (What happened) |
What actions, decisions, and state changes occurred? |
Decisions, Transactions, Approvals, Rejections |
Context (The why) |
Why were those decisions made? What policies and reasoning applied? |
Policies, Risk factors, Precedents, Employee reasoning |
This three-layer model is domain-agnostic. The same structure applies to financial services (credit decisions), healthcare (treatment decisions), manufacturing (engineering changes), and government (policy enforcement).
Treating the decision trace as first-class data
Today, the reasoning behind enterprise decisions is scattered across disconnected silos — CRM, Slack, ticketing systems, incident logs. A context graph unifies this by treating the decision trace as data you can query.
Every decision node records:
-
The decision itself (for example, a Discount Approval)
-
The agent that made it
-
The policy that was applied
-
The exception that was invoked
-
The evidence considered
-
The precedent matched
-
The outcome
This structure is what the rest of this course builds on.
Check your understanding
Context Graph Definition
What is the primary differentiator of a context graph compared to a traditional knowledge graph?
-
❏ Context graphs use vector embeddings; knowledge graphs do not
-
✓ Context graphs treat the decision-making process as a first-class citizen
-
❏ Context graphs store data in a relational schema
-
❏ Context graphs can only be used with Neo4j
Hint
A traditional knowledge graph records facts — entities, events, and how they relate. A context graph goes one step further by capturing not just what happened, but the reasoning behind it: which policies applied, which precedents were matched, and why a specific conclusion was reached.
Solution
The correct answer is context graphs treat the decision-making process as a first-class citizen.
A traditional knowledge graph or audit log records facts about the world. A context graph also records the path from inputs to conclusions — including the policies applied, precedents matched, evidence considered, and the causal reasoning behind each decision. This is what makes agent decisions explainable and auditable.
Structural Layers
Which structural layer of a context graph answers the question "Why were these decisions made?"
-
❏ Entities layer
-
❏ Events layer
-
✓ Context layer
-
❏ Relationships layer
Hint
Each of the three structural layers answers a progressively deeper question about a decision: what exists, what happened, and why.
Solution
The Context layer answers the "why" — it captures the policies applied, risk factors, employee reasoning, and precedents that explain why a decision was made. The Entities layer answers "what exists" (persons, accounts, organizations), and the Events layer answers "what happened" (transactions, approvals, rejections).
Summary
In this lesson, you learned what a context graph is:
-
Context graph — captures decision traces, the full why behind every significant decision
-
Three structural layers — entities (what exists), events (what happened), and context (the why)
-
Decision trace — the causal chain of inputs, reasoning, evidence, and outcomes, stored as queryable graph structure
In the next lesson, you will learn the graph schema that implements reasoning memory and how all three memory layers connect in a single queryable graph.