interceptAgentFinished

fun <TFeature : Any> interceptAgentFinished(feature: AIAgentFeature<*, TFeature>, featureImpl: TFeature, handle: suspend TFeature.(strategyName: String, result: String?) -> 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(MyFeature, myFeatureImpl) { strategyName, result ->
// Handle the completion result here, using the strategy name and the result.
}