interceptAgentBeforeClose
fun <TFeature : Any> interceptAgentBeforeClose(interceptContext: InterceptContext<TFeature>, handle: suspend TFeature.(AgentClosingContext) -> Unit)(source)
Deprecated
Please use interceptAgentClosing instead. This method is deprecated and will be removed in the next release.
Replace with
import ai.koog.agents.core.feature.handler.agent.AgentClosingContext
Content copied to clipboard
interceptAgentClosing(interceptContext, handle)
Content copied to clipboard
Intercepts and sets a handler to be invoked before an agent is closed.