execute
Executes the subgraph for the given input within context.
During execution this method:
Resolves the effective toolset according to the configured ToolSelectionStrategy and replaces context's LLM context with an updated one, overriding
tools, and optionallymodel,prompt.paramsandresponseProcessorfor the duration of the subgraph execution.Emits
onSubgraphExecutionStarting,onSubgraphExecutionCompletedandonSubgraphExecutionFailedpipeline events, unless this subgraph is the strategy-level subgraph (which is reported separately).Runs nodes starting from start (or from an enforced ExecutionPoint, if present) and follows edges until finish is reached or execution is interrupted.
Restores the original LLM context afterwards, preserving the updated message history.
Return
The output produced by finish, or null if execution was interrupted (for example, due to a requested jump to another node or a checkpoint rollback).
Parameters
The graph execution context which includes all necessary resources and metadata for execution.
The input data to be processed by the subgraph.