Create a task
1
Navigate to Tasks
Open your project and click Tasks in the sidebar.
2
Click Create Task
Click the Create Task button.
3
Set the name
Choose a descriptive name — e.g.,
resolve-ticket, process-refund, generate-report.4
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.5
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
6
Set allowed tools (optional)
Optionally restrict which tools this task can use. This overrides identity-level tool restrictions when a task session is active.
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.Next steps
Write policies
Author policies that reference task context.
Task sessions API
Learn how agents create task sessions at runtime.