Skip to main content
The workflow command manages reusable multi-step workflows stored in .praison/workflows/.

Quick Start

List workflows example

Two Ways to Run Workflows

Execute Multi-Step Workflows

Template-Based Workflows

List Workflows

Expected Output:

Execute Workflow

Execute with Options

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.
If you set a different framework name, PraisonAI raises immediately rather than silently running the native 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 .praison/workflows/ as Markdown files with YAML frontmatter:

How It Works

  1. Load: Workflow file is loaded from .praison/workflows/
  2. Variables: Variables are substituted into step prompts
  3. Execution: Each step is executed sequentially with its configured agent
  4. Context: Results from each step are passed to the next

Examples

Research Workflow

Deployment Workflow

Release Workflow

Programmatic Usage

Best Practices

Use variables for environment-specific values to make workflows reusable.
Workflows execute steps sequentially. Ensure each step can complete independently.

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.
Generate workflow YAML files automatically from a topic description:

Available Patterns

Pattern Examples

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
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
Multiple agents work concurrently:
Classifier routes to specialized agents: