Skip to main content

Module executor

Module executor 

Source
Expand description

Workflow executor — runs compiled DAG with level-based parallel execution.

The executor runs a WorkflowDag by:

  1. Processing levels sequentially (level 0 → level 1 → … → level N)
  2. Within each level, running all steps concurrently (since they have no mutual dependencies)
  3. Tracking step results and passing context between levels
  4. Handling timeouts, retries, and approval gates
  5. Supporting {{variable}} template interpolation in tool_args and prompt fields
  6. Executing LLM inference for prompt-based steps when a provider is available

Step results are accumulated in a WorkflowContext that flows between levels. Template interpolation replaces {{step_id_output}} and {{step_id}} with previous step outputs, and {{variable_name}} with context variables.

Structs§

StepResult
The result of a single workflow step execution.
WorkflowContext
Workflow execution context — shared state that flows between levels.
WorkflowExecutor
Workflow executor — runs a compiled DAG.
WorkflowResult
The result of the entire workflow execution.

Enums§

StepStatus
The status of a workflow step execution.

Functions§

interpolate_template
Interpolate {{variable}} template patterns in a string.