Skip to main content

Module workflow_engine

Module workflow_engine 

Source
Expand description

Workflow execution engine.

Takes a parsed WorkflowDefinition and executes its steps using the SDK’s coordination primitives (SharedMemory, Consensus) and a pre-built agent map. The engine is pure orchestration — it does not spawn agents itself; the caller registers them by name at construction time via WorkflowEngine::new.

§Step semantics

Every top-level step produces exactly one StepOutput. Nested step lists (currently only WorkflowStepDef::Chain) do not emit their own StepOutputs — their children run internally and the chain emits a single summary row. This keeps the workflow result flat: one row per declared top-level step.

§{previous} substitution

The task string of a WorkflowStepDef::Run step may contain the literal {previous}; the engine replaces it with the most recent Run/Chain/Parallel step’s response text. Inside a Chain, {previous} threads through the chain’s child steps independently of the outer workflow.

Structs§

StepOutput
Output of one workflow step.
WorkflowEngine
Workflow execution engine with a pre-built agent map.
WorkflowResult
Aggregate result of a workflow run.