Skip to content

The Context Plane: Four Tools, One Sealed Record

Enterprise AI teams rarely fail because their models cannot summarize text. They fail because every agent runtime they adopt — Microsoft Foundry, LangGraph, Strands, LlamaIndex, or n8n — re-implements its own retrieval glue, its own permission checks, and its own ad-hoc citations.

ctxEco separates where reasoning runs from where governed context lives. Any authorized agent runtime connects to one Context Plane (context-plane.v1) over MCP and receives identity-bound, policy-checked, provenance-sealed context.


1. The Four Logical Tools

Tool Purpose Key Bounds
context_local_search Entities and typed relationships within 1–3 hops of explicit seeds max_hops in 1..3, limit in 1..100
context_global_community Hierarchical community summaries for broad "what are the themes" questions level in 0..3
context_drift_traversal Vector seed followed by bounded typed-edge expansion and follow-up loops max_hops in 1..3, max_followups in 0..5
context_provenance_audit Retrieves the sealed answer-record.v1 behind a prior answer_ref Returns nodes, edges, truth classes, consent state, decision_ids, and SHA-256 hashes

In naive agent demos, callers pass tenant_id, clearance, or enforce_consent: true as tool parameters. At a shared edge, any parameter a caller can pass is a parameter a misconfigured or compromised caller can forge or omit.

Under context-plane.v1 and the ctxeco.context_plane OPA policy:

  • Forbidden arguments: Passing tenantId, tenant_id, clearance, consent, enforce_lfpdppp_consent, or truthClass in tool arguments is structurally rejected.
  • Server-side identity binding: The gateway binds tenant, clearance, and subject strictly from the verified token (exchanged at Keycloak via RFC 8693).
  • Server-side consent: OPA reads active tenant consent state (input.consent.active == true); missing or inactive consent denies the call.
  • Narrow-only jurisdictions: Omitting jurisdictions defaults to the tenant's server-side region_profile. Passing jurisdictions: ["US"] under a ["US", "MX"] profile narrows the query; asking for ["EU"] or ["US", "MX"] above a ["US"] ceiling is denied fail-closed.

3. Synthetic Walkthrough: From Query to Sealed answer-record.v1

Consider a synthetic supplier dependency query sent by an external runtime with W3C traceparent and x-litellm-trace-id:

{
  "tool": "context_local_search",
  "arguments": {
    "seeds": ["Supplier_Tier1_Monterrey"],
    "max_hops": 2,
    "predicates": ["SUPPLIES", "OWNED_BY"],
    "jurisdictions": ["US"],
    "limit": 25,
    "model_alias": "standard"
  }
}
  1. Policy check: OPA verifies active consent, confirms ["US"] is within the tenant's region_profile, confirms model_alias: "standard" is an approved tier alias (never a raw provider model name), and emits a decision_id.
  2. Trace correlation: traceparent and x-litellm-trace-id normalize to a single 32-hex trace_id carried across gateway spans, OPA decision logs, and LiteLLM spend attribution.
  3. Sealed provenance (answer-record.v1): The response returns answer_ref: "ar:2026-12-01:001", decision_ids, trace_id, and a canonical SHA-256 seal (hashes.record_sha256). Any later read via context_provenance_audit or GET /api/v1/context-plane/answer-records/ar:2026-12-01:001 re-verifies the digest and enforces tenant isolation fail-closed.