RI

Policy as code

Rule builder

Compose a guardrail from the same primitives the gateway evaluates. What you assemble here compiles to the runtime expression on the right — no translation layer, no drift between the written policy and the enforced one.

Discard

Rule identity

Metadata carried into the catalog

Severity

Conditions

Evaluated inline on every prompt, tool call and completion

When

Actions

Applied in order when the rule matches

Compiled rule

Exactly what the gateway will execute

Enforce mode — matching traffic is acted on inline.

rule "POL-DRAFT" {
  name     = "Restrict unmasked identifiers on vendor routes"
  scope    = "All agents"
  severity = "critical"
  owner    = "Data Protection Office"
  mode     = "enforce"

  when {
    prompt.classification equals "restricted"
    AND model.endpoint not in list "in-vpc, azure-india"
  }

  then {
    Block the request at the gateway
    Mask matched entities before egress
  }
}

Estimated added latency · 6–9 ms p99

Dry-run against the last 24 hours · 412 matches, 38 would have blocked

Requires AI Council approval before it reaches production.