Skip to main content
Run recipes and agents asynchronously in the background with progress tracking and cancellation.

Quick Start

1

Simple Usage

2

With Configuration


Basic Usage

Running a Recipe in Background

BackgroundTaskHandle Interface

Using with Agents

Configuration

Safe Defaults

Runtime Configuration

Configure in your recipe’s TEMPLATE.yaml:

Error Handling

Best Practices

  • Prevent tasks from running indefinitely
  • Track related tasks across executions
  • Clean up resources when tasks are cancelled
  • Use status checks for long-running tasks
  • Don’t overwhelm system resources

Background Tasks CLI

CLI commands

Async Jobs

Server-based jobs

Scheduler

Periodic scheduling