Configure in the console
- Open Policies → Catalog (guardrails are listed first).
- Pick TrustGuard, OpenAI Moderation, Azure Content Safety, Bedrock Guardrail, or Regex Replace.
- For TrustGuard, select or create an Agent Runtime collector when prompted; connection settings are platform-managed on SaaS.
- Set direction (request / response), mode (Enforce / Observe), and scope.
- Save. Test blocking behavior in the Playground and inspect Security flags under Activity.
Streaming responses cannot be inspected or blocked in realtime by these policies. Apply
guardrails on the request leg (or to non-streaming responses) for enforcement.
TrustGuard
Thetrustguard policy evaluates request or response content using configured
TrustGuard detectors for jailbreaks, PII, toxicity, and
tool abuse. It applies the action returned by TrustGuard.
Transport failures, timeouts, and ordinary service errors follow
on_error,
which defaults to fail_open. Authentication, rate-limit, and entitlement
responses always block. A missing base URL or gateway credential fails open.
Connection settings come from the deployment’s TRUSTGUARD_* environment. See
the TrustGate integration.
OpenAI Moderation
Theopenai_moderation policy screens text with the OpenAI Moderations API and blocks
content that crosses configured category thresholds. Text-only.
In
enforce mode this policy fails closed (HTTP 502) on any moderator error; observe
mode records and passes through.
Azure Content Safety
Theazure_content_safety policy screens request content with the Azure AI Content Safety
Analyze Text API and blocks categories whose severity meets the configured threshold.
Fails closed in
enforce mode.
AWS Bedrock guardrail
Thebedrock_guardrail policy applies an AWS Bedrock guardrail to request prompts and/or
responses. It inspects the topic,
content, word, sensitive-information (PII), and contextual-grounding policy families configured
on the guardrail, and blocks with a 403 or anonymizes PII in place. Streaming responses pass
through untouched.
Regex Replace
Theregex_replace policy (Regex Replace in the catalog) rewrites the request
prompt or the LLM response with ordered RE2
regular expressions. Rules chain: each rule sees the previous rule’s output. A single policy
instance targets one leg (request or response), not both. Streaming responses pass
through untouched.
Configure in the console
- Policies → Catalog → Regex Replace.
- Choose the target leg (request or response) and add ordered rewrite rules (pattern, replacement, optional case-insensitive / multiline).
- Set mode and scope, then save.
Choose a guardrail
trustguard: evaluate content with TrustGuard detectors and correlate findings with Telemetry Alerts.openai_moderation/azure_content_safety: apply the corresponding provider’s content-moderation service.bedrock_guardrail: reuse guardrails defined in AWS Bedrock, including in-place PII anonymization.regex_replace: use deterministic string replacement for pattern-based redaction or rewriting without an external moderator.