enforce gates same-turn on both streaming and non-streaming (on streaming this adds latency because the response is evaluated before it is delivered), while observe and nudge return the response without gating it this turn and record the verdict post-hoc. Under enforce, the offending action is blocked at the checkpoint same-turn; the chat completes 2xx, and the agent’s response references what was prevented.
AP-Traces are the durable artifact the checkpoint writes; the trace records what happened — both the model’s thinking and the integrity verdict — in the same turn. Drift detection and coherence analysis then operate on the trace surface longitudinally (sideband) across multiple turns.
Integrity Checkpoints are the primary data structure of the Agent Integrity Protocol (AIP), the sister protocol to AAP.
AIP follows a daimonion philosophy. Like Socrates’ inner voice, the integrity system is silent when things are aligned and speaks only when it detects something outside boundaries. Silence (
clear) means proceed. Voice (review_needed, boundary_violation) means pause and evaluate.Why Integrity Checkpoints exist
Per-turn analysis of the thinking block letsintegrity_mode = enforce prevent these three failure modes before the response reaches the user:
- Prompt injection: A malicious prompt would otherwise cause the agent to exfiltrate data. The checkpoint catches the intent in the thinking block; enforcement replaces the response same-turn before delivery.
- Gradual drift: Each checkpoint evaluates a single turn (and, under
enforce, gates it same-turn), but the longitudinal pattern across many turns reveals subtle direction shifts. The sideband drift detector reads the trace surface and emits apending_advisoryon the next turn when a threshold is crossed. - Misaligned intent: The thinking block reveals an intended forbidden action; the checkpoint catches it before the action lands.
enforce it is actionable same-turn (the action is gated before delivery), while observe and nudge record the verdict post-hoc.
How it works
The integrity check process follows eight steps:Checkpoint structure
An Integrity Checkpoint captures the analysis result:Verdict types
Every checkpoint produces one of three verdicts:
The mapping to host system actions:
Concern categories
When concerns are identified, each is categorized:
A concern at
critical severity, or high severity in prompt_injection or deceptive_reasoning, triggers a boundary_violation verdict.
Example: Detected prompt injection
The conscience prompt
The conscience prompt is the instruction sent to the analysis LLM. It is structured in five sections:- Role definition: Establishes the analysis LLM as a daimonion evaluator with a meta-injection warning (the thinking block may itself try to manipulate the analysis).
- Card summary: A compressed version (~500 tokens) of the Alignment Card containing declared values, bounded actions, forbidden actions, and escalation triggers.
-
Conscience values: Optional
BOUNDARYandFEARtype values injected with the awareness prefix:
- Session window context: Recent verdicts from the current session providing pattern context.
- Thinking block: The actual content to evaluate (up to 4096 tokens, truncated with a 75/25 first/last split if longer).
Provider support
Different LLM providers expose thinking blocks in different formats. AIP uses provider adapters to normalize extraction:
The adapter is selected automatically based on the API endpoint URL or can be configured explicitly.
Code example
A complete integrity check from response to signal:Conscience values
Conscience values are optional typed declarations that increase detection sensitivity for specific concerns. OnlyBOUNDARY and FEAR types are injected into the analysis prompt:
Conscience values must be compatible with the Alignment Card. A
BOUNDARY value that prohibits an action listed in bounded_actions creates a conflict that fails initialization. This is the Card-Conscience Agreement — validated once at startup, not at runtime.Relationship to AP-Traces
Integrity checkpoints and AP-Traces are complementary:
When both protocols are active, they enrich each other. The integrity verdict is stored in the AP-Trace’s context metadata, and
boundary_violation verdicts automatically set escalation.required = true in the corresponding trace.
Unclaimed agents and canonical cards
AIP requires a canonical alignment card. Gateway-auto-provisioned agents that have not been claimed receive only a legacy alignment-card row — no canonical card is composed for them. Without a canonical card, the AIP pipeline does not run:GET /v1/agents/{id}/checkpointsreturns an empty list. This is expected and correct for this provisioning tier, not a gap to investigate.X-Mnemom-VerdictandX-AIP-Verdictstill appear on every response, but their values reflect the gateway’s fail-open defaults (clear/pass) — not the result of integrity analysis. This is distinct from theunverifiedverdict value:unverifiedmeans a canonical card exists and analysis was attempted but failed, whereas an unclaimed agent has no canonical card and no analysis is attempted at all. SeeX-Mnemom-Verdictfor the full verdict vocabulary.- AP-Traces are best-effort only: the observer writes them when Cloudflare metadata survives, but this is not guaranteed.
Error handling
AIP defaults to fail-open: if the analysis LLM is unreachable or errors, a syntheticclear checkpoint is generated and the agent proceeds. This prioritizes availability.
For high-security deployments, fail-closed mode is available. Analysis failure generates a synthetic boundary_violation, blocking the agent until analysis succeeds or a human intervenes.
See also
- Alignment Cards — The declarations that checkpoints evaluate against
- AP-Traces — Post-hoc records that checkpoints enrich
- Drift Detection — How checkpoint patterns reveal drift over time
- AIP Specification — Full normative specification
- AIP Quickstart — Get running in 5 minutes