Create a task
Add labels (after creation)
Once the task is created, go to its settings page to add labels. Labels are available in policy expressions as
task.labels.Common labels: category: support, priority: high, department: finance.Define the context schema
Write a JSON Schema that describes what context the agent must provide when starting this task.The context schema serves two purposes:
- Validation — the gateway rejects task sessions with invalid context
- Policy input — the context is available as
task.contextin CEL expressions
Context schema design
Design your context schema around the data your policies need to evaluate. Support task — scope access to a specific customer:Task-level tool restrictions
If a task defines allowed tools, they take priority over the identity’s tool restrictions when a session for this task is active.| Identity tools | Task tools | Effective tools |
|---|---|---|
| Not set | Not set | All project tools |
["a", "b", "c"] | Not set | ["a", "b", "c"] |
["a", "b", "c"] | ["x", "y"] | ["x", "y"] (task overrides) |
| Not set | ["x", "y"] | ["x", "y"] |
Next steps
Write policies
Author policies that reference task context.
Task sessions API
Learn how agents create task sessions at runtime.