How policies work
When an agent calls a tool through the gateway, the policy engine:- Loads the project’s active policy release (a versioned snapshot of all policies)
- Evaluates each policy’s CEL expression against the request context
- Returns allow or deny based on the results
Policy types
There are two types of policy rules:
Deny rules take priority. If any deny rule matches, the request is rejected — even if allow rules would have permitted it.
Policy releases
Policies go through a draft → publish workflow:- Draft — write and edit policy rules in the console
- Publish — create a versioned snapshot (release) of your current policies
If no active release exists for a project, the gateway falls back to the project’s default policy action — either allow all or deny all.
Evaluation context
Every policy has access to these variables:Example
A policy that allows support agents to read ticket data, but only for the customer in their task context:Next steps
CEL expressions
Full reference for writing CEL policy expressions.
Policy examples
Real-world policy patterns you can copy and adapt.