Open protocol · contextgraph/1.0-draft

Context you can
account for.

AI agents run on context. Today that context is usually an opaque pile of text. Context Graph Protocol turns it into typed, budgeted, cited, time-aware evidence—with consent and conformance built into the wire.

3Rust crates
7wire guarantees
2permissive licenses
ContextFrame4,096token budget
Task

The current goal anchors retrieval and sets the context budget.

MIT OR Apache-2.0In-process · stdio · HTTPLanguage-neutral JSON wireLocal-first by design
01 · The problem

Your agent has a context supply chain. It just cannot see it.

Search results, memories, documentation, policies, and code snippets all enter the model through the same untyped channel. Once flattened into a prompt, origin, authority, freshness, cost, and consent disappear.

BeforeThe blob pipe
vector searchgrepmemoryremote API
raw text??
MODEL
  • 01No enforceable token budget
  • 02No reliable provenance or citation
  • 03No record of what left the machine
  • 04No temporal truth or revision lineage
  • 05No way to measure whether context helped
AfterThe context graph
Provider
capability
Budgeted query
frames
typedcitedverified
compose
MODEL

“Where did this come from, was it allowed, how much did it cost, and was it valid?” become protocol questions with machine-checkable answers.

02 · The contract

Seven guarantees. One accountable frame.

These guarantees reinforce each other. Provenance without consent can still leak data. Budgeting without conformance still relies on trust. The protocol makes the combination the unit of interoperability.

01
Wire guarantee

Provenance

Frames carry origin URIs, ranges, digests, derivation methods, and producer identity. Context becomes evidence with a lineage—not anonymous text.

ContextFrame.provenance
03 · The wire surface

Three shapes carry the protocol.

A provider describes its behavior before seeing data. A host sends a bounded request. The provider returns inspectable frames that remain untrusted content until the host validates and composes them.

01
Handshake

Capability

Identity, version, supported frame kinds, transport limits, and declared data flow.

data_flow: {
  reads: true,
  writes: false,
  egress: false
}
declare before disclosure
02
Request

Query

A goal, anchors, desired kinds, temporal filters, frame limits, and a hard token ceiling.

goal: "change checkout flow"
anchors: ["CheckoutService"]
max_frames: 12
max_tokens: 4096
retrieve within contract
04 · Time-aware context

A fact is not timeless just because it was embedded.

Context Graph Protocol preserves revision lineage and validity windows. Future lifecycle work adds explicit origin-observation and provider-receipt semantics so a host can reconstruct both what was true and what it knew at the time.

MARAPRMAYJUN
us-east-1 · revision 01
us-west-2 · revision 02
May 12
Historical resultDeploy region: us-west-2
valid_at: 2026-05-12

The superseding fact is current. The earlier claim remains reconstructable, not deleted.

05 · A vocabulary agents can reason over

Not everything remembered should become an instruction.

The lifecycle profile keeps episodes, claims, steering, and proof separate. That boundary is the defense against an agent silently converting “this happened” into “always do this.”

What was detected

Observation

An occurrence or interpretation with no truth or instruction authority.

immutable event
What is believed

Knowledge

A fact, provisional assumption, or recorded architectural decision.

fact · assumption · decision
What happened

Memory

A bounded episode or summary—not automatically current truth.

episode · summary
How to behave

Directive

Governed steering with explicit scope, authority, and enforcement.

preference · rule · constraint · procedure
Why trust it

Evidence

An addressable source that supports or challenges another record.

locator · digest · relation
What completion means

Artifact contract

A versioned, machine-checkable definition of an acceptable deliverable.

requirements · validation
06 · The governed learning loop

Agents can improve without promoting their own guesses to policy.

Evidence can move through a reviewable promotion ladder, enter a compiled context frame, and be evaluated against real outcomes. Every transition is an event, not an opaque mutation.

Observe

Observation

A correction, validator result, Git change, or repeated behavior is recorded without instruction authority.

Soloobservation → advisory → keep / edit / ignore

Low-friction learning, local by default, with explicit confirmation for blocking behavior.

Teamproposal → owner review → repository publication

Shared steering gains accountable identity, review history, and repository scope.

Regulatedproposal → policy gate → signed publication

RBAC, attestations, retention commitments, and auditable organization policy.

07 · Interactive lifecycle concept

See which context changed the work—and which didn't.

A Context Receipt links what entered a task to observable decisions, actions, and outcomes—not private reasoning or causal certainty.

Lifecycle prototype · not in the 1.0 retrieval wire
Task
Create the adaptive Stella brand kit
Outcome
Delivered · artifact contract passed
Frame / Receipt
5 selected context items · 1 missing-context observation · evidence varies by entry

Selected context: Brand-kit delivery contract. Moved the work.

Impact assessment

Brand-kit delivery contract

Moved the work

Four stages connect the receipt entry to only the decisions, actions, and outcomes supported by observable evidence.

  1. Context itemArtifact contract · revision 03plan-checklist-04
  2. DecisionCreate a required-file checklist before generation.plan-checklist-04
  3. Observable actionProduced the wordmark, mark, theme variants, manifest, and social preview.brand-manifest.json
  4. Verified outcomeAll required deliverables passed the bound artifact contract.validation-07

Attribution basis Direct artifact and validation references · confidence 94/100

Influence statement
The contract made the required deliverables explicit before generation began.
Evaluation method
deterministic_validation
Evaluation
helpful
Confidence
94/100

No chain-of-thought is stored. This receipt records a bounded influence claim and observable references.

Receipt statuses are derived from bounded observations, not a usefulness score. Self-report is not proof.

View evidence
08 · The ecosystem

Open mechanism. Independent hosts. Optional enterprise control.

The protocol is deliberately smaller than the products built around it. Hosts own learning and prompt policy. Providers own retrieval. Enterprise platforms may add governance without becoming a runtime dependency.

Open-source host

Stella

Local/BYOK agent, code graph, context compiler, trace mining, governance, contracts.

  • No account required
  • Local SQLite stores
  • Git-native repository rules
QUERY
open wire contractContext Graph Protocolcapability · query · frame · lifecycle
FRAME
Provider ecosystem

Any provider

Code search, documentation, memory, policy, data catalogs, or specialized graphs.

  • In-process, stdio, or HTTP
  • Independent implementation
  • Conformance-tested
Optional control plane

Oxagen

Hosted workspaces, RBAC, organization policy, encrypted sync, audit, and integrations.

  • Commercial—not protocol-required
  • Multi-user governance
  • Enterprise operations
Complementary protocols

MCP connects actions. Context Graph connects evidence.

Context Graphretrieve → verify → composeprompt context
MCPdiscover → call → returntools & actions
09 · Why adopt it

Build the context layer once. Keep your choices open.

For agent builders

Compose retrieval without hard-coding every backend.

One host interface for local code, memory, docs, policies, and remote providers—with budgets and citations that compose.

  • Provider portability
  • Deterministic prompt inputs
  • Auditable failures
For provider builders

Ship one integration that any conforming host can understand.

Declare capabilities, accept typed queries, return frames, and prove behavior with the conformance suite.

  • Stable JSON surface
  • CI-verifiable compatibility
  • No host-specific plugin maze
For platform teams

Make context movement visible before scaling agents.

Consent, provenance, scope, temporal validity, and retention become explicit integration boundaries.

  • Data-flow governance
  • Historical reconstruction
  • Vendor-neutral controls
10 · What comes next

From accountable retrieval to accountable learning.

The protocol works today for typed retrieval. The roadmap extends the same provenance and conformance discipline to lifecycle exchange—without moving host governance into the wire.

Available now

Accountable retrieval

  • Capability negotiation
  • Budgeted context queries
  • Typed frames and citations
  • Consent-gated egress
  • Host runtime and conformance suite
Lifecycle profile

Durable context exchange

  • Immutable typed context records
  • Observed and valid-time semantics
  • Full, compact, and reference frames
  • Append receipts and idempotency
  • Record rehydration and feedback
Ecosystem future

Context as infrastructure

  • Provider SDKs beyond Rust
  • Portable artifact contracts
  • Signed organization policy
  • Optional synchronization profile
  • Independent conformance certification

Roadmap items are directional design work, not promises of shipped behavior. Continuous synchronization requires a separate profile for cursors, change feeds, tombstones, conflicts, acknowledgements, and offline replay.

The context layer should be open

Help define the protocol agents will reason over.

Read the draft. Build a provider. Run conformance. Challenge the semantics. The goal is not another private memory silo—it is a context ecosystem any host can inspect and trust.