Skip to main content

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

TypeDescriptionHow It Runs
ManualCreated and triggered by usersOn-demand via dashboard or API
ScheduledRuns automatically on a scheduleCron-based timing (see Schedules)
TriggeredExecutes in response to webhooksEvent-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.

StatusDescription
PendingWaiting to be executed
In ProgressCurrently running
CompletedSuccessfully finished
FailedExecution failed (may retry)
CancelledManually cancelled
PausedTemporarily paused

Best Practices

Use Meaningful Names

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."

Set Appropriate Timeouts

Match the timeout to expected duration. Quick tasks might need 30 seconds; long analysis jobs might need 10 minutes.

Configure Retries for Flaky Operations

External API calls can fail transiently. Set 2-3 retries with a short delay to handle intermittent failures gracefully.

Use Dependencies for Pipelines

Chain tasks together for ETL or multi-step processing. Let the platform handle sequencing instead of building custom logic.

Plan Availability

FeatureStarterGrowthEnterprise
Manual tasksYesYesYes
Scheduled tasks--YesYes
Task dependencies--YesYes
Task deadlines--YesYes

Next: Learn about Schedules for automated task execution.