onAgentRunError

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

Append handler called when an error occurs during agent execution.


var onAgentRunError: suspend (strategyName: String, sessionUuid: Uuid?, throwable: Throwable) -> Unit(source)

Deprecated

Please use onAgentRunError() instead

Replace with

onAgentRunError(handler)

A deprecated variable used to define a handler that is called when an error occurs during agent execution.

This handler is invoked with the strategy name, an optional session UUID, and the throwable that caused the error.