interceptSubgraphExecutionStarting
fun interceptSubgraphExecutionStarting(feature: AIAgentGraphFeature<*, *>, handle: suspend (eventContext: SubgraphExecutionStartingContext) -> Unit)(source)
Intercepts the execution of a subgraph when it starts.
Parameters
feature
The graph feature associated with the AI agent for which the subgraph execution is intercepted.
handle
A suspendable lambda that handles the subgraph execution starting event context.
Example:
pipeline.interceptSubgraphExecutionStarting(feature) { eventContext ->
logger.info("Subgraph ${eventContext.subgraph.name} is about to execute with input: ${eventContext.input}")
}Content copied to clipboard