Tasks
Tasks are units of work that agents execute. They provide structured job management with tracking, retries, dependencies, and deadlines.
For full documentation, see Tasks (Full Guide).
Why Tasks?
While conversations are great for interactive dialogue, many agent workloads are better modeled as discrete jobs:
- Batch processing -- process 100 documents overnight
- Background work -- generate reports while users sleep
- Scheduled jobs -- daily data sync at 2 AM
- Dependent work -- Task B waits for Task A to complete
Task Types
| Type | Description |
|---|---|
| Manual | Created and triggered by users or via the dashboard |
| Scheduled | Run automatically on a recurring schedule |
| Triggered | Execute in response to webhooks from external systems |
Task Lifecycle
Tasks follow a simple state machine: they start as pending, move to in_progress when execution begins, and end as either completed or failed. Failed tasks can be retried automatically based on your retry configuration.
Creating and Running Tasks
- Navigate to the agent's detail page
- Open the Tasks tab
- Click Create Task and fill in the name, type, input data, and optional deadline
- Click Run to execute immediately, or save for later
Tasks can also be created programmatically via the SDK or CLI. See the TypeScript SDK or CLI Reference for details.
Full documentation: Tasks (Complete Guide)