Skip to main content
A task represents a specific job an agent performs — like “resolve a support ticket” or “process a refund.” Tasks carry context (the ticket ID, the customer) and can restrict which tools the agent uses during that job.

Task definitions

A task definition is a template you create in the console. It describes the type of work an agent can do.

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 as task.context.
When the agent creates a task session, it provides context that matches this schema:
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.
Task sessions are:
  • 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
The agent includes the task token in subsequent MCP requests via the X-Task-Token header:

Task in policy context

During policy evaluation, the task is available as:
This lets you write policies that reference the task’s runtime context:

Task-level tool restrictions

Tasks can define their own allowed tools list, which overrides the identity-level list.

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.