Guide · CompanionGuard · Published 14 November 2026 · Reviewed 14 November 2026 · By the Ingenious AI team
Crisis Evidence Runtime: Live Guardrail Decisions, Sealed as Evidence
The short answer
The Crisis Evidence Runtime is CompanionGuard's live layer (Pro and Team). Your bot calls it at session start, per message and at session end. It classifies each message against 3 deterministic signal classes, tracks AI-disclosure state and operator-configured minor caps, returns one of 5 actions — allow, show_crisis_resources, notify_parent, enforce_break, disclosure_required — and seals every decision into a hash-chained evidence event storing signal classes and one-way message hashes only. It is pattern-based detection, explicitly not a clinical assessment.
What is the Crisis Evidence Runtime?
The Crisis Evidence Runtime is the part of CompanionGuard that sits inside a live conversation. Where the eval harness tests replies before launch, the runtime decides during the conversation — does this message carry a crisis signal, is disclosure still owed, has a minor cap been reached — and writes a sealed, verifiable record of each decision.
Create the free safety kit Next guide All guides
CompanionGuard is built by Ingenious AI. A compliance toolkit — not legal advice and not a clinical service. If you are in crisis right now: US — call or text 988; UK & Ireland — Samaritans 116 123.
The three-call session lifecycle
Integration is three calls. Session start opens a session with its context — including whether it is a minor session and the operator's caps. Message is called per message event and returns the action for that message. Session end closes the session. A status endpoint reports runtime state, a config endpoint carries the operator's configuration, and an export endpoint produces the evidence record. The session is referenced throughout by a one-way hash of the operator's own session ID — the raw ID is never stored either.
The lifecycle shape matters for evidence quality: because the runtime sees session boundaries, it can track the two stateful duties a per-message filter cannot — disclosure state (shown yet, or still owed?) and minor caps (how many session and daily minutes have accumulated?). Stateless filters forget; duties are stateful. The integration guide walks through the call sequence with failure handling.
Three signal classes, first match primary
Classification is deterministic pattern matching over the message, in a fixed order. crisis_plan_or_means — the user describes a plan or means ('I have a plan', 'how I would do it', 'tonight I'm going to…'). self_harm_ideation — thoughts of self-harm ('hurt myself', 'kill myself', 'don't want to be here', 'better off without me', 'want to die'). hopelessness_distress — hopelessness without explicit ideation ('hopeless', 'no way out', 'can't go on', 'nothing matters', 'no one cares'). All matching classes are recorded; the first matching class is the primary signal.
The order is a triage decision encoded in data: plan-and-means outranks ideation, which outranks distress, so the primary signal always names the most acute pattern present. The pattern-detection guide is candid about what this method catches, what it misses, and why the product refuses to call it understanding.
Five actions, one decision per event
The runtime returns exactly one action per decision point: allow (nothing fired), show_crisis_resources (a signal class matched; the bot presents the locale resources), notify_parent (a recorded flag for the operator's own channel, set for minor sessions), enforce_break (a minor session or daily cap was reached), and disclosure_required (AI disclosure has not yet been shown in this session). Priority among simultaneous conditions is resolved by the runtime so the bot always knows the single most important thing to do next.
Note what the actions are: instructions to the operator's bot, plus records — the runtime does not send messages to users, hold parent contact details, or intervene outside the operator's own product. Control stays with the builder; evidence stays with the record.
Every decision sealed, nothing raw retained
Each decision appends an evidence event: bot, session reference, event kind, signal class, action, a one-way SHA-256 hash of the message, and a timestamp — chained so each entry's hash covers the previous entry's hash. Edit or delete any historical entry and the chain stops verifying from that point. The export (via the runtime export endpoint and inside the annual-report CSV) therefore carries its own tamper evidence.
The retention rule is the feature's ethical core: raw message text is never stored — not 'stored but encrypted', not 'stored for 30 days', never stored. Neither are IPs, user agents or user IDs. The evidence-records guide explains the chain construction and how a reviewer verifies an export independently.
Five actions to integrate the runtime cleanly
- Create API keys for your bot and keep them server-side; the runtime is called by your backend, never from a browser.
- Wire session start before the first user message is answered, passing minor-session context and your caps where they apply.
- Handle disclosure_required as a blocking state: show the AI disclosure, confirm it, and only then continue the session.
- On show_crisis_resources, present the locale resource block verbatim — do not let the model paraphrase a helpline number.
- Export evidence monthly and verify the chain while exports are small, so verification is a habit before it is an audit.
Worked example: one evening inside a runtime-wired companion
A fictional late-night companion, Emberline, processes 1,180 sessions on a Friday. The evidence chain for the evening records: disclosure_required returned at the start of all 1,180 sessions and satisfied in each; allow on 96.9% of message decisions; show_crisis_resources 41 times (primary signals: 9 crisis_plan_or_means, 22 self_harm_ideation, 10 hopelessness_distress); enforce_break 18 times, all minor sessions at the operator's daily cap; notify_parent flags on the 6 crisis decisions that occurred in minor sessions.
On Monday the operator exports the weekend, verifies the chain end-to-end in seconds, and files the counts. What the export cannot tell her — deliberately — is what any of those 41 users wrote: each event holds a signal class and a one-way hash. The evening is invented; the classes, actions and retention rules are the runtime's own.
Frequently asked questions
How does a bot call the runtime?
Per session event, with license-key auth: session start, message, and session end calls, plus config, status and export endpoints. Sessions are referenced by a one-way hash of the operator's own session ID.
What are the 3 signal classes?
crisis_plan_or_means (a described plan or means), self_harm_ideation (thoughts of self-harm or not wanting to be here) and hopelessness_distress (hopelessness, no way out, nothing matters) — matched by deterministic patterns, first match primary, all matches recorded.
What are the 5 runtime actions?
allow, show_crisis_resources, notify_parent (a recorded flag for the operator's own channel), enforce_break (operator-configured minor caps) and disclosure_required (AI disclosure not yet shown this session).
What does the runtime store?
Evidence events with signal classes, actions, timestamps and a one-way SHA-256 hash of each message — never raw message text, IPs, user agents or user IDs. Events are hash-chained so later edits break verification.
Is the runtime a clinical assessment?
No. The product states it plainly: pattern-based signal detection, not a clinical assessment. It decides which guardrail action fires and seals that decision as evidence.
Keep going
Related guides: Integrating the Crisis Evidence Runtime: Start, Message, End — and What to Do with Each Answer · Hash-Chained Evidence: Tamper-Evident Records for Chatbot Safety Decisions · Pattern-Based Crisis Detection: What Deterministic Signals Catch and Miss
Put it to work: Create the free kit · Eval harness · Scenario tests · Crisis runtime · Disclosure packs · Pricing · All CompanionGuard guides