| Internet-Draft | CRP Core | May 2026 |
| Vidiniotis | Expires 25 November 2026 | [Page] |
The Context Relay Protocol (CRP) defines a structured, language-agnostic protocol for managing AI context, safety governance, and compliance evidence in deployed large language model (LLM) systems. CRP operates as an HTTP-compatible sidecar protocol, enriching every AI request/response cycle with standardised headers carrying context quality, hallucination risk, provenance integrity, and regulatory classification metadata.¶
This document defines the foundational axioms, request/response model, sidecar architecture, and the normative relationship between CRP's subsystems: the Context Envelope, Contextual Knowledge Fabric (CKF), Decision Provenance Engine (DPE), and the Audit Chain.¶
This is a working draft of the CRP Core Specification, published for review and comment. Feedback may be submitted via email to contact@autocyberai.com or contact@crprotocol.io, or at the CRP GitHub repository at github.com/crprotocol/spec.¶
This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.¶
Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at https://datatracker.ietf.org/drafts/current/.¶
Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."¶
This Internet-Draft will expire on 25 November 2026.¶
Copyright (c) 2026 IETF Trust and the persons identified as the document authors. All rights reserved.¶
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document.¶
Large language model systems deployed in production lack a standardised mechanism for communicating the quality, safety, and compliance state of their outputs to consuming applications, intermediary services, and governance platforms. Each system operator builds bespoke instrumentation to capture hallucination risk, session state, and audit trails — leading to fragmented, non-interoperable approaches.¶
The Context Relay Protocol addresses this gap by defining:¶
CRP is designed to complement, not replace, existing AI agent protocols:¶
| Protocol | Role | CRP Relationship |
|---|---|---|
| MCP (Model Context Protocol) | Tool/resource access for agents | CRP governs the AI calls MCP agents make |
| A2A (Agent-to-Agent) | Inter-agent communication | CRP headers propagate safety state across A2A hops |
| OpenAI API | LLM inference | CRP gateway proxies OpenAI-compatible endpoints |
| HTTP/1.1, HTTP/2 | Transport | CRP headers are carried as standard HTTP header fields |
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174].¶
CRP-Agent-Safety-Budget.¶
CRP's design is governed by ten foundational axioms. All conformant CRP implementations MUST uphold these axioms.¶
CRP-Oversight-Mode: halt directive
MUST be honoured unconditionally.¶
CRP-Context-Tokens-Used and
CRP-Context-Window headers.¶
CRP-Context-Continuation-Id
header MUST enable stateless session relay.¶
+----------------------------------------------------------+
| Client Application |
| (sends CRP-Accept-*, CRP-Safety-Policy, CRP-Session) |
+-------------------------+--------------------------------+
| HTTP request with CRP req headers
v
+----------------------------------------------------------+
| CRP Gateway |
| +----------+ +----------+ +----------+ +----------+ |
| | Envelope | | DPE | | Audit | | Comply | |
| | Builder | | (Safety) | | Chain | | Feed | |
| +----------+ +----------+ +----------+ +----------+ |
+-------------------------+--------------------------------+
| Stripped request (no CRP headers)
v
+----------------------------------------------------------+
| LLM Provider |
| (OpenAI / Anthropic / Gemini / Ollama) |
+----------------------------------------------------------+
¶
CRP-Context-If-Match — returns 304 if ETag matches.¶
CRP-Accept-Strategy or TaskIntent detection.¶
CRP-Safety-Policy.¶
halt-on CRITICAL): returns HTTP 451, fires report-uri webhook.¶
CRP-Set-Session token.¶
CRP implements a four-tier memory hierarchy:¶
| Tier | Name | Latency | Persistence | CRP Header |
|---|---|---|---|---|
| 0 | Active (in-context) | <1ms | Call-scoped |
CRP-Context-Window
|
| 1 | Hot (session cache) | <10ms | Session-scoped |
CRP-Context-Session-Id
|
| 2 | Warm (recent CKF) | <100ms | Cross-session |
CRP-Memory-CKF-Hits
|
| 3 | Cold (full CKF graph) | <1000ms | Persistent |
CRP-Memory-Knowledge-Age
|
CRP defines three conformance levels:¶
CRP-Context-Quality-Tier,
CRP-Safety-Hallucination-Risk,
CRP-Provenance-HMAC), session tokens, and HTTP 451
halt. This is the minimum viable governance level.¶
CRP headers on responses MUST be generated by the CRP gateway, not by LLM output. Implementations MUST validate that no CRP-prefixed headers are present in raw LLM responses before injection.¶
The CRP-Set-Session token MUST be signed with
HMAC-SHA256 using a session key not derivable from the token
payload. Tokens MUST include an expiry and MUST NOT be
accepted after expiry.¶
The HMAC chain MUST be computed as:
HMAC-SHA256(window_content || previous_HMAC, session_key).
Any break in the chain (verified via
CRP-Provenance-Chain-Integrity: BROKEN) MUST trigger
an audit incident.¶
CRP gateways that vault LLM provider credentials MUST store keys encrypted at rest. Client applications MUST NOT be required to hold LLM provider credentials when using a CRP gateway.¶
This document requests registration of the CRP- prefix
in the HTTP Field Name Registry at
https://www.iana.org/assignments/http-fields
per [RFC9110] Section 16.3.¶
A complete list of headers for registration is provided in CRP-SPEC-002 (Header Specification).¶
| Version | Date | Changes |
|---|---|---|
| 1.0.0 | 2024-01-01 | Initial protocol release |
| 2.0.0 | 2024-06-01 | DPE integration, HMAC chain |
| 3.0.0 | 2026-05-24 | Header specification, Safety Policy, Session Token |