Skip to main content
Understanding the execution model helps you design reliable workflows and debug issues effectively.

Build Time vs Run Time

Workflows have two distinct phases:

Build Time

Design your workflow in the editor. Define steps, configure tools, and set up dependencies.

Run Time

The runner interprets and executes the manifest. Steps run in dependency order as data flows through.

Execution Timeline

When a workflow runs, it follows this timeline:
1

Trigger

Execution begins via API call, schedule, MCP, or manual run
2

Validate

Input parameters validated, manifest loaded
3

Execute

Steps run according to dependency graph
4

Handle

Errors caught, retries attempted if configured
5

Return

Final result returned to caller

Step Execution Patterns

Sequential

Steps with dependencies run one after another

Parallel

Independent steps run simultaneously

Conditional

Steps run only when when condition is true

Loop

Steps repeat for each item via forEach

Sequential Execution

Steps with needs wait for their dependencies:
Execution order: step_astep_bstep_c

Parallel Execution

Steps without shared dependencies run in parallel:
Execution order: input → (branch_abranch_b) → merge

Conditional Execution

Use when for conditional logic:
Only one handler executes based on the classification result.

Loop Execution (forEach)

Process collections with forEach:
The step executes once for each item in the collection.

Failure Modes

Step Status States

Each step transitions through these states:

Variable Resolution

Variables are resolved at execution time:

Error Handling Best Practices

  1. Validate Early: Use INPUT_* tools to validate data at the start
  2. Check Outputs: Add validation steps after critical operations
  3. Use Conditions: Handle different outcomes with when clauses
  4. Design for Failure: Consider what happens when external services fail
  5. Review History: Use execution history to analyze failures

Debugging Tips

What’s Next?

Debug Workflows

Learn debugging techniques

YAML Reference

Complete manifest syntax reference