Guardrails

Guardrails check what people send and what the agent says, and stop or mask what shouldn't get through. Set them on the agent's Guardrails tab.

Built-in rules

RuleWhat it does
Redact PIIMasks South African ID numbers, card numbers and US Social Security numbers in messages and replies. Masks emails and phone numbers in what people send, in attachments and in what the agent sends to tools, but keeps those from your own knowledge, so a published support number still shows.
Block compensation discussionsRefuses questions about salary, bonuses and equity, with an AI check on both sides.
Block off-topicRefuses topics you list, one phrase per line, up to 100, with an AI check on what people send.
Require citationFlags answers that show no source marker, such as [1], a link or §. It logs a warning and never blocks.

Custom rules

For anything else, click Add custom rule and fill in:

  • Description and Pattern: a regular expression that ignores case. Codi checks it when you save.
  • Action: Warn lets it through and records it, Redact masks the match, and Block refuses the message.
  • Stage: Input + output, Input only or Output only.
  • Enabled switches a rule on or off without deleting it.

What people see

Masked text shows as [REDACTED]. A blocked message gets a short refusal as its reply. A custom rule shows This request was blocked by a workspace guardrail. Compensation shows I can't discuss compensation, bonus, or equity details. Off-topic shows Let's keep this conversation focused on what this assistant is for. If a reply is blocked after it has started to appear, the chat replaces it with the refusal. Try your rules with Test before you publish.

Need some help? Email support

Something not working? See troubleshooting