Safety
The safety surface is the duty-of-care control that runs before every Agent-node webhook fires. It has two parts: a list of keywords that trigger the filter, and a library of messages that are sent to the user when a keyword matches. On a match, the agent call is skipped, the configured message is sent, and the conversation is routed to a human queue.

Safety enforcement at the tenant level is controlled separately — see Tenant for the super-admin toggle. When enforcement is on (the launch default), every keyword on this page is evaluated before any Agent node runs.
Keywords
Each keyword is a whole-word, case-insensitive matcher against the user’s most recent inbound message. Regex metacharacters in the keyword are escaped automatically.
Adding a keyword
- Settings → Safety → Keywords tab → + Add keyword.
- Keyword — the word or short phrase to match. Whole-word match only.
- Language — English or Arabic. Each keyword fires only when the contact’s language matches.
- Category — free text used for organisation and analytics. Common values are
medical_emergency,mental_health,distress,fraud,abuse. Any taxonomy that makes sense for your operation is valid. - Safety message — pick one of the messages defined in the Messages tab. Leave blank to fall back to the tenant default safety message at runtime.
- Enabled — disabled keywords are stored but excluded from the live regex.
Editing and filtering
The list supports filtering by language and category. Use this when refining a single category’s coverage — for example, reviewing every keyword tagged medical_emergency together.
Messages
A safety message is a bilingual canned reply the user receives when a matching keyword fires. Multiple messages cover different categories (e.g. a clinical-emergency message vs. a mental-health one).
Adding a message
- Settings → Safety → Messages tab → + Add message.
- Name — internal label used by admins when linking a keyword to a message (e.g.
Mental health — adult). - English body — the reply sent to English-speaking users. Supports
{{contact.name}}interpolation. - Arabic body — the reply sent to Arabic-speaking users. Same interpolation rules.
- Transfer queue (optional) — when set, conversations matching a keyword that points at this message route to this queue instead of the default routing strategy.
How matches resolve
When a keyword matches a user’s inbound message:
- The Agent node call is skipped — no webhook fires.
- The user receives the safety message linked to that keyword (or the tenant default message if no link).
- The conversation is routed to the message’s transfer queue if set, otherwise via the default routing strategy.
- The match is logged for audit and analytics review.
Best practices
- Seed both languages from day one. A keyword list that only covers English will miss every Arabic-speaking user in distress — high-severity scenarios are exactly the wrong place to leave a coverage gap.
- Author the message before the keyword. Linking a keyword to a missing message means it falls back to the tenant default, which may not be specific enough for the category.
- Treat the keyword list as a living document. Review false negatives weekly during the first month after launch; the right vocabulary is operation-specific and rarely complete on day one.
- Keep category strings consistent. Free-text categories are powerful but also easy to typo — agree on a small set and stick to it.
- Never disable the safety pre-filter at the tenant level without sign-off from compliance. The toggle exists for narrow technical-deployment cases; production tenants should always run with it enforced.