background command manages background task execution for agents and recipes.
Quick Start
Commands Overview
| Command | Description |
|---|---|
praisonai background list | List all background tasks |
praisonai background status <id> | Get task status |
praisonai background cancel <id> | Cancel a running task |
praisonai background clear | Clear completed tasks |
praisonai background submit | Submit a recipe as background task |
Submit a Recipe
Submit a recipe to run in the background:Submit Options
| Option | Short | Description |
|---|---|---|
--recipe | Recipe name to execute (required) | |
--input | -i | Input data as JSON string |
--config | -c | Config overrides as JSON string |
--session-id | -s | Session ID for conversation continuity |
--timeout | Timeout in seconds (default: 300) | |
--json | Output JSON for scripting |
Alternative: Recipe Run with Background Flag
You can also use the recipe run command with the--background flag:
List Tasks
Check Task Status
Status Output
Cancel Task
Clear Completed Tasks
Python API
Using Recipe Operations
Using BackgroundRunner Directly
Safe Defaults
| Setting | Default | Description |
|---|---|---|
timeout_sec | 300 | Maximum execution time (5 minutes) |
max_concurrent | 5 | Maximum concurrent tasks |
cleanup_delay_sec | 3600 | Time before completed tasks are cleaned up |

