interceptAgentFinished

fun <TFeature : Any> interceptAgentFinished(context: InterceptContext<TFeature>, handle: suspend TFeature.(eventContext: AgentFinishedContext) -> Unit)(source)

Intercepts the completion of an agent's operation and assigns a custom handler to process the result.

Parameters

handle

A suspend function providing custom logic to execute when the agent completes,

Example:

pipeline.interceptAgentFinished(InterceptContext { eventContext ->
// Handle the completion result here, using the strategy name and the result.
}