Tasks
Tasks are units of work that agents execute. They provide structured job management with tracking, retries, dependencies, and deadlines -- think of them as the "to-do list" for your AI workforce.
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
Tasks give you progress tracking, automatic retries on failure, priority queuing, dependency management, and deadline enforcement.
Task Types
| Type | Description | How It Runs |
|---|---|---|
| Manual | Created and triggered by users | On-demand via dashboard or API |
| Scheduled | Runs automatically on a schedule | Cron-based timing (see Schedules) |
| Triggered | Executes in response to webhooks | Event-driven (see Triggers) |
Task Lifecycle
A task moves through a predictable set of states:
Pending --> In Progress --> Completed
If something goes wrong, the task transitions to Failed and may retry automatically based on your retry settings. You can also Cancel a pending task or Pause an in-progress one.
| Status | Description |
|---|---|
| Pending | Waiting to be executed |
| In Progress | Currently running |
| Completed | Successfully finished |
| Failed | Execution failed (may retry) |
| Cancelled | Manually cancelled |
| Paused | Temporarily paused |
Best Practices
Name tasks descriptively so your team can understand what they do at a glance. "Daily Sales Report - US Region" is much better than "Task 1."
Match the timeout to expected duration. Quick tasks might need 30 seconds; long analysis jobs might need 10 minutes.
External API calls can fail transiently. Set 2-3 retries with a short delay to handle intermittent failures gracefully.
Chain tasks together for ETL or multi-step processing. Let the platform handle sequencing instead of building custom logic.
Plan Availability
| Feature | Starter | Growth | Enterprise |
|---|---|---|---|
| Manual tasks | Yes | Yes | Yes |
| Scheduled tasks | -- | Yes | Yes |
| Task dependencies | -- | Yes | Yes |
| Task deadlines | -- | Yes | Yes |
Next: Learn about Schedules for automated task execution.