Two kinds of rule
Open Controls → Guard in platform.opper.ai and add a rule.LLM Guard
A custom prompt that asks a model to classify content. Use it for fuzzy things like tone, intent, or categories.
Templates: PII, Toxicity, Secrets.
Regex Guard
Pattern matching. Use it for known formats like credit cards, emails, SSNs, and API keys.
Templates: Email, Phone, Credit Card, SSN, API Key.
Actions
Where it applies
You can layer rules. For example, run an org-wide secrets check alongside a stricter toxicity check on a customer-facing project. Each rule fires independently.
Where you see the result
A Guardrail event appears on the trace span with a Shield icon and status:- Passed: the content was fine.
- Flagged: matched but the action was Flag, so the call proceeded.
- Blocked: the rule rejected the call.