onAgentRunError

fun onAgentRunError(handler: suspend (AgentRunErrorContext) -> Unit)(source)

Deprecated

Use onAgentExecutionFailed instead

Replace with

import ai.koog.agents.core.feature.handler.AgentExecutionFailedContext
onAgentExecutionFailed(handler)

Append handler called when an error occurs during agent execution.