Skip to main content
The background command manages background task execution for agents and recipes.

Quick Start

Commands Overview

Submit a Recipe

Submit a recipe to run in the background:

Submit Options

Alternative: Recipe Run with Background Flag

You can also use the recipe run command with the --background flag:

List Tasks

Expected Output:

Check Task Status

Status Output

Cancel Task

Clear Completed Tasks

Python API

Using Recipe Operations

Async callers (FastAPI / Jupyter)

Inside a running event loop, use arun_background. The sync run_background raises RuntimeError there instead of deadlocking:
Never call recipe.run_background() from a running event loop — it raises RuntimeError and points you to arun_background.

Using BackgroundRunner Directly

Safe Defaults

Complete Workflow Example

Scripting with JSON Output

See Also