workflow command manages reusable multi-step workflows stored in .praison/workflows/.
Quick Start
Two Ways to Run Workflows
| Method | Command | Use Case |
|---|---|---|
| Template-based | praisonai workflow run "name" | Reusable, complex workflows with per-step agents |
| Inline | praisonai "prompt" --workflow "step1,step2" | Quick, ad-hoc workflows |
Template-Based Workflows
List Workflows
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
| Format | Example | Description |
|---|---|---|
| Simple | "Research,Summarize" | Step name = action |
| Detailed | "Research:Search for info,Write:Write blog" | Custom action per step |
CLI Options
Workflows use global flags (same as other commands):| Flag | Description |
|---|---|
--workflow-var key=value | Set workflow variable (can be repeated) |
--llm <model> | LLM model (e.g., openai/gpt-4o-mini) |
--tools <tools> | Tools (comma-separated, e.g., tavily) |
--planning | Enable planning mode (AI creates sub-steps) |
--memory | Enable memory |
--verbose | Enable verbose output |
--save | Save output to file |
Workflow File Format
Workflows are stored in.praison/workflows/ as Markdown files with YAML frontmatter:
How It Works
- Load: Workflow file is loaded from
.praison/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
Examples
Research Workflow
Deployment Workflow
Release Workflow
Programmatic Usage
Best Practices
| Do | Don’t |
|---|---|
| Use variables for environment values | Hardcode environment names |
| Keep steps focused and atomic | Create monolithic steps |
| Add descriptions to workflows | Skip documentation |
| Test workflows in staging first | Deploy directly to production |
Auto-Generate Workflows
Generate workflow YAML files automatically from a topic description:Available Patterns
| Pattern | Description | Use Case |
|---|---|---|
sequential | Agents work one after another | Default, step-by-step tasks |
parallel | Agents work concurrently | Independent subtasks |
routing | Classifier routes to specialists | Different input types |
loop | Repeat steps until condition met | Iterative processing |
orchestrator-workers | Central orchestrator delegates dynamically | Complex decomposition |
evaluator-optimizer | Generate-evaluate loop until quality met | Content refinement |
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:

