← Home

Context Graphs — Agent Trajectories and Organizational Memory

Synthesis of Foundation Capital’s (Ashu Garg) context graphs concept: an infrastructure layer that turns agent traces into a compounding asset.


Definition

Context Graph: a graph that captures AI agent decision-making trajectories. Not just what the agent did, but how and why. A system of records for decisions, not just data.

“A system of record for decisions, not just data.” — Dharmesh Shah (HubSpot)

“We’ve entered the era of context, where organizational knowledge becomes the competitive differentiator.” — Aaron Levie (Box)


Key Concepts

Agent Trajectories

When an agent performs a task, it traverses the organization’s state space: touches systems, reads data, calls APIs. This trajectory is a decision trace.

Each trajectory captures:

As trajectories accumulate, an organizational world model emerges.

Decision Traces

Difference between “traces” in observability and “decision traces”:

Agents sit on a unique set of trajectories representing real decision-making in organizations, something otherwise impossible to observe directly.

Half-life of Decisions

Decisions have an expiry date:


Connection to Process Mining

Context graphs extend Process Mining ideas (Celonis, UiPath):

Process Mining Context Graphs
Business process mapping Decision mapping
System logs (SAP, Salesforce) Agent trajectories
Flow optimization Training agents on precedents
Static maps Living, updatable graphs
Human processes Human + agent hybrid

Practical Cycle: Capture -> Retrieve -> Apply

Not a formal standard, but a working pattern for using decision traces:

  1. Capture: record agent decisions into a graph (what + why)
  2. Retrieve: before new task, search for similar precedents
  3. Apply: adapt found patterns to current situation

Each successful action improves future ones, creating compound learning.

Note: “Context graphs” is Foundation Capital’s VC thesis term, not a technical standard. The pattern matters, not the branding.


Ontology Debates

Three approaches to structuring context graphs:

Emergent Ontology (PlayerZero / Animesh)

Prescriptive Ontology (Palantir)

Three layers:

  1. Semantic layer: objects and relationships
  2. Kinetic layer: actions and flows
  3. Dynamic layer: simulations and decision logic

Hybrid (Graphlit et al.)


Trillion-Dollar Thesis

Economic value of context graphs:

  1. Reduced compute waste: reuse proven decision paths instead of re-deriving them
  2. Faster onboarding: new agents bootstrap from accumulated knowledge
  3. Compound learning: every action improves future ones
  4. Enterprise memory: organization retains agent expertise across team changes
  5. Network effects: value grows with graph enrichment (more traces = better precedents)

First mover to capture decision traces in a high-value domain builds a compounding moat.


Practical Implementation

For Small Projects and Assistants

Context graphs don’t require enterprise scale. Already working at small scale:

  1. Session history (already implemented in solograph)

    • session_search: search past Claude Code sessions
    • Each session = decision trajectory
  2. CodeGraph (already implemented)

    • codegraph_query: Cypher queries on code graph
    • codegraph_explain: architectural overview
    • codegraph_shared: shared packages across projects
    • Structural memory about code
  3. Knowledge Base (already implemented)

    • kb_search: semantic search
    • Decisions, patterns, precedents
  4. Source Graph (already implemented)

    • source_search: Telegram, YouTube
    • source_related: related videos by tags
    • External knowledge sources in graph

What to Strengthen


Connection to Harness Engineering

Context graphs and harness engineering complement each other:

Harness Engineering Context Graphs
Prevents mistakes Learns from decisions
Guardrails and linters Decision traces and precedents
Encodes “how not to” Encodes “how to do it right”
Static rules Living, growing graph
Per-repository Cross-organization

Together: harness constrains the agent, context graph helps choose the best path within constraints.


Evaluation via Context Graphs

Assess agents through their decision traces:


Industry and Adoption


Sources:

Sources

Related