Guardrail
On this page
Purpose
Guardrail checks an English Message for selected PII entities and selected OpenAI moderation categories. It routes the original Message to Pass or Fail. It does not redact or rewrite the message.

When to use it
- Route a user Message with selected PII to a review path.
- Check an Agent response for selected moderation categories before display.
- Send clean and flagged Messages to different downstream paths.
Required setup
PII checks need no credential. Moderation checks require an OpenAI API key.
How to use it
- Connect the Message to Message.
- Select the PII categories, moderation categories, or both.
- Connect Pass to the clean-message path and Fail to the flagged-message path.
- Use Single Output when the two paths should not both run.
Configuration
| Setting | What it controls | Recommended starting point |
|---|---|---|
| Message | The Message to check and route. | Connect it from Chat Input or another component's Message output. |
| Personally identifiable information | Selected PII entity types. | Select only the PII types the flow must route. |
| Moderation | Selected OpenAI moderation categories. | Select only the categories required by the flow policy. |
| OpenAI API Key | Authenticates moderation requests. | Use a saved Credential when moderation is enabled. |
| Output Mode | Controls the inactive branch. | Start with Both Outputs; use Single Output for separate downstream chains. |
Expected result
With no selected detection, Pass returns the original Message. With any selected PII or moderation detection, Fail returns the original Message. In Both Outputs mode, the inactive output is an empty Message. In Single Output mode, the inactive branch is stopped.
Both category lists default to empty, so every Message passes until you select a detector. The component returns no scores, detected categories, redaction, or audit record. A moderation selection without a valid OpenAI key fails instead of routing the Message.
The PII check accepts a Message of at most 32,768 UTF-8 bytes. A longer Message with a PII category selected fails with a message that the text is too long for the PII check. It is not shortened, partly checked, or routed. A Message of any length can still be moderation-checked when no PII category is selected.
If the PII check cannot finish, for example because the PII detection service is unavailable or times out, the component fails. Neither Pass nor Fail returns the Message, and no moderation request is sent. Try the run again later.
A Guardrail component can no longer run with changed source. A Guardrail saved before this change shows an update message; use Update on the component. A Guardrail with edited source shows a message that names Restore; Restore replaces the edited source with the current Guardrail and keeps your PII selection, moderation selection, output mode, and connections. A Guardrail inside a group has no Update or Restore of its own: the flow fails until you Ungroup, apply Update or Restore to the Guardrail, check and reconnect any affected connections, and regroup if you want.
Reference details
PII detection runs in the Arkus transformation service on English text and returns only whether a selected category was found. Moderation uses OpenAI omni-moderation-latest. PII-only use does not call OpenAI, so nothing leaves Arkus until you select a moderation category. Guardrail does not provide custom rules, regexes, keywords, sensitivity thresholds, jailbreak checks, hallucination checks, or general policy enforcement. Guardrail is not supported in Agent deployments. Automated PII detection can miss sensitive information, so a Pass result is not a privacy or compliance guarantee.
Related components
- Chat Input supplies a user Message before model processing.
- Agent Core can receive approved input or have its response checked before display.
- Chat Output displays either handled path.
