Skip to main content
The run command manages async job execution for agents and recipes via a jobs server.
run is overloaded. praisonai run <yaml-file> runs the team through the modern agent runner (see Run CLI); praisonai run <verb> — where <verb> is submit, status, result, cancel, list, or stream — reaches the jobs API documented below. Reserved job verbs win over a same-named file in the current directory, so praisonai run submit "…" always reaches jobs even if a file called submit exists in cwd. Use an explicit path (praisonai run ./submit) to force the agent runner in that case.

Quick Start

Commands Overview

How routing works inside run

praisonai run inspects its first positional token to decide between the async-jobs API and the modern agent runner.
Free-text prompts belong to the bare-prompt shape praisonai "…" (which the CLI Dispatcher rewrites to a modern run invocation), not to praisonai run "…". Typing run explicitly with a non-file, non-verb token still falls through to the jobs argparse parser and errors with invalid choice.
A .yaml/.yml target is routed to the agent runner before the existence check, so a typo or wrong-directory path (the trap in PraisonAI issue #5095) still gets a helpful “file not found” from the runner, not a confusing jobs-CLI error. Locked by PR #5107.
The two-way handoff between the modern Typer run app and the legacy executor used to recurse infinitely on praisonai run agents.yaml (the modern runner delegates to the legacy class, which saw run <file>.yaml and re-dispatched back into the modern run_app). Since PR #5606 this is guarded by an internal re-entrancy sentinel (PRAISONAI_IN_MODERN_RUN): when the legacy branch sees the sentinel it executes the YAML directly instead of bouncing back. Fixes issue #5597. PR #5636 further hardens the restore: the sentinel’s prior value is captured before the guarded PraisonAI import so an ImportError surfaces cleanly as typer.Exit(1) instead of being masked by an UnboundLocalError out of the finally block (issue #5632).

Starting the Jobs Server

Before using job commands, start the jobs server:

Submit a Job

Basic Submission

Submit with Recipe

Submit with Agent File

Advanced Options

Submit Options

Check Job Status

Status Output

Get Job Result

Stream Job Progress

Stream real-time progress updates via SSE:

Stream Output

List Jobs

Cancel a Job

Idempotency

Prevent duplicate job submissions:

Idempotency Scopes

Webhooks

Configure webhooks to receive notifications when jobs complete:
Webhook payload:

Session Grouping

Group related jobs by session:

Python API

Complete Workflow Example

Scripting with JSON

See Also