workflow command manages reusable multi-step workflows stored in .praisonai/workflows/.
Install requirement:
praisonai workflow requires pip install praisonai (the full wrapper). On a standalone pip install praisonai-code install these subcommands (list, show, run) exit 1 with workflow requires the full wrapper. Install the full wrapper: pip install praisonai — a single-line hint, no Rich traceback (PR #2854).Quick Start

Two Ways to Run Workflows

Template-Based Workflows
List Workflows
Execute Workflow
Execute with Options
Resume an Interrupted Workflow
If a workflow stops partway — a crash, a timeout, or aCtrl-C — resume it
from the last saved step instead of starting over. A checkpoint is saved after
each completed step; --resume reads it and continues from the next step.
Manage Checkpoints
List saved workflow checkpoints, or delete one you no longer need.Checkpoint files live in
{workspace}/.praisonai/checkpoints/{name}.json. The
Fingerprint column shows - for checkpoints saved before fingerprinting
existed.Show Workflow Details
Create Workflow Template
Inline Workflows
Run workflows directly from the command line without creating a template file:Inline Workflow Format
CLI Options
Workflows use global flags (same as other commands):Workflow YAML Schema
framework: key
YAML workflow files accept a top-level framework: key. Only praisonai (case-insensitive) is supported by the native execution engine.
The
framework: validation only applies to the native YAML workflow executor (Workflow.run()). To run CrewAI or AutoGen, use the framework adapters path via praisonai --framework crewai agents.yaml — see Framework Availability for adapter details.Workflow File Format
Workflows are stored in.praisonai/workflows/ as Markdown files with YAML frontmatter:
How It Works
- Load: Workflow file is loaded from
.praisonai/workflows/ - Variables: Variables are substituted into step prompts
- Execution: Each step is executed sequentially with its configured agent
- Context: Results from each step are passed to the next
Exit Codes
praisonai workflow now returns process exit codes that reflect what actually happened, so CI, benchmarks, and shell pipelines can branch on success without parsing stdout.
Before the fix, a failed model call was silently swallowed and the run still reported success:
handler steps are unchanged — a custom Python handler may legitimately return None. Only agent and action steps are treated as failures when they produce nothing.The error field on a failed result
A failed Workflow.start() (or .run()) result carries an error string describing the first failure. It is populated whenever the final workflow status is failed; a successful run does not set it.
Hierarchical Mode Validation
When a workflow runs withprocess="hierarchical", a manager LLM judges each step’s output. Three fail-open defects are fixed as of PR #4946:
- Manager rejections are honoured. The manager verdict is parsed with the engine’s own
_parse_json_outputhelper (the same one used elsewhere in the engine), which strips the```jsonfences models routinely emit. A barejson.loadsused to raiseJSONDecodeErroron every fenced reply and substitute{"approved": true, "reason": "assuming success"}, silently discarding a rejection. Now"approved": falsefails the run. - An unreadable verdict fails closed. If the manager response cannot be parsed into a dict, it is treated as not approved rather than assumed successful.
- A manager outage fails the run. Exceptions raised during the manager call are now failures, not a logged-and-ignored pass.
- A step that produced nothing is judged too — the same no-output rule from the sequential path applies here.
Examples
Research Workflow
Deployment Workflow
Release Workflow
Programmatic Usage
Best Practices
Auto-Generate Workflows
Fixed in PR #2147:
praisonai workflow auto was non-functional in all previous releases — every call raised a NameError on _models_cache and surfaced as Generation failed: in the CLI. The command now works as documented below.Available Patterns
Pattern Examples
Orchestrator-Workers
Orchestrator-Workers
Central orchestrator analyzes the task and delegates to specialized workers:Generated workflow includes:
- Orchestrator: Analyzes task, determines required workers
- Workers: Researcher, Analyst, Writer (run in parallel)
- Synthesizer: Combines all worker outputs
Evaluator-Optimizer
Evaluator-Optimizer
Iterative refinement with feedback loops:Generated workflow includes:
- Generator: Creates initial content
- Evaluator: Scores content (1-10), provides feedback
- Loop: Continues until score >= 7 or max iterations
Parallel
Parallel
Multiple agents work concurrently:
Routing
Routing
Classifier routes to specialized agents:

