Skip to main content
A task is the unit of work in Hexel. You describe what you want done — “summarize this week’s support tickets,” “draft a quarterly report from these data sources” — and the platform figures out how: planning steps, choosing agents, executing, and recording the result. Use a task when the work involves planning, coordination, or multiple agents. If you just need a single model call with no orchestration overhead, call the agent directly instead. A task is a unit of work submitted to a fleet. The platform plans it, runs it across the fleet’s agents, and records the result. This page covers submitting tasks, their lifecycle, and management operations.

Task lifecycle

Submit a task

Request parameters

string
required
The fleet to execute this task.
string
required
The environment scope.
string
required
The workspace scope.
string
required
The work to perform, as natural language text. Describe the outcome, not step-by-step instructions.
string
Additional structured context as a JSON-encoded string. Not a raw object.

Response

string
Unique task identifier.
string
Current lifecycle state.
string
Fleet this task was submitted to.
string
ISO 8601 creation timestamp.

List tasks

Get a task

Cancel a task

Cancels a task in pending, planning, or executing state.

Replay a task

Re-runs a completed or failed task from its recorded execution.

Stream a task

Follow execution in real time via SSE. See Streaming & Replay for event types.

Rate limits

100 requests per organization per minute. Pagination: page >= 1, page_size 1–100 (default 20).
The context field must be a JSON-encoded string, not a raw JSON object. Serialize your structured data before passing it:

Errors

Troubleshooting

A submitted task remains pending until it’s dispatched. If it never advances, confirm the fleet_id references a fleet that has agents attached, and that your organization has an active compute entitlement.
The organization lacks the compute entitlement needed to run tasks. Check your plan in the Console.
context must be a JSON-encoded string, not a raw object. Serialize it before sending (for example, json.dumps(...)).
Stream the task or replay it to see where execution failed, then adjust the input or context.

Security

Fleets

Where tasks run.

Approvals

Gate execution with approval.

Streaming & Replay

Follow and reproduce tasks.

Tasks & Workflows

The underlying concept.

Next steps

Continue to Fleets.