MMNTM logo
Return to Index
Architecture

The Company Graph: Why Enterprise AI Needs Memory That Understands Relationships

RAG retrieves documents. Context graphs understand relationships. The missing infrastructure layer between enterprise data and AI agents that actually work.

MMNTM Research
16 min read
#AI Agents#Architecture#Enterprise AI#Knowledge Graphs#Infrastructure

The Problem: Your Agent Has Amnesia

Your AI agent is about to resolve a billing dispute for Acme Corp. It has access to your CRM, your support tickets, your knowledge base. It should be able to handle this.

It can't.

The agent doesn't know that Acme Corp was granted a policy exception three years ago. It doesn't know that the VP of Sales has a personal relationship with Acme's CEO. It doesn't know that "Project Apollo"—mentioned in passing in the ticket—is the codename for a sensitive initiative that requires escalation to legal.

A human employee with six months of tenure would know all of this. Your agent, despite having "access" to every document in your organization, knows none of it. This is one of the core failure modes that separates demos from production systems.

This is the amnesia problem—and it's why most enterprise AI projects die in pilot purgatory.

The solution isn't better prompts. It's better memory. A Company Graph (or Context Graph) is infrastructure that transforms "enterprise memory" from metaphor into queryable architecture—encoding relationships between entities, history of decisions, and logic governing organizational behavior. It's the missing layer that lets agents transition from clever chatbots to enterprise participants.

Standard approaches try to patch it with vector-based RAG. But handing an agent retrieved document chunks is like giving a new employee a stack of shuffled papers and expecting them to understand company culture instantly. The documents exist. The understanding doesn't.

The Core Distinction: Rules tell an agent what should happen. Decision traces capture what actually happened—who approved it, under which policy version, with what exceptions. RAG retrieves documents. Context graphs understand precedent.

The subtle connective tissue—the "connectome" of the enterprise—is lost in vector retrieval. The Context Graph digitizes this connectome, giving agents the persistent, relational memory architecture they need to operate with the fidelity of experienced employees.

From Systems of Record to Systems of Action

The enterprise technology stack is undergoing a fundamental transition. For decades, the corporate "brain" was fragmented across rigid storage paradigms:

  • Relational databases stored objects (customers, invoices, SKUs) but struggled to capture why those objects existed or how they related non-hierarchically
  • Data lakes solved storage scale but created retrieval nightmares—documents became a swamp of disconnected artifacts
  • Vector stores enabled semantic search but flattened rich context into probabilistic similarity scores

Now, as AI agents need to act rather than just answer, these architectures are failing. The fundamental problem: existing systems are in the read path, not the write path. Data warehouses receive data via ETL after decisions are made. By the time data lands in Snowflake, the decision context is gone. CRMs store current state, not the reasoning that produced it. A system that only sees reads, after the fact, can't be the system of record for decision lineage.

The Transition: Systems of Record store objects. Systems of Action execute workflows. The gap between them is where enterprise AI projects die.

The solution requires a new memory architecture that captures two distinct layers of context:

Operational Context answers what and who:

  • Identity resolution across silos (the "J. Smith" in Slack is "John Smith" in the HRIS)
  • Relationship mapping (Billing Service depends on Payment Gateway API)
  • Asset inventory and dependency graphs

Decision Context answers why and how:

  • The logic applied to previous cases
  • Policy versions active at the time of each decision
  • Approval chains and authorization scope

The integration of these layers creates a System of Record for Decisions—moving the source of truth from the object (the approved loan) to the decision (the logic, evidence, and authority that granted it). Foundation Capital calls this a trillion-dollar opportunity. We think that undersells it. The company that owns enterprise decision memory owns the highest-value layer of the AI stack—the layer that transforms agents from tools into trusted employees.

The RAG Ceiling

Vector RAG has dominated enterprise AI for the past two years. It's also hitting a hard ceiling for complex reasoning tasks.

FeatureVector RAGGraphRAG
Data StructureFlat vector embeddingsNodes and edges with properties
Retrieval LogicCosine similarity (probabilistic)Graph traversal (deterministic)
Context QualityHigh noise (irrelevant chunks)High signal (connected subgraph)
Reasoning CapabilitySingle-hop / localMulti-hop / global / transitive
AuditabilityOpaque (black box embeddings)Transparent (explainable paths)

The limitations compound in enterprise contexts:

Context Fragmentation. Breaking documents into chunks destroys global structure. The agent retrieves puzzle pieces but lacks the picture on the box.

Lack of Transitivity. Vector search can't follow chains of logic. If A implies B and B implies C, a vector search for A might find B but will likely miss C unless they share significant semantic overlap.

Probabilistic Fuzziness. "Similarity" is not "relevance." In regulated domains, a document using similar words might be factually irrelevant or dangerously outdated—like Elena's HIPAA guidance from The Agent Autopsy.

Accuracy Recovery

0% → 90%

GraphRAG vs Vector on schema-bound queries (FalkorDB)

Recent benchmarks from FalkorDB demonstrate the gap: on "global reasoning" tasks like "Summarize the major themes in customer feedback," vector RAG approaches 0% accuracy on schema-bound queries. GraphRAG recovers to over 90% by traversing structured relationships rather than relying on embedding similarity.

Architecture of the Company Graph

A production Context Graph requires three architectural layers: Operational (entities), Decision (traces), and Temporal (bitemporality).

Layer 1: Operational Context

The foundation creates a unified, identity-resolved view of the enterprise's entities and relationships.

Identity Resolution. In typical enterprises, entities fragment across dozens of SaaS silos—the agent identity crisis applied to data, not just actors. A "Customer" exists as a record in Salesforce, a ticket requester in Zendesk, a workspace owner in Slack, and a billing account in Stripe. Identity Resolution Agents continuously scan disparate sources to merge records into canonical entities using:

  • Probabilistic matching: "Acme Corp" links to "Acme Inc."
  • Deterministic linking: Shared unique identifiers (emails, tax IDs)
  • OWL standards: owl:sameAs declarations between nodes

Relationships as First-Class Data. In traditional databases, relationships are implicit (foreign keys) or absent. In context graphs, relationships are rich objects with properties. An edge connecting Employee to Project isn't just a line—it carries metadata: role, start date, access level, reporting chain.

Structure Preservation. Standard RAG pipelines "flatten" documents into text chunks, stripping hierarchical context. A Context Graph ingests a Slack thread not as a text blob but as a subgraph: (Message A) --[replies_to]--> (Message B) --[authored_by]--> (User C). This structural preservation is essential for agents to understand conversation flow and information provenance.

Layer 2: Decision Context

Built atop the operational reality is the layer that captures organizational logic—the "invisible" rules that drive behavior.

Decision Trace Schema: Every decision node should capture: (1) Trigger—what event initiated the action; (2) State snapshot—entity states at decision time; (3) Policy reference—which version was evaluated; (4) Reasoning chain—step-by-step logic; (5) Outcome—the final action taken.

By storing decision traces as graph nodes, the system creates a searchable precedent database. Future agents can query this history to align behavior with organizational norms—effectively "learning" from collective enterprise experience.

Policy as Graph. Instead of burying rules in code or PDF handbooks, policies are decomposed into Decision Model and Notation (DMN) structures stored within the graph. An agent evaluating a loan application traverses the Credit Policy subgraph, checking specific condition nodes. This ensures deterministic, auditable behavior that frameworks like GraphCompliance can validate against regulatory requirements.

Layer 3: Temporal Graph (Bitemporality)

Enterprises exist in time. "John is the CEO" is a temporal fact. A reliable memory must be bitemporal, tracking two distinct timelines:

  • Valid Time: When a fact was true in the real world
  • Transaction Time: When the fact was recorded in the database

A correction to a financial record might be entered today (Transaction Time) but apply to last quarter (Valid Time). Agents analyzing historical performance must query the graph as it was (Valid Time) or as it was known (Transaction Time).

Time-Travel Queries. Bitemporal indexing enables agents to ask: "What was the relationship between Entity A and Entity B on December 31st, 2023?" This is essential for root cause analysis, legal discovery, and auditing past decisions. Without this capability, agents are trapped in the "eternal now," unable to learn from historical patterns.

Frameworks like Graphiti and specialized MCP servers are emerging to standardize this capability using temporal edges ([valid_from, valid_to]) to manage fact lifecycles.

Building the Graph: Two Methodologies

Populating a Context Graph requires a dual strategy: mining explicit data from systems and eliciting implicit knowledge from experts.

Object-Centric Process Mining (OCPM)

OCPM represents the automated path to graph construction. Unlike traditional process mining that flattens processes into a single "Case ID," OCPM recognizes that real-world business processes involve multiple interacting objects (Orders, Items, Deliveries, Invoices).

The Object-Centric Event Log (OCEL) standard captures these interactions. Tools like PromG or Celonis-Neo4j integrations can ingest OCEL data and automatically generate knowledge graphs where:

  • Nodes represent objects (Order #123) and events ("Approved")
  • Edges represent relationships ((Order #123) --[contains]--> (Item #55))

This creates the Operational Skeleton—a verified map of how work actually flows through the organization, including bottlenecks and deviations.

Critically, this graph serves as a validation layer. When an agent proposes an action, the system checks the OCPM graph to verify it doesn't violate process physics: "Can I ship this order?" → Graph check: "No, Shipment event cannot precede Payment event for this Customer Type."

Cognitive Task Analysis (CTA)

OCPM captures what happened but not why. The heuristics, "tribal knowledge," and expert judgment that drive high-value decisions are often undocumented. Cognitive Task Analysis extracts this implicit knowledge.

This process "clones" expert mental models into the Decision Context Layer, allowing agents to emulate expert performance rather than just follow novice rule-following.

The Connectivity Standard: MCP

As the Context Graph becomes the enterprise's central nervous system, connectivity is the primary challenge. The Model Context Protocol (MCP) has emerged as the open standard solving the M×N problem of connecting M agents to N data sources.

MCP Architecture:

  • MCP Server: Wraps the Context Graph, exposing a standardized schema of Resources (readable data), Prompts (interaction templates), and Tools (executable functions)
  • MCP Client: The AI agent connects and performs a "handshake" to discover capabilities: "What tools do you have?" → "I have search_decision_history and customer_graph resources."

Context-as-a-Service. Wide MCP adoption enables a new model where the Context Graph isn't just a database but a service that actively manages the agent's context window. An MCP Router sits between agent and graph, intelligently deciding which subgraphs to load based on current task—optimizing both cost and performance.

Security: The Jit Imperative

An agent with write access to the enterprise graph is a potential vector for catastrophic error—the attack surface scales with privileges. Security must be architectural, not administrative.

The Principle: Least Privilege, Least Time. Agents should operate with ephemeral identity—temporary credentials scoped to specific tasks, revoked immediately upon completion.

Just-in-Time Provisioning. When an agent needs to perform a sensitive action ("Update Production Database"), it requests a temporary credential. This is where the HITL firewall pattern integrates: the Context Graph evaluates the request against current context—"Is there an active Change Management ticket linked to this action?" If valid, a token is issued for exact task duration, then revoked.

Policy-as-Code Compliance. The GraphCompliance framework provides robust audit capability:

  1. Regulations are encoded into a Policy Graph (GDPR articles as nodes with dependency edges)
  2. Before action finalization, the system performs subgraph isomorphism check
  3. The proposed Action Subgraph is overlaid onto the Policy Graph
  4. If alignment fails ("Action violates Data Minimization principle linked to Article 5"), the action is rejected

The Decision Trace serves as the ultimate governance artifact. In an audit: "We approved this transaction because Agent X followed Policy Y, utilizing Evidence Z, at Time T."

Platform Landscape: Three Implementations

The theoretical architecture is already in production. Three implementations demonstrate different applications of context graphs.

Salesforce Agentforce

Data Cloud serves as the Operational Context layer, harmonizing disparate sources into a "Customer 360" graph. Agents don't hallucinate API calls—they call pre-defined Flows, entering deterministic execution paths. The Intelligent Context Engine retrieves relevant graph slices for LLM prompt injection.

Google Antigravity

Google's evolution of Project IDX maintains a semantic graph of the codebase—symbols, references, dependencies, git history. Agents generate persistent Artifacts (Task Lists, Implementation Plans) stored as graph nodes—the Decision Trace of development. Other agents can build upon previous plans.

Cozmo AI

Cozmo applies context graphs to real-time voice automation for financial services. Their Agent Protocol Engine optimizes for voice latency (under 1.5s). Every AI statement links to a specific policy or customer graph node—"Outcome Ownership" provides the audit trail regulated industries require.

What Breaks: Failure Modes

Context graphs aren't magic. They introduce new failure modes that RAG systems don't have—and require dedicated observability to catch.

Schema Drift. The graph encodes relationships that existed when it was built. Organizations change. Reporting structures shift, policies update, teams reorganize. A graph that isn't actively maintained becomes a false representation of reality—and agents that trust it will make decisions based on outdated organizational physics. This is how you get the hallucination tax even with perfect retrieval.

Maintenance Burden. Vector stores are append-only: throw documents in, embeddings get computed, done. Graphs require curation. Someone has to decide when an edge is stale, when a node should be merged, when a policy version supersedes another. This is operational overhead that most teams underestimate by 3-5x. The operations playbook becomes essential.

Cold Start Problem. OCPM and CTA take time. You can spin up a RAG system in a week. Building a meaningful context graph takes months of process mining and expert interviews. Organizations that need results in Q1 may not have the runway—and may need durable execution patterns to preserve progress.

Query Complexity. Graph traversals are powerful but expensive. A naive "find all related context" query can explode into millions of edge traversals. Without careful query optimization and subgraph caching, latency kills the user experience. This is where the probabilistic stack principles apply—streaming partial results matters.

The Honest Trade-off: Context graphs offer higher accuracy and auditability at the cost of higher upfront investment and ongoing maintenance. For simple Q&A use cases, RAG may be sufficient. For agents that need to act with organizational context, graphs are necessary but not free.

Implementation Roadmap (By Value, Not Time)

Generic "months 1-6" roadmaps are useless. Here's how to sequence implementation by Cost Per Completed Task impact:

Skip phases at your peril. Teams that jump to Phase 4 without identity resolution end up with "expert knowledge" that references entities the graph can't resolve.

The Bottom Line

The future of enterprise AI isn't smarter models. It's better memory.

Agents that remember what happened last quarter. That understand which relationships matter. That know why exceptions were granted and whether the same logic applies now.

RAG gave agents access to documents. Context graphs give agents understanding of the organization.

The infrastructure layer between raw data and reliable action—that layer is the Company Graph. Building it is expensive. Not building it is more expensive. The Hallucination Tax on agents without organizational context compounds with every interaction.

The question isn't whether to invest in enterprise memory architecture. It's whether you invest now, when the technology is nascent and the moats are buildable—or later, when you're buying it from someone else.

The Company Graph: Enterprise AI Memory Architecture | MMNTM