Skip to main content

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

TypeDescription
ManualCreated and triggered by users or via the dashboard
ScheduledRun automatically on a recurring schedule
TriggeredExecute 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

  1. Navigate to the agent's detail page
  2. Open the Tasks tab
  3. Click Create Task and fill in the name, type, input data, and optional deadline
  4. 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)