Skip to main content

What this is for

AI Gateway → Guardrails is where you control what the gateway is allowed to do beyond plain LLM inference: which content/intent rules it enforces on every request, and which on-gateway SLM (small language model) classifiers run as additional guards. The page has eight tabs: Rules, Garden, Playground, Monitor, SLM Guardrails, Adversarial, Findings, and Anomalies. This page covers Rules, SLM Guardrails, and Anomalies. MCP servers have their own page: see MCP.

Guardrails

Rule-based content controls, on the Rules tab, applied to every request that flows through the gateway. Use these to redact PII, block prompt injection patterns, enforce keyword filters, or just log policy hits.
Guardrail rules list

Security → Guardrails → Rules

Options

Create Guardrail Rule dialog: Rules are listed with Name, Category, Type (input / output / both), Action, Priority, Triggers, and Enabled. A built-in Test dialog lets you paste sample text and see which rules fire.

How to configure

1

Open the Rules tab

Open Security → Guardrails from the dashboard sidebar and click the Rules tab.
2

Create a rule

Click Create Guardrail Rule. Set Rule Name, pick Apply To, Category, and Action. Add Keywords and/or Regex patterns for keyword-style categories.
Create Guardrail Rule dialog

Create Guardrail Rule

3

Test before enabling

Use the Test action on the rule row, paste representative sample text, and confirm the rule matches what you expect.
4

Toggle Enabled

Flip Enabled to turn the rule on. Trigger a matching request from Playground and verify the action in Logs.

SLM Guardrails

On-gateway small language models that classify, score, detect, or rewrite content. Use these when keyword/regex rules aren’t expressive enough — toxicity classifiers, jailbreak detectors, intent scorers.
SLM guardrails list

Security → Guardrails → SLM Guardrails

Options

Deploy SLM Guardrail dialog: Each row exposes Avg latency, Accuracy, and Evaluations so you can see real performance before promoting it to a blocking action.

How to configure

1

Open the SLM Guardrails tab

Open Security → Guardrails from the dashboard sidebar and click the SLM Guardrails tab.
2

Deploy a model

Click Deploy SLM Guardrail, pick a Model and Type, set Apply To, Action, and Threshold.
Deploy SLM Guardrail dialog

Deploy SLM Guardrail

3

Start in log mode

Set Action to log first. Run real traffic for a window, watch Accuracy and Evaluations on the row.
4

Promote to enforcement

Once you trust the model, change Action to warn, block, or rewrite. Verify in Logs.
SLM Guardrails run on the gateway, not in the cloud. Inference latency depends on the gateway host’s available GPU/CPU.

Anomalies

The Anomalies tab surfaces when one API key’s usage on one gateway drifts from the baseline Guardway learned for it — an early signal of a stolen or misused key. It’s a detection surface, not a rule you author.

Options

Each anomaly names the API key and gateway it was seen on and why it tripped.

How to act

You can also triage anomalies with the Claude connector — list, acknowledge, resolve and rebaseline from chat.
  • MCP — register MCP servers and scope their tools per key or application.
  • API Keys — scope MCP servers and tools per key.
  • Logs — every guardrail trigger is logged with the rule that matched.
  • Notifications — subscribe to Guardrail Blocked (guardrail.blocked) events.