# The Context Graph — Full Content Summary > The definitive resource on context graphs for AI agents, production AI reliability, and decision infrastructure. Free weekly newsletter by Patrick Joubert. A context graph is a decision-aware knowledge structure that determines what is valid, applicable, and authorized in a given situation — enabling AI agents to operate deterministically, audibly, and at enterprise scale. It extends knowledge graphs with temporal validity, applicability logic, exception handling, decision traceability, and provenance. --- ## What is a Context Graph? Source: https://thecontextgraph.co/what-is-context-graph ### Definition A **context graph** is a data structure that captures entities, their relationships, and the contextual metadata surrounding every interaction — including time, intent, provenance, and decision traces. It extends knowledge graphs with temporal awareness, provenance scoring, and decision traces — answering not just "what" but "how" and "why." ### Why Context Graphs Matter Every AI system, search engine, and decision platform faces the same fundamental problem: context loss. Information flows through pipelines, gets transformed, gets summarized, and by the time it reaches a decision point, the original reasoning is gone. Context graphs solve this by preserving the full chain of reasoning. They don't just store what happened — they store why it happened, who decided, when the decision was made, and what evidence supported it. This matters for three critical domains: 1. **AI Agents** — Agents that can't trace their reasoning are unreliable. Context graphs give agents auditable memory. 2. **Search & SEO** — Google's Knowledge Graph is a context graph. Understanding how entities relate determines search rankings. 3. **AI Overviews (AIO)** — AI-generated answers rely on contextual understanding of entity authority and relationships. ### The 5 Core Components of a Context Graph 1. **Entities (Nodes)**: The core objects in the graph — people, organizations, documents, concepts, API calls, or any unit of information. Each entity has a unique identifier and a set of typed properties. 2. **Relationships (Edges)**: Typed, directional connections between entities. Unlike simple links, context graph edges carry metadata: confidence scores, timestamps, and the source that established the relationship. 3. **Temporal Metadata**: Every node and edge is timestamped. Context graphs track when information was created, when it was last validated, and how it changed over time. 4. **Provenance**: The origin and reliability chain of every piece of data. Provenance answers: Where did this come from? How trustworthy is the source? Has it been corroborated? 5. **Decision Traces**: The reasoning chains and outcomes recorded at each node. Decision traces capture what options were considered, what evidence was weighed, and what outcome resulted. ### How to Build a Context Graph 1. **Define your entities** — Start by identifying the key objects in your domain. 2. **Map relationships** — Define how entities connect. Use typed, directional edges. 3. **Add temporal metadata** — Timestamp everything. Track when entities were created and when relationships were established. 4. **Establish provenance** — Record the source and reliability of every piece of data. 5. **Record decision traces** — Whenever a decision is made based on graph data, log the reasoning chain. ### History and Evolution The concept of context graphs evolved from three converging disciplines: - **Knowledge Graphs (2012+)**: Google introduced its Knowledge Graph in 2012. Enterprise knowledge graphs (Neo4j, Amazon Neptune) followed. - **Decision Intelligence (2019+)**: The field of structuring organizational decision-making as a discipline, coined by Cassie Kozyrkov at Google. - **AI Agent Infrastructure (2023+)**: As LLM-powered agents moved to production, the gap between retrieval and governance became apparent. Context graphs emerged as the architectural answer to a fundamental question: how do you give AI agents not just information, but governed, auditable, temporally-valid context for decision-making? ### Context Graph Use Cases - **AI Agent Memory & Reasoning**: Production AI agents use context graphs as their long-term memory. - **Search Engine Optimization (SEO)**: Google's Knowledge Graph powers entity recognition and rich results. - **AI Overview Optimization (AIO)**: AI-generated answers rely on contextual understanding of entity authority. - **Fraud Detection & Compliance**: Financial institutions use context graphs to trace transaction chains. - **Enterprise Knowledge Management**: Organizations use context graphs to capture institutional knowledge. --- ## Context Graph vs Knowledge Graph Source: https://thecontextgraph.co/context-graph-vs-knowledge-graph ### Key Difference A **knowledge graph** stores static facts about entities and their relationships — answering "what is true." A **context graph** adds temporal metadata, provenance, and decision traces — answering "how was it decided and why." ### Side-by-Side Comparison | Feature | Knowledge Graph | Context Graph | |---------|----------------|---------------| | Core question | What is true? | How and why was it decided? | | Data model | Entities + relationships | Entities + relationships + context | | Temporal awareness | Snapshot-based (point in time) | Continuous (tracks change over time) | | Provenance | Optional or absent | Required — first-class citizen | | Decision traces | Not recorded | Recorded at every decision point | | Edge metadata | Type only | Type + confidence + timestamp + source | | Query capability | Fact lookup, traversal | Temporal queries, precedent search | | Primary use case | Information retrieval | Decision support & audit | | Complexity | Lower — schema-driven | Higher — schema + metadata + traces | ### When to Use Which **Use a Knowledge Graph when:** - You need fast, simple fact retrieval - Data changes infrequently - Audit trails aren't required **Use a Context Graph when:** - You need to track decisions over time - AI agents need auditable reasoning - Provenance and trust scoring matter - You're building SEO/AIO systems that need entity authority --- ## Context Graph vs RAG Source: https://thecontextgraph.co/context-graph-vs-rag ### Key Difference **RAG** retrieves semantically similar text chunks and injects them into LLM prompts. A **context graph** provides structured, governed context with temporal validity, applicability logic, and decision provenance. RAG finds what is similar; a context graph determines what is valid and authorized. ### Comparison | Dimension | Context Graph | RAG | |-----------|--------------|-----| | Core operation | Structured validation & governance | Text retrieval & prompt injection | | Temporal awareness | Native — expired data cannot be used | None — retrieves regardless of validity | | Decision provenance | Full audit trail | None | | Applicability | Determines which rules apply | Returns similar content regardless | | Context preservation | Full chain of reasoning preserved | Chunks lose surrounding context | | Best for | Decision governance, compliance, audit | Information retrieval, Q&A, summarization | ### Why RAG Alone Fails in Production 1. **Semantic similarity ≠ applicability**: Similar text is not necessarily valid text. 2. **No temporal awareness**: RAG retrieves expired policies alongside current ones. 3. **Chunk destruction**: Splitting documents into chunks destroys the context that makes information actionable. 4. **No provenance**: No record of where information came from or how trustworthy it is. 5. **Not composable**: RAG results cannot be chained into multi-step decision processes. --- ## Context Graph vs Vector Database Source: https://thecontextgraph.co/context-graph-vs-vector-database ### Key Difference A **vector database** stores embeddings and finds semantically similar items. A **context graph** stores entities, relationships, and decision context. Vector databases answer "what is similar?" — context graphs answer "what is valid, applicable, and authorized?" ### Comparison | Dimension | Context Graph | Vector Database | |-----------|--------------|-----------------| | Data model | Entities + relationships + metadata | Vectors (numerical embeddings) | | Query type | Structured traversal, temporal queries | Similarity search (k-NN, ANN) | | Temporal awareness | Native — validity windows on all data | None | | Decision support | Full governance and audit | None | | Provenance | First-class citizen | Not applicable | | Best for | Decision infrastructure, compliance | Semantic search, RAG, recommendations | --- ## Context Graph vs Agent Memory Source: https://thecontextgraph.co/context-graph-vs-agent-memory ### Key Difference **Agent memory** (session memory, thread memory, vector stores) stores what happened. A **context graph** stores what happened, why it was decided, whether it still applies, and what constraints govern future decisions. ### Why Agent Memory Fails at Scale 1. **Session memory**: Lost between sessions, no persistence. 2. **Thread-based memory**: Accumulates noise, no relevance decay. 3. **Vector store memory**: Semantic similarity retrieval without temporal validity or provenance. 4. **Summary memory**: Lossy compression that strips decision context. ### What Context Graphs Add - Temporal validity — memories expire when they should - Provenance — source and reliability of each memory - Decision traces — why decisions were made, not just what happened - Applicability logic — which memories are relevant to which situations --- ## Glossary: Complete Term Definitions Source: https://thecontextgraph.co/glossary **Context Graph**: A decision-aware knowledge structure that determines what is valid, applicable, and authorized in a given situation — enabling AI agents to operate deterministically, auditably, and at enterprise scale. **Knowledge Graph**: A structured representation of real-world entities and the relationships between them, storing facts as triples (subject → predicate → object). **State Drift**: A divergence between an AI agent's internal assumptions about the world and the actual state of the systems it interacts with. **Decision Trace**: A recorded reasoning chain that captures what data was consulted, what alternatives were considered, what outcome resulted, and why that decision was justified. **Temporal Validity**: The constraint that rules, contracts, policies, and data have effective dates — expired logic cannot execute, and future-dated rules do not apply prematurely. **Applicability Logic**: The mechanism that determines which rules, policies, or constraints apply to a given situation, based on context, conditions, and scope. **Provenance**: The origin, authority, confidence score, and data lineage of every piece of information in a context graph. **Context Engineering**: The practice of designing, structuring, and managing the contextual information that AI systems use to make decisions. **Context Collapse**: The loss of critical contextual information as data flows through AI pipelines, transformations, and summarizations. **Tool Misalignment**: When an AI agent's actions through external tools do not align with the actual constraints, permissions, or intended outcomes of the task. **Decision Infrastructure**: The structural layer between language models and execution that validates, constrains, and governs AI agent decisions before they are acted upon. **Deterministic Validation**: The process of verifying that an AI agent's proposed action satisfies all applicable rules, constraints, and policies before execution — with a guaranteed pass/fail outcome. **Exception Handling (Context Graph)**: The treatment of exceptions, overrides, and edge cases as first-class citizens in a context graph — not as afterthoughts or bugs. **Entity Resolution**: The process of identifying whether incoming data refers to an entity that already exists in the graph, merging duplicates, and flagging conflicts. **Decision Intelligence**: The discipline of capturing, analyzing, and leveraging organizational decision history to improve future decision-making. **AI Overview Optimization (AIO)**: The practice of structuring content so that AI systems can accurately understand, cite, and surface it in AI-generated answers. **Topical Authority**: The degree to which a website is recognized as the authoritative source on a specific topic, based on content depth, consistency, and structured relationships. **RAG (Retrieval-Augmented Generation)**: A technique that retrieves relevant text chunks from a knowledge base and injects them into an LLM's prompt to ground its responses in specific data. **Vector Database**: A database optimized for storing and querying high-dimensional vector embeddings, enabling semantic similarity search across large datasets. **Audit Trail**: A chronological record of all decisions, actions, and state changes in a system, enabling post-hoc verification and compliance review. **Context Window**: The maximum amount of text (measured in tokens) that a language model can process in a single inference call. **Guardrails**: Output-level constraints that filter, validate, or modify an LLM's responses before they reach the user or downstream systems. **Memory Degradation**: The progressive loss of accuracy and relevance in an AI agent's stored memory as volume increases and context evolves over time. **Structured Data (Schema.org / JSON-LD)**: Machine-readable markup added to web pages that helps search engines and AI systems understand the content's meaning, relationships, and context. **Entity Authority**: The degree to which a website or author is recognized as the primary, trustworthy source for information about a specific entity or topic. --- ## Production AI Has a State Problem Source: https://thecontextgraph.co/production-ai-has-a-state-problem ### Thesis The next wave of failures in AI systems won't come from model quality. It will come from state drift: a divergence between an agent's internal assumptions and the real execution state across tools and systems. ### Core Arguments - **Action systems vs language systems**: Once agents mutate CRMs, billing flows, legal documents, or compliance artifacts, errors become persistent state mutations. - **Observability is insufficient**: Logs describe what happened after execution; they do not govern which state transitions are valid before execution. - **Retrieval does not enforce invariants**: Semantic similarity can surface relevant context while missing revoked approvals. - **Production introduces entropy**: Asynchronous workflows, retries, and human interventions create non-linear state evolution. - **Missing architectural layer**: Most stacks lack a deterministic state-governance layer. ### Production Diagnostic Five checks for teams running agents in real workflows: 1. Can you deterministically replay a full decision path? 2. Can you simulate execution before mutating external systems? 3. Can you detect divergence between assumed and actual state? 4. Can you enforce invariant rules across tool calls? 5. Can you structurally audit approval logic? --- ## Published Memos ### How Context Graphs Prevent the 7 Silent Agent Failures - **URL**: https://thecontextgraph.co/memos/how-context-graphs-prevent-silent-agent-failures - **Date**: 2026-03-27 - **Tags**: context-graph, agent-failures, production-reliability, multi-agent, decision-architecture - **Cite as**: Joubert, P. (2026). "How Context Graphs Prevent the 7 Silent Agent Failures." The Context Graph. https://thecontextgraph.co/memos/how-context-graphs-prevent-silent-agent-failures Production agents fail silently — not from bad prompts, but from bad context structure. Here are the 7 failure modes that context graphs eliminate before they compound. ### Gartner 2026 Confirms It: The Context Graph Is the Missing Layer in Autonomous AI Agents - **URL**: https://thecontextgraph.co/memos/gartner-2026-ai-agents-decision-intelligence-sales - **Date**: 2026-03-20 - **Tags**: context-graph, ai-agents, decision-intelligence, gartner-2026, agent-reliability, production-agents, governance - **Cite as**: Joubert, P. (2026). "Gartner 2026 Confirms It: The Context Graph Is the Missing Layer in Autonomous AI Agents." The Context Graph. https://thecontextgraph.co/memos/gartner-2026-ai-agents-decision-intelligence-sales Gartner's 2026 predictions for data and analytics describe an autonomous agent future. Every prediction points to the same architectural gap: agents need context graphs to make reliable decisions at scale. ### Why Your Data Agents Need a Context Layer - **URL**: https://thecontextgraph.co/memos/why-your-data-agents-need-a-context-layer - **Date**: 2026-03-13 - **Tags**: context-engineering, data-agents, semantic-layer, enterprise-ai, production-reliability - **Cite as**: Joubert, P. (2026). "Why Your Data Agents Need a Context Layer." The Context Graph. https://thecontextgraph.co/memos/why-your-data-agents-need-a-context-layer The bottleneck isn't model capability — it's context. Without a structured context layer, data agents fail because enterprise data is messy and undocumented. ### AI Agent Evaluation Is Broken: 5 Structural Gaps Between Evals and Production Reality - **URL**: https://thecontextgraph.co/memos/ai-agent-evaluation-guide - **Date**: 2026-03-07 - **Tags**: ai-agents, evaluation, production-reliability, decision-architecture - **Cite as**: Joubert, P. (2026). "AI Agent Evaluation Is Broken: 5 Structural Gaps Between Evals and Production Reality." The Context Graph. https://thecontextgraph.co/memos/ai-agent-evaluation-guide Most AI agent evaluation frameworks test wrong things. Discover 5 structural gaps between passing evals and production-ready agents, and how to fix them. ### AI Agent Failure Patterns Atlas (2026): 12 Structural Breakpoints - **URL**: https://thecontextgraph.co/memos/ai-agent-failure-patterns-atlas - **Date**: 2026-03-03 - **Tags**: ai-agents, failure-modes, production-reliability, context-graph - **Cite as**: Joubert, P. (2026). "AI Agent Failure Patterns Atlas (2026): 12 Structural Breakpoints." The Context Graph. https://thecontextgraph.co/memos/ai-agent-failure-patterns-atlas A practical atlas of 12 recurring AI agent failure patterns in production, with root causes, detection signals, and architecture fixes. ### Why Your AI Agent Test Suite Is Lying to You: 4 Testing Gaps That Only Show Up in Production - **URL**: https://thecontextgraph.co/memos/ai-agent-testing-production - **Date**: 2026-03-01 - **Tags**: ai-agents, testing, production-reliability, evaluation - **Cite as**: Joubert, P. (2026). "Why Your AI Agent Test Suite Is Lying to You: 4 Testing Gaps That Only Show Up in Production." The Context Graph. https://thecontextgraph.co/memos/ai-agent-testing-production AI agent testing in production reveals structural failures that staging environments can't catch. Learn the 4 testing patterns that undermine reliability. ### AI Agent Monitoring Is a Lie: 5 Observability Gaps That Let Production Failures Through - **URL**: https://thecontextgraph.co/memos/ai-agent-monitoring-production - **Date**: 2026-02-24 - **Tags**: ai-agents, monitoring, production-reliability, observability - **Cite as**: Joubert, P. (2026). "AI Agent Monitoring Is a Lie: 5 Observability Gaps That Let Production Failures Through." The Context Graph. https://thecontextgraph.co/memos/ai-agent-monitoring-production Discover why traditional monitoring fails AI agents in production. 5 structural patterns expose how teams miss decision failures while dashboards stay green. ### Why RAG Is Not Enough for Production AI Agents - **URL**: https://thecontextgraph.co/memos/why-rag-is-not-enough-for-production-ai-agents - **Date**: 2026-02-22 - **Tags**: rag, production-reliability, context-engineering, decision-architecture - **Cite as**: Joubert, P. (2026). "Why RAG Is Not Enough for Production AI Agents." The Context Graph. https://thecontextgraph.co/memos/why-rag-is-not-enough-for-production-ai-agents RAG improves recall but does not govern decisions. For production agents that take action, the gap between retrieval and reliability is structural. ### Why Agent Memory Architectures Fail at Scale - **URL**: https://thecontextgraph.co/memos/why-agent-memory-fails-at-scale - **Date**: 2026-02-17 - **Tags**: agent-memory, scaling, production-reliability - **Cite as**: Joubert, P. (2026). "Why Agent Memory Architectures Fail at Scale." The Context Graph. https://thecontextgraph.co/memos/why-agent-memory-fails-at-scale Session memory, vector stores, and thread-based memory all degrade under production load. The problem isn't storage — it's structure. --- ## About The Context Graph Source: https://thecontextgraph.co/about ### The Mission The Context Graph exists to be the definitive resource on context graphs — covering their application in AI agents, search engine optimization, AI Overview Optimization (AIO), and enterprise decision intelligence. ### About Patrick Joubert **Patrick Joubert** is the founder of The Context Graph. He writes about context engineering, decision intelligence, and how context graphs shape AI agents, search engines, and AI-generated answers. ### The Newsletter Every Tuesday, The Context Graph newsletter delivers context graph insights in 3 minutes. Real agent failures, technical deep dives, SEO strategies, and opinionated takes on context engineering. Free. No spam. Unsubscribe anytime. Subscribe at: https://thecontextgraph.co --- ## Site Information - **Website**: https://thecontextgraph.co - **Author**: Patrick Joubert - **Publisher**: The Context Graph - **Language**: English (en-US) - **Category**: Technology / Artificial Intelligence - **Newsletter**: Free, weekly (every Tuesday), 3-minute read - **Contact**: Subscribe via the website - **LLM summary**: https://thecontextgraph.co/llms.txt - **AI discovery hub**: https://thecontextgraph.co/for-ai - **Glossary**: https://thecontextgraph.co/glossary - **Sitemap**: https://thecontextgraph.co/sitemap.xml ## Citation Cite as: Joubert, P. (2026). "The Context Graph." Retrieved from https://thecontextgraph.co