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 |
2. Why Identity, Consent, and Region Stay Out of Caller Arguments¶
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, ortruthClassin 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
jurisdictionsdefaults to the tenant's server-sideregion_profile. Passingjurisdictions: ["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"
}
}
- Policy check: OPA verifies active consent, confirms
["US"]is within the tenant'sregion_profile, confirmsmodel_alias: "standard"is an approved tier alias (never a raw provider model name), and emits adecision_id. - Trace correlation:
traceparentandx-litellm-trace-idnormalize to a single 32-hextrace_idcarried across gateway spans, OPA decision logs, and LiteLLM spend attribution. - Sealed provenance (
answer-record.v1): The response returnsanswer_ref: "ar:2026-12-01:001",decision_ids,trace_id, and a canonical SHA-256 seal (hashes.record_sha256). Any later read viacontext_provenance_auditorGET /api/v1/context-plane/answer-records/ar:2026-12-01:001re-verifies the digest and enforces tenant isolation fail-closed.