Docs
Sign in

Guardrails

Guardrails are named safety rules, such as a list of patterns to block or hide. You can create them, edit them and switch them on or off. For now they are saved definitions only.

Screenshot to add: The Guardrails page with the stat cards, filters and guardrail cards.

Open Guardrails

Go to Studio → Governance → Guardrails (/governance/guardrails). It is titled Guardrails: "Live enforcement layer — real-time content and behavior protection". The page refreshes every 30 seconds. The button is New Guardrail. The list starts empty.

Stat cards and filters

  • Cards: Active Guardrails, Triggered Today, Triggered This Week, Critical Guardrails.
  • Status filter: all, active, disabled. Category filter: All, content safety, security, data protection, model policy.
  • Empty: "No guardrails match the current filters."

Each card

It shows the name, a severity, an action (BLOCK, REDACT, WARN or REQUIRE_APPROVAL), a category chip, a description, an edit (pencil) icon and an on/off switch. Under that are "N today", "N this week", "N this month" and "Last: …". Show patterns ↓ opens a Pattern Library of the saved patterns.

Create or edit a guardrail

  1. Click New Guardrail

    Or click the pencil on a card.

  2. Fill in the form

    Name (for example "PII Detection"), Description, Category (content_safety, security, data_protection or model_policy), Severity (critical, high, medium or low; default high), Action (BLOCK, REDACT, WARN or REQUIRE_APPROVAL; default BLOCK), Patterns (one per line, regex supported) and the Active checkbox.

  3. Save

    Click Create Guardrail (or Save Changes). Message: "Guardrail saved." Failures: "Failed to save guardrail." and "Failed to toggle guardrail."

There is no way to delete a guardrail; switch it off instead. Create and edit need the create and update rights on apex.governance.guardrails.

Known gaps