Task definitions
A task definition is a template you create in the console. It describes the type of work an agent can do.| Field | Purpose |
|---|---|
| Name | A descriptive name (e.g., resolve-ticket, generate-report) |
| Labels | Key-value metadata used in policies (e.g., category: support) |
| Context schema | A JSON Schema that defines what context the agent must provide when starting this task |
| Allowed tools | Optional list of tools this task can use (overrides identity-level restrictions) |
Context schema
The context schema is a JSON Schema that validates the data an agent passes when starting a task session. This context becomes available in policy evaluation astask.context.
Context validation happens at task session creation time. If the context doesn’t match the schema, the session is rejected.
Task sessions
A task session is a short-lived, scoped token that an agent uses while performing a task. It connects an identity to a task with specific context.- Time-limited — they expire after the specified TTL (max 24 hours, default 1 hour)
- Scoped — they carry the task context that policies can reference
- Deletable — the agent (or your system) can explicitly end a session early
X-Task-Token header:
Task in policy context
During policy evaluation, the task is available as:Task-level tool restrictions
Tasks can define their own allowed tools list, which overrides the identity-level list.| Priority | Source | Behavior |
|---|---|---|
| 1 (highest) | Task allowedTools | If set, only these tools are visible |
| 2 | Identity allowedTools | Falls back to identity-level if task doesn’t specify |
| 3 (lowest) | No restriction | If neither is set, all project tools are visible |
Next steps
Task sessions API
Create and manage task sessions via the API.
Define tasks
Step-by-step guide to defining tasks in the console.