Injected dependencies shared across all runs handled by this instance.
Execute the graph to completion and return the final artifacts payload.
This is a convenience wrapper around stream() that discards intermediate events
and awaits the terminal run_end event.
Compiled execution graph to run.
Initial user-provided input; frozen into GraphState.input.
The GraphState.artifacts value after the last node completes.
Execute the graph while yielding GraphEvent values at each significant step.
Events are emitted in strict causal order:
run_start → (node_start → node_end → edge_transition?)+ → run_end
Checkpoints are saved according to both the graph-wide checkpointPolicy and
per-node checkpoint settings. An interrupt event causes immediate suspension
followed by a terminal run_end.
Compiled execution graph to run.
Initial user-provided input; frozen into GraphState.input.
Runtime events in causal order.
Resume a previously interrupted run from its latest persisted checkpoint.
The runtime restores GraphState from the checkpoint and re-executes any nodes
that had not yet completed when the run was suspended. Nodes recorded as
write, external, or human effect-class are replayed from their stored
outputs to avoid duplicate side-effects; all other nodes are re-executed.
The same compiled graph that was originally invoked.
Either the original run id or an exact checkpoint id.
The final GraphState.artifacts value after resumption completes.
When no checkpoint exists for the given identifier.
Resume a previously interrupted run and stream runtime events from the restore point.
Accepts either the original run id or an exact checkpoint id. The resolved checkpoint
is used to reconstruct GraphState, then execution continues through the same event
stream contract as ().
Compiled execution graph to resume.
Either the original run id or an exact checkpoint id.
Runtime events in causal order from the checkpoint onward.
When no checkpoint exists for the given identifier.
Main execution engine for compiled AgentOS graphs.
Instantiate once and reuse across multiple runs — the runtime itself is stateless between calls. Each
invoke()/stream()/resume()call creates isolated local state tracked via closures.Example