Available variables
Every CEL expression has access to three top-level objects:identity
Information about the agent making the request.task
Information about the active task session. Only available when the request includes anX-Task-Token header.
request
Information about the current tool call.Operators
CEL supports standard operators:String functions
Map access
Access nested map values using dot notation or index notation:Common patterns
Tool names are namespaced as
serverName__toolName (e.g., github__list_issues). Use the full namespaced name in your expressions. The examples below use short names for readability.Allow specific tools
Check identity labels
Scope access by task context
Combine multiple conditions
Block dangerous tools
Allow based on optional label
Evaluation rules
- Deny rules are evaluated first. If any deny rule’s expression returns
true, the request is blocked. - Allow rules are evaluated next. If any allow rule’s expression returns
false, the request is blocked. - If all rules pass, the request is allowed.
- If no active release exists, the project’s default action applies.
- If a CEL expression errors (e.g., accessing a missing key), it’s treated as a deny.
Order matters. Place deny rules before allow rules for clear, predictable behavior.
Next steps
Policy examples
Real-world policy patterns you can copy and adapt.
Write policies
Author policies in the console’s policy editor.