Workflow Commands
Workflows allow you to chain multiple agent tasks together into automated pipelines. All workflow commands require a running daemon.Workflows require a running daemon. Start it with
openfang start before using these commands.Listing Workflows
openfang workflow list
List all registered workflows.- ID - Workflow UUID (use this for
workflow run) - NAME - Human-readable workflow name
- STEPS - Number of steps in the workflow
- CREATED - Creation date
Creating Workflows
openfang workflow create
Create a workflow from a JSON definition file.
Workflow Definition Format:
Example:
Running Workflows
openfang workflow run
Execute a workflow by ID.
Example:
- Step progress with real-time status
- Execution time for each step
- Total workflow duration
- Final output from the last step
Each step receives the output of previous steps via template variables (
{{steps.<id>.output}}).Workflow Examples
Content Creation Pipeline
Code Analysis & Documentation
Data Analysis Pipeline
Template Variables
Workflow prompts support Handlebars-style template variables:Input Variable
References the initial workflow input:Step Output Variables
References the output of previous steps:Multiple References
Step outputs are only available after the step has completed. Reference only previous steps in the chain.
Error Handling
Step Timeout
If a step exceeds its timeout, the workflow fails:timeout_seconds in the workflow definition:
Agent Not Found
Invalid Template Variable
Workflow Best Practices
1. Keep Steps Focused
❌ Bad: Single massive step2. Set Realistic Timeouts
- Simple tasks: 30-60 seconds
- Complex analysis: 90-180 seconds
- Code generation: 60-120 seconds
- Research: 120-300 seconds
3. Use Appropriate Agents
Match agents to task types:4. Validate JSON Before Creating
5. Test Steps Individually
Before creating a workflow, test each prompt withopenfang message:
Advanced Usage
Dynamic Workflows
Generate workflows programmatically:Workflow Chaining
Use the output of one workflow as input to another:Parallel Execution
Currently, workflow steps execute sequentially. For parallel execution, use separate workflows:Next Steps
Trigger Commands
Automate workflows with event triggers
Skill Commands
Enhance workflows with custom skills