Policy as code

Rule builder

Compose a guardrail from the same primitives the gateway evaluates, or write the YAML definition directly. Either way the policy-as-code document on the right is what ships — no translation layer, no drift between the written policy and the enforced one.

Discard
Draft ID · POL-019

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

Policy as code

Exactly what the gateway will execute

Enforce mode — matching traffic is acted on inline.

apiVersion: truint.ai/v1
kind: RuntimePolicy
metadata:
  id: POL-019
  name: "Restrict unmasked identifiers on vendor routes"
  owner: "Data Protection Office"
  scope: "All agents"
spec:
  severity: critical
  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.