onAgentExecutionFailed

suspend fun onAgentExecutionFailed(eventId: String, executionInfo: AgentExecutionInfo, agentId: String, runId: String, throwable: Throwable, context: AIAgentContext)(source)

Notifies all registered handlers about an error that occurred during agent execution.

Parameters

eventId

The unique identifier for the event group.

executionInfo

The execution information for the agent environment transformation event

agentId

The unique identifier of the agent that encountered the error

runId

The unique identifier of the agent run

throwable

The Throwable exception instance that was thrown during agent execution

context

The context of the agent execution, providing access to the agent environment and context features