Documentation Index
Fetch the complete documentation index at: https://mintlify.com/RightNow-AI/openfang/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Workflows enable complex multi-agent pipelines where tasks flow between agents in sequence or parallel. Each workflow consists of steps that route tasks to specific agents.Workflow Concepts
Workflow Structure
Unique workflow ID (UUID)
Human-readable workflow name
Description of what the workflow does
Array of workflow steps (see below)
ISO 8601 creation timestamp
Step Structure
Step name for logging/display
Agent reference (by ID or name)
Prompt template. Use
{{input}} for previous output, {{var_name}} for variables.Execution mode:
sequential(default)fan_out- Run in parallel with subsequent fan-out stepscollect- Collect results from all preceding fan-out stepsconditional- Skip if condition not metloop- Repeat until condition or max iterations
Step timeout in seconds (default: 120)
Error handling:
fail(default) - Abort workflow on errorskip- Skip step and continueretry- Retry up to N times
Optional variable name to store step output
Create Workflow
Register a new workflow definition:POST /api/workflows
List Workflows
Get all registered workflows:GET /api/workflows
Run Workflow
Execute a workflow with input:POST /api/workflows/{id}/run
List Workflow Runs
Get execution history for a workflow:GET /api/workflows/{id}/runs
Workflow Patterns
Sequential Pipeline
Steps execute one after another:Fan-Out / Collect
Run multiple agents in parallel, then collect results:Conditional Steps
Skip steps based on conditions:deploy step only runs if test_result contains “passed” (case-insensitive).
Loop Steps
Repeat a step until a condition is met:- Output contains “no more improvements”, or
max_iterations(5) is reached
Error Handling
Fail (Default)
Abort the workflow on any error:Skip
Skip failed steps and continue:Retry
Retry failed steps up to N times:Variable Substitution
Use variables in prompt templates:{{input}}- Previous step’s output{{var_name}}- Named output variable from any step
Workflow State
Workflow runs progress through states:pending- Queued but not startedrunning- Currently executingcompleted- Successfully finishedfailed- Encountered an error
Step Results
Each completed step stores:Name of the step
UUID of the agent that executed the step
Name of the agent
Step output text
Input tokens consumed
Output tokens generated
Step duration in milliseconds
Run Retention
The workflow engine retains up to 200 workflow runs. When this limit is exceeded, the oldest completed/failed runs are evicted automatically.Best Practices
Timeouts
Set realistic timeouts for each step (default: 120s)
Error Handling
Use retry for transient failures, skip for optional steps
Fan-Out
Parallelize independent tasks with fan-out/collect
Variables
Store intermediate results in variables for reuse
Example: CI/CD Pipeline
Next Steps
Agents API
Learn how to spawn workflow agents
Memory API
Store workflow state in memory