Class: CompiledWorkflow
Defined in: packages/agentos/src/orchestration/builders/WorkflowBuilder.ts:692
An execution-ready workflow produced by WorkflowBuilder.compile().
Wraps a CompiledExecutionGraph and a GraphRuntime, exposing the same
three execution modes as the raw runtime:
invoke(input)— run to completion and return final artifacts.stream(input)— run while yieldingGraphEventvalues at each step.resume(checkpointId)— restore an interrupted run from a checkpoint.
Constructors
Constructor
new CompiledWorkflow(
ir,checkpointStore,deps?):CompiledWorkflow
Defined in: packages/agentos/src/orchestration/builders/WorkflowBuilder.ts:704
Parameters
ir
The compiled execution graph (produced by GraphCompiler).
checkpointStore
Checkpoint persistence backend.
deps?
NodeExecutorDeps = {}
Optional runtime executors forwarded to NodeExecutor.
Defaults to an empty object (no executors), in which
case tool / gmi / extension nodes degrade to
success: false. See WorkflowRuntimeDeps.
Returns
CompiledWorkflow
Methods
invoke()
invoke(
input):Promise<unknown>
Defined in: packages/agentos/src/orchestration/builders/WorkflowBuilder.ts:721
Execute the workflow to completion and return the final artifacts payload.
Parameters
input
unknown
Must conform to the schema declared via .input().
Returns
Promise<unknown>
The GraphState.artifacts value after all nodes complete.
resume()
resume(
checkpointId):Promise<unknown>
Defined in: packages/agentos/src/orchestration/builders/WorkflowBuilder.ts:741
Resume a previously interrupted workflow run from its latest checkpoint.
Parameters
checkpointId
string
Either the original run id or an exact checkpoint id.
Returns
Promise<unknown>
The final GraphState.artifacts value after resumption completes.
stream()
stream(
input):AsyncIterable<GraphEvent>
Defined in: packages/agentos/src/orchestration/builders/WorkflowBuilder.ts:731
Execute the workflow while yielding GraphEvent values at each step boundary.
Parameters
input
unknown
Must conform to the schema declared via .input().
Returns
AsyncIterable<GraphEvent>
Yields
Runtime events in causal order.
toIR()
toIR():
CompiledExecutionGraph
Defined in: packages/agentos/src/orchestration/builders/WorkflowBuilder.ts:750
Expose the compiled IR for inspection, serialisation, or subgraph composition.
Returns
The underlying CompiledExecutionGraph.