interceptSubgraphExecutionCompleted

Intercepts the completion of a subgraph execution and allows handling of the event.

Parameters

feature

The AI agent graph feature that specifies the feature to intercept.

handle

A suspendable function that handles the subgraph execution completion event, taking the event context as a parameter.

Example:

pipeline.interceptSubgraphExecutionCompleted(feature) { eventContext ->
logger.info("Subgraph ${eventContext.subgraph.name} executed with input: ${eventContext.input} and produced output: ${eventContext.output}")
}