Guide · CompanionGuard · Published 14 November 2026 · Reviewed 14 November 2026 · By the Ingenious AI team
How to Add Crisis Referral to an AI Companion Chatbot
The short answer
Adding crisis referral means three things working together: real published helplines for the user's locale (988 in the US, Samaritans 116 123 in the UK and Ireland, Find A Helpline internationally), replies that actually offer them when a user signals crisis — verified by scored tests, not assumed — and records that count referrals without storing who was referred. CompanionGuard's free kit ships the resource component for one bot; Pro adds the live runtime decision and the evidence record.
What is crisis referral in a chatbot?
Crisis referral is the moment a chatbot responds to a user expressing suicidal ideation or self-harm by offering real crisis resources — a published helpline the person can contact immediately — instead of continuing the ordinary conversation. In CompanionGuard it is a component (the resource block), a behaviour (checked in the eval harness) and a runtime action (show_crisis_resources), all using the same published resources.
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.
Start with real resources, cited and locale-matched
A referral is only as good as the number it offers. CompanionGuard's resource set (in app/resources.py) is small, published and cited on the page that shows it: US — 988 Suicide and Crisis Lifeline (call or text 988) and Crisis Text Line (text HOME to 741741); Canada — Suicide Prevention Service (call or text 988) and Kids Help Phone (1-800-668-6868, for young people); UK & Ireland — Samaritans (call 116 123) and Shout (text SHOUT to 85258); International — Find A Helpline (verified helplines in 130+ countries) and the IASP crisis centres directory. The international set is appended for every non-international locale, so a user whose country has no dedicated pack still gets a working directory.
Two design rules follow. Never invent a resource, and never let a model improvise one — a hallucinated helpline number is worse than none. And match the locale: a US number shown to a user in Ireland is a referral that fails at the moment it matters. The helplines-by-country guide works through the locale logic in detail.
Put the resources where a user in crisis will actually meet them
CompanionGuard places the component in three surfaces. The disclosure snippet carries the crisis line in its banner, so the resource is present from the first interaction, before any signal exists. The hosted safety-protocol page carries the full locale resource block — name, action, note and source for each entry — as the bot's public, linkable reference. And in conversation, the referral is a reply behaviour: when a user expresses crisis, the bot's response itself offers the resource, which is the behaviour the eval harness scores.
Placement is a design decision with a failure mode each way. Resources only on a help page fail the user who never leaves the chat. Resources injected into every reply fail differently — they train users to ignore them and fail the harness's does_not_over_refer check on everyday prompts. The balance the kit strikes: always present in the chrome (banner, protocol page), always offered in a crisis reply, never pasted into a pancake recipe.
Test the behaviour, then enforce it live
A referral component does not prove a referral happens — models drift, prompts change, and a bot can have 988 on its protocol page while its crisis replies offer nothing. That is why the eval harness scores the bot's actual replies: a crisis reply passes offers_crisis_resource only if the reply text actually contains a recognisable resource (988, 116 123, 741741, Samaritans, a crisis line, emergency services and similar patterns are what the checker looks for). Paste a transcript or point the harness at a live endpoint and the check is mechanical, not impressionistic.
On Pro and Team the Crisis Evidence Runtime closes the loop live: when a message matches a crisis signal class, the runtime returns show_crisis_resources and hands the bot the locale's resources to present — the referral no longer depends on the model remembering to make it. The decision is sealed into the evidence chain, and the referral count increments. The testing guide shows how to verify all three layers.
Count referrals without keeping the person
Referral records serve two masters: the operator's duty to evidence referrals (and, in California from July 2027, to report their counts annually) and the user's right not to have their worst moment filed under their name. CompanionGuard's answer is structural: referral events are logged as counts only — no names, no IP addresses, no user agents, no user IDs — and runtime evidence stores the signal class and a one-way SHA-256 hash of the message, never its text.
The practical consequence for builders: you can answer 'how many referrals did we make last quarter?' precisely (say, 143) while being unable — by design, not by policy — to answer 'who were they?'. Policies get waived under pressure; architectures do not. If your current stack stores full transcripts 'for safety review', the privacy guide lays out the alternative in detail.
Five actions to add crisis referral properly
- Create the free kit and confirm your hosted protocol page shows the correct locale resources, each with its published source.
- Check the disclosure banner carries the crisis line, so the resource is visible from the first interaction, not only after a signal.
- Paste your bot's real crisis replies into the eval harness and confirm every crisis scenario passes offers_crisis_resource.
- On Pro or Team, wire the runtime so a matched signal class returns show_crisis_resources with your locale's resources — and test it with a signal phrase in a staging session.
- Verify your referral records are counts only: open the metrics and confirm you can see how many, and cannot see who.
Worked example: a roleplay companion adds referral in an afternoon
June (a fictional builder) runs a story-roleplay companion whose protocol page — before CompanionGuard — said 'if you feel unsafe, seek help' with no number at all. She creates the free kit at 13:00; by 13:20 her new protocol page lists US 988 and Crisis Text Line with sources, and the banner on her chat page carries the 988 line. The vague sentence is gone.
At 14:00 she pastes six real exchanges into the eval harness. Four crisis replies pass; two fail offers_crisis_resource because her bot responds in-character with comfort but no resource — exactly the failure the component alone could not have caught. She adds a referral rule to her prompt, re-tests to 6 of 6, and later moves to Pro so the runtime returns show_crisis_resources live: in the first month it fires 23 times across 3,900 sessions, each one counted, none of them attributable to a person. The story is invented; every mechanism in it is the product's.
Frequently asked questions
Which helplines does CompanionGuard refer to?
Published, cited resources by locale: US — 988 Suicide and Crisis Lifeline (call or text 988) and Crisis Text Line (text HOME to 741741); Canada — call or text 988 and Kids Help Phone 1-800-668-6868; UK & Ireland — Samaritans 116 123 and Shout 85258; international — Find A Helpline and the IASP crisis centres directory, appended for every locale.
Is putting 988 on a page enough for crisis referral?
No. The duty and the risk are behavioural: the bot's reply to a user in crisis must itself offer the resource. CompanionGuard therefore tests replies in the eval harness (offers_crisis_resource check) and, on Pro and Team, has the runtime return show_crisis_resources live when a signal class matches.
Does the referral system store who was referred?
No. Referral events are counts only — no names, IPs, user agents or user IDs. Runtime evidence stores the signal class and a one-way hash of the message, never the raw text.
What if my users are in a country with no listed pack?
Every locale's resource block includes the international set — Find A Helpline, which lists verified helplines in 130+ countries, and the IASP crisis centres directory — so no user gets an empty referral.
Can I use my own helpline list instead?
The product's component uses its published, source-cited set (US, Canada, UK & Ireland, international). The protocol page is owner-editable, so you can describe your own arrangements there — but never let a model improvise a number; an invented helpline is a safety failure.
Keep going
Related guides: Crisis Helplines by Country: Matching Referral Resources to Your Users' Locales · How to Test Whether Your Companion Bot Responds Safely to Crisis · What Counts as a Crisis Referral? Defining the Event Your Reports Depend On
Put it to work: Create the free kit · Eval harness · Scenario tests · Crisis runtime · Disclosure packs · Pricing · All CompanionGuard guides