Inline guardrails
Block or flag model output through agentgateway before it reaches users.
Source: examples/guardrails. Read the guide for the concepts behind it.
support.yaml
Section titled “support.yaml”# evalsi guardrails apply -f examples/guardrails/support.yaml --server ...name: support-chatproject: supportdescription: PII stays out of prompts and answers; no credentials, no jailbreaks.redact: - builtin: email - builtin: us-ssn - builtin: credit-card - pattern: 'ACCT-\d{6,}' replacement: '<ACCOUNT>'evaluators: - secret-leak # safety pack: blocks credentials in the content - ref: refusal # recorded as a score; used in block_when belowblock_when: >- scores["secret-leak"] < 1 || (phase == "response" && labels[?"tier"].orValue("") == "free" && content.size() > 20000)message: This request was blocked by the support-chat guardrail.timeout: 1.5sfailure_mode: closed # an evaluator error blocks; "open" lets content throughmode: enforce # "audit" decides and reports, but blocks nothing