Orq MCP is live: Use natural language to interrogate traces, spot regressions, and experiment your way to optimal AI configurations. Available in Claude Desktop, Claude Code, Cursor, and more. Start now →
Configure guardrail rules to control and validate requests and responses through the AI Router.
Guardrail Rules define conditions under which evaluators are applied to requests passing through the AI Router. A guardrail is only triggered when its rule conditions are matched, not on every request.
Guardrail Rules are an Enterprise-only feature. Guardrail Rules cannot be invoked directly in code. They are enforced automatically when a matching request is detected.
Toggle to activate or deactivate the rule. When enabled, the rule is active and applied to matching requests.
Project
Scope of the rule. Global (all projects) applies the rule workspace-wide. Selecting a specific project restricts it to requests within that project only.
The Rule Builder constructs the match conditions that determine when the guardrail is triggered. Clicking Add opens a dropdown with the following condition types:
Condition
Description
Header
Match on a request header name and value.
Model
Match on the model being called.
Identity
Match on the identity making the request.
Metadata
Match on metadata attached to the request.
Project
Match on the project scope of the request.
You can also click Add group to nest conditions into a logical group. Multiple conditions within a group are joined with and. Groups themselves can be joined with either and or or. Select the operator between groups to control how they combine. Each condition can be removed with .The builder generates a CEL (Common Expression Language) expression shown read-only in the CEL Expression Preview below. The guardrail is only triggered when the expression evaluates to true.