EventHandlerConfig

Configuration class for the EventHandler feature.

This class provides a way to configure handlers for various events that occur during the execution of an agent. These events include agent lifecycle events, strategy events, node events, LLM call events, and tool call events.

Each handler is a property that can be assigned a lambda function to be executed when the corresponding event occurs.

Example usage:

handleEvents {
onToolCallStarting { eventContext ->
println("Tool called: ${eventContext.tool.name} with args ${eventContext.toolArgs}")
}

onAgentCompleted { eventContext ->
println("Agent finished with result: ${eventContext.result}")
}
}

JVM implementation of event-handler configuration with Java-friendly handler registration methods.

Configuration class for the EventHandler feature.

This class provides a way to configure handlers for various events that occur during the execution of an agent. These events include agent lifecycle events, strategy events, node events, LLM call events, and tool call events.

Each handler is a property that can be assigned a lambda function to be executed when the corresponding event occurs.

Example usage:

handleEvents {
onToolCallStarting { eventContext ->
println("Tool called: ${eventContext.tool.name} with args ${eventContext.toolArgs}")
}

onAgentCompleted { eventContext ->
println("Agent finished with result: ${eventContext.result}")
}
}

Constructors

Link copied to clipboard
expect constructor()
actual constructor()
actual constructor()

Properties

Functions

Link copied to clipboard
Link copied to clipboard
fun javaApiOnAgentClosing(handler: ERROR CLASS: Symbol not found for Interceptor<ERROR CLASS: Symbol not found for AgentClosingContext>)

Appends a handler called before an agent is closed. This allows for additional behavior to be executed prior to the agent being closed.

Link copied to clipboard
fun javaApiOnAgentCompleted(handler: ERROR CLASS: Symbol not found for Interceptor<ERROR CLASS: Symbol not found for AgentCompletedContext>)

Append handler called when an agent finishes execution.

Link copied to clipboard
fun javaApiOnAgentExecutionFailed(handler: ERROR CLASS: Symbol not found for Interceptor<ERROR CLASS: Symbol not found for AgentExecutionFailedContext>)

Append handler called when an error occurs during agent execution.

Link copied to clipboard
fun javaApiOnAgentStarting(handler: ERROR CLASS: Symbol not found for Interceptor<ERROR CLASS: Symbol not found for AgentStartingContext>)

Append handler called when an agent is started.

Link copied to clipboard
fun javaApiOnLLMCallCompleted(handler: ERROR CLASS: Symbol not found for Interceptor<ERROR CLASS: Symbol not found for LLMCallCompletedContext>)

Append handler called after a response is received from the language model.

Link copied to clipboard
fun javaApiOnLLMCallStarting(handler: ERROR CLASS: Symbol not found for Interceptor<ERROR CLASS: Symbol not found for LLMCallStartingContext>)

Append handler called before a call is made to the language model.

Link copied to clipboard
fun javaApiOnLLMStreamingCompleted(handler: ERROR CLASS: Symbol not found for Interceptor<ERROR CLASS: Symbol not found for LLMStreamingCompletedContext>)

Registers a handler to be invoked after streaming from a language model completes.

Link copied to clipboard
fun javaApiOnLLMStreamingFailed(handler: ERROR CLASS: Symbol not found for Interceptor<ERROR CLASS: Symbol not found for LLMStreamingFailedContext>)

Registers a handler to be invoked when an error occurs during streaming.

Link copied to clipboard
fun javaApiOnLLMStreamingFrameReceived(handler: ERROR CLASS: Symbol not found for Interceptor<ERROR CLASS: Symbol not found for LLMStreamingFrameReceivedContext>)

Registers a handler to be invoked when stream frames are received during streaming.

Link copied to clipboard
fun javaApiOnLLMStreamingStarting(handler: ERROR CLASS: Symbol not found for Interceptor<ERROR CLASS: Symbol not found for LLMStreamingStartingContext>)

Registers a handler to be invoked before streaming from a language model begins.

Link copied to clipboard
fun javaApiOnNodeExecutionCompleted(handler: ERROR CLASS: Symbol not found for Interceptor<ERROR CLASS: Symbol not found for NodeExecutionCompletedContext>)

Append handler called after a node in the agent's execution graph has been processed.

Link copied to clipboard
fun javaApiOnNodeExecutionFailed(handler: ERROR CLASS: Symbol not found for Interceptor<ERROR CLASS: Symbol not found for NodeExecutionFailedContext>)

Append handler called when an error occurs during the execution of a node.

Link copied to clipboard
fun javaApiOnNodeExecutionStarting(handler: ERROR CLASS: Symbol not found for Interceptor<ERROR CLASS: Symbol not found for NodeExecutionStartingContext>)

Append handler called before a node in the agent's execution graph is processed.

Link copied to clipboard
fun javaApiOnStrategyCompleted(handler: ERROR CLASS: Symbol not found for Interceptor<ERROR CLASS: Symbol not found for StrategyCompletedContext>)

Append handler called when a strategy finishes execution.

Link copied to clipboard
fun javaApiOnStrategyStarting(handler: ERROR CLASS: Symbol not found for Interceptor<ERROR CLASS: Symbol not found for StrategyStartingContext>)

Append handler called when a strategy starts execution.

Link copied to clipboard
fun javaApiOnSubgraphExecutionCompleted(handler: ERROR CLASS: Symbol not found for Interceptor<ERROR CLASS: Symbol not found for SubgraphExecutionCompletedContext>)

Registers a handler to be invoked when the execution of a subgraph is completed.

Link copied to clipboard
fun javaApiOnSubgraphExecutionFailed(handler: ERROR CLASS: Symbol not found for Interceptor<ERROR CLASS: Symbol not found for SubgraphExecutionFailedContext>)

Handles an event where the execution of a subgraph has failed.

Link copied to clipboard
fun javaApiOnSubgraphExecutionStarting(handler: ERROR CLASS: Symbol not found for Interceptor<ERROR CLASS: Symbol not found for SubgraphExecutionStartingContext>)

Registers a handler for the subgraph execution starting event. This method allows asynchronous interception of the event, enabling users to execute custom logic during the beginning of a subgraph execution.

Link copied to clipboard
fun javaApiOnToolCallCompleted(handler: ERROR CLASS: Symbol not found for Interceptor<ERROR CLASS: Symbol not found for ToolCallCompletedContext>)

Append handler called when a tool call completes successfully.

Link copied to clipboard
fun javaApiOnToolCallFailed(handler: ERROR CLASS: Symbol not found for Interceptor<ERROR CLASS: Symbol not found for ToolCallFailedContext>)

Append handler called when a tool call fails with an exception.

Link copied to clipboard
fun javaApiOnToolCallStarting(handler: ERROR CLASS: Symbol not found for Interceptor<ERROR CLASS: Symbol not found for ToolCallStartingContext>)

Append handler called when a tool is about to be called.

Link copied to clipboard
fun javaApiOnToolValidationFailed(handler: ERROR CLASS: Symbol not found for Interceptor<ERROR CLASS: Symbol not found for ToolValidationFailedContext>)

Append handler called when a validation error occurs during a tool call.

Link copied to clipboard
fun onAfterLLMCall(handler: suspend (AfterLLMCallContext) -> Unit)

Append handler called after a response is received from the language model.

fun onAfterLLMCall(handler: suspend ({ai/koog/agents/core/feature/handler/AfterLLMCallContext=} @R|kotlin/ParameterName|(name = String(eventContext)) ai/koog/agents/core/feature/handler/llm/LLMCallCompletedContext) -> Unit)

Append handler called after a response is received from the language model.

fun onAfterLLMCall(handler: suspend (AfterLLMCallContext) -> Unit)

Append handler called after a response is received from the language model.

Link copied to clipboard
fun onAfterNode(handler: suspend (NodeAfterExecuteContext) -> Unit)

Append handler called after a node in the agent's execution graph has been processed.

fun onAfterNode(handler: suspend ({ai/koog/agents/core/feature/handler/NodeAfterExecuteContext=} @R|kotlin/ParameterName|(name = String(eventContext)) ai/koog/agents/core/feature/handler/node/NodeExecutionCompletedContext) -> Unit)

Append handler called after a node in the agent's execution graph has been processed.

fun onAfterNode(handler: suspend (NodeAfterExecuteContext) -> Unit)

Append handler called after a node in the agent's execution graph has been processed.

Link copied to clipboard

Appends a handler called before an agent is closed. This allows for additional behavior to be executed prior to the agent being closed.

fun onAgentBeforeClose(handler: suspend ({ai/koog/agents/core/feature/handler/AgentBeforeCloseContext=} @R|kotlin/ParameterName|(name = String(eventContext)) ai/koog/agents/core/feature/handler/agent/AgentClosingContext) -> Unit)

Appends a handler called before an agent is closed. This allows for additional behavior to be executed prior to the agent being closed.

Appends a handler called before an agent is closed. This allows for additional behavior to be executed prior to the agent being closed.

Link copied to clipboard
fun onAgentClosing(handler: suspend (eventContext: AgentClosingContext) -> Unit)

Appends a handler called before an agent is closed. This allows for additional behavior to be executed prior to the agent being closed.

fun onAgentClosing(handler: suspend (@R|kotlin/ParameterName|(name = String(eventContext)) ai/koog/agents/core/feature/handler/agent/AgentClosingContext) -> Unit)

Appends a handler called before an agent is closed. This allows for additional behavior to be executed prior to the agent being closed.

fun onAgentClosing(handler: suspend (eventContext: AgentClosingContext) -> Unit)

Appends a handler called before an agent is closed. This allows for additional behavior to be executed prior to the agent being closed.

Link copied to clipboard
fun onAgentCompleted(handler: suspend (eventContext: AgentCompletedContext) -> Unit)

Append handler called when an agent finishes execution.

fun onAgentCompleted(handler: suspend (@R|kotlin/ParameterName|(name = String(eventContext)) ai/koog/agents/core/feature/handler/agent/AgentCompletedContext) -> Unit)

Append handler called when an agent finishes execution.

fun onAgentCompleted(handler: suspend (eventContext: AgentCompletedContext) -> Unit)

Append handler called when an agent finishes execution.

Link copied to clipboard
fun onAgentExecutionFailed(handler: suspend (eventContext: AgentExecutionFailedContext) -> Unit)

Append handler called when an error occurs during agent execution.

fun onAgentExecutionFailed(handler: suspend (@R|kotlin/ParameterName|(name = String(eventContext)) ai/koog/agents/core/feature/handler/agent/AgentExecutionFailedContext) -> Unit)

Append handler called when an error occurs during agent execution.

fun onAgentExecutionFailed(handler: suspend (eventContext: AgentExecutionFailedContext) -> Unit)

Append handler called when an error occurs during agent execution.

Link copied to clipboard
fun onAgentFinished(handler: suspend (AgentFinishedContext) -> Unit)

Append handler called when an agent finishes execution.

fun onAgentFinished(handler: suspend ({ai/koog/agents/core/feature/handler/AgentFinishedContext=} @R|kotlin/ParameterName|(name = String(eventContext)) ai/koog/agents/core/feature/handler/agent/AgentCompletedContext) -> Unit)

Append handler called when an agent finishes execution.

fun onAgentFinished(handler: suspend (AgentFinishedContext) -> Unit)

Append handler called when an agent finishes execution.

Link copied to clipboard
fun onAgentRunError(handler: suspend (AgentRunErrorContext) -> Unit)

Append handler called when an error occurs during agent execution.

fun onAgentRunError(handler: suspend ({ai/koog/agents/core/feature/handler/AgentRunErrorContext=} @R|kotlin/ParameterName|(name = String(eventContext)) ai/koog/agents/core/feature/handler/agent/AgentExecutionFailedContext) -> Unit)

Append handler called when an error occurs during agent execution.

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

Append handler called when an error occurs during agent execution.

Link copied to clipboard
fun onAgentStarting(handler: suspend (eventContext: AgentStartingContext) -> Unit)

Append handler called when an agent is started.

fun onAgentStarting(handler: suspend (@R|kotlin/ParameterName|(name = String(eventContext)) ai/koog/agents/core/feature/handler/agent/AgentStartingContext) -> Unit)

Append handler called when an agent is started.

fun onAgentStarting(handler: suspend (eventContext: AgentStartingContext) -> Unit)

Append handler called when an agent is started.

Link copied to clipboard
fun onBeforeAgentStarted(handler: suspend (AgentStartContext) -> Unit)

Append handler called when an agent is started.

fun onBeforeAgentStarted(handler: suspend ({ai/koog/agents/core/feature/handler/AgentStartContext=} @R|kotlin/ParameterName|(name = String(eventContext)) ai/koog/agents/core/feature/handler/agent/AgentStartingContext) -> Unit)

Append handler called when an agent is started.

fun onBeforeAgentStarted(handler: suspend (AgentStartContext) -> Unit)

Append handler called when an agent is started.

Link copied to clipboard
fun onBeforeLLMCall(handler: suspend (BeforeLLMCallContext) -> Unit)

Append handler called before a call is made to the language model.

fun onBeforeLLMCall(handler: suspend ({ai/koog/agents/core/feature/handler/BeforeLLMCallContext=} @R|kotlin/ParameterName|(name = String(eventContext)) ai/koog/agents/core/feature/handler/llm/LLMCallStartingContext) -> Unit)

Append handler called before a call is made to the language model.

fun onBeforeLLMCall(handler: suspend (BeforeLLMCallContext) -> Unit)

Append handler called before a call is made to the language model.

Link copied to clipboard
fun onBeforeNode(handler: suspend (NodeBeforeExecuteContext) -> Unit)

Append handler called before a node in the agent's execution graph is processed.

fun onBeforeNode(handler: suspend ({ai/koog/agents/core/feature/handler/NodeBeforeExecuteContext=} @R|kotlin/ParameterName|(name = String(eventContext)) ai/koog/agents/core/feature/handler/node/NodeExecutionStartingContext) -> Unit)

Append handler called before a node in the agent's execution graph is processed.

fun onBeforeNode(handler: suspend (NodeBeforeExecuteContext) -> Unit)

Append handler called before a node in the agent's execution graph is processed.

Link copied to clipboard
fun onLLMCallCompleted(handler: suspend (eventContext: LLMCallCompletedContext) -> Unit)

Append handler called after a response is received from the language model.

fun onLLMCallCompleted(handler: suspend (@R|kotlin/ParameterName|(name = String(eventContext)) ai/koog/agents/core/feature/handler/llm/LLMCallCompletedContext) -> Unit)

Append handler called after a response is received from the language model.

fun onLLMCallCompleted(handler: suspend (eventContext: LLMCallCompletedContext) -> Unit)

Append handler called after a response is received from the language model.

Link copied to clipboard
fun onLLMCallStarting(handler: suspend (eventContext: LLMCallStartingContext) -> Unit)

Append handler called before a call is made to the language model.

fun onLLMCallStarting(handler: suspend (@R|kotlin/ParameterName|(name = String(eventContext)) ai/koog/agents/core/feature/handler/llm/LLMCallStartingContext) -> Unit)

Append handler called before a call is made to the language model.

fun onLLMCallStarting(handler: suspend (eventContext: LLMCallStartingContext) -> Unit)

Append handler called before a call is made to the language model.

Link copied to clipboard
fun onLLMStreamingCompleted(handler: suspend (eventContext: LLMStreamingCompletedContext) -> Unit)

Registers a handler to be invoked after streaming from a language model completes.

fun onLLMStreamingCompleted(handler: suspend (@R|kotlin/ParameterName|(name = String(eventContext)) ai/koog/agents/core/feature/handler/streaming/LLMStreamingCompletedContext) -> Unit)

Registers a handler to be invoked after streaming from a language model completes.

fun onLLMStreamingCompleted(handler: suspend (eventContext: LLMStreamingCompletedContext) -> Unit)

Registers a handler to be invoked after streaming from a language model completes.

Link copied to clipboard
fun onLLMStreamingFailed(handler: suspend (eventContext: LLMStreamingFailedContext) -> Unit)

Registers a handler to be invoked when an error occurs during streaming.

fun onLLMStreamingFailed(handler: suspend (@R|kotlin/ParameterName|(name = String(eventContext)) ai/koog/agents/core/feature/handler/streaming/LLMStreamingFailedContext) -> Unit)

Registers a handler to be invoked when an error occurs during streaming.

fun onLLMStreamingFailed(handler: suspend (eventContext: LLMStreamingFailedContext) -> Unit)

Registers a handler to be invoked when an error occurs during streaming.

Link copied to clipboard
fun onLLMStreamingFrameReceived(handler: suspend (eventContext: LLMStreamingFrameReceivedContext) -> Unit)

Registers a handler to be invoked when stream frames are received during streaming.

fun onLLMStreamingFrameReceived(handler: suspend (@R|kotlin/ParameterName|(name = String(eventContext)) ai/koog/agents/core/feature/handler/streaming/LLMStreamingFrameReceivedContext) -> Unit)

Registers a handler to be invoked when stream frames are received during streaming.

fun onLLMStreamingFrameReceived(handler: suspend (eventContext: LLMStreamingFrameReceivedContext) -> Unit)

Registers a handler to be invoked when stream frames are received during streaming.

Link copied to clipboard
fun onLLMStreamingStarting(handler: suspend (eventContext: LLMStreamingStartingContext) -> Unit)

Registers a handler to be invoked before streaming from a language model begins.

fun onLLMStreamingStarting(handler: suspend (@R|kotlin/ParameterName|(name = String(eventContext)) ai/koog/agents/core/feature/handler/streaming/LLMStreamingStartingContext) -> Unit)

Registers a handler to be invoked before streaming from a language model begins.

fun onLLMStreamingStarting(handler: suspend (eventContext: LLMStreamingStartingContext) -> Unit)

Registers a handler to be invoked before streaming from a language model begins.

Link copied to clipboard
fun onNodeExecutionCompleted(handler: suspend (eventContext: NodeExecutionCompletedContext) -> Unit)

Append handler called after a node in the agent's execution graph has been processed.

fun onNodeExecutionCompleted(handler: suspend (@R|kotlin/ParameterName|(name = String(eventContext)) ai/koog/agents/core/feature/handler/node/NodeExecutionCompletedContext) -> Unit)

Append handler called after a node in the agent's execution graph has been processed.

fun onNodeExecutionCompleted(handler: suspend (eventContext: NodeExecutionCompletedContext) -> Unit)

Append handler called after a node in the agent's execution graph has been processed.

Link copied to clipboard

Append handler called when an error occurs during the execution of a node.

fun onNodeExecutionError(handler: suspend ({ai/koog/agents/core/feature/handler/NodeExecutionErrorContext=} @R|kotlin/ParameterName|(name = String(eventContext)) ai/koog/agents/core/feature/handler/node/NodeExecutionFailedContext) -> Unit)

Append handler called when an error occurs during the execution of a node.

Append handler called when an error occurs during the execution of a node.

Link copied to clipboard
fun onNodeExecutionFailed(handler: suspend (eventContext: NodeExecutionFailedContext) -> Unit)

Append handler called when an error occurs during the execution of a node.

fun onNodeExecutionFailed(handler: suspend (@R|kotlin/ParameterName|(name = String(eventContext)) ai/koog/agents/core/feature/handler/node/NodeExecutionFailedContext) -> Unit)

Append handler called when an error occurs during the execution of a node.

fun onNodeExecutionFailed(handler: suspend (eventContext: NodeExecutionFailedContext) -> Unit)

Append handler called when an error occurs during the execution of a node.

Link copied to clipboard
fun onNodeExecutionStarting(handler: suspend (eventContext: NodeExecutionStartingContext) -> Unit)

Append handler called before a node in the agent's execution graph is processed.

fun onNodeExecutionStarting(handler: suspend (@R|kotlin/ParameterName|(name = String(eventContext)) ai/koog/agents/core/feature/handler/node/NodeExecutionStartingContext) -> Unit)

Append handler called before a node in the agent's execution graph is processed.

fun onNodeExecutionStarting(handler: suspend (eventContext: NodeExecutionStartingContext) -> Unit)

Append handler called before a node in the agent's execution graph is processed.

Link copied to clipboard
fun onStrategyCompleted(handler: suspend (eventContext: StrategyCompletedContext) -> Unit)

Append handler called when a strategy finishes execution.

fun onStrategyCompleted(handler: suspend (@R|kotlin/ParameterName|(name = String(eventContext)) ai/koog/agents/core/feature/handler/strategy/StrategyCompletedContext) -> Unit)

Append handler called when a strategy finishes execution.

fun onStrategyCompleted(handler: suspend (eventContext: StrategyCompletedContext) -> Unit)

Append handler called when a strategy finishes execution.

Link copied to clipboard

Append handler called when a strategy finishes execution.

fun onStrategyFinished(handler: suspend ({ai/koog/agents/core/feature/handler/StrategyFinishedContext=} @R|kotlin/ParameterName|(name = String(eventContext)) ai/koog/agents/core/feature/handler/strategy/StrategyCompletedContext) -> Unit)

Append handler called when a strategy finishes execution.

Append handler called when a strategy finishes execution.

Link copied to clipboard
fun onStrategyStarted(handler: suspend (StrategyStartContext) -> Unit)

Append handler called when a strategy starts execution.

fun onStrategyStarted(handler: suspend ({ai/koog/agents/core/feature/handler/StrategyStartContext=} @R|kotlin/ParameterName|(name = String(eventContext)) ai/koog/agents/core/feature/handler/strategy/StrategyStartingContext) -> Unit)

Append handler called when a strategy starts execution.

fun onStrategyStarted(handler: suspend (StrategyStartContext) -> Unit)

Append handler called when a strategy starts execution.

Link copied to clipboard
fun onStrategyStarting(handler: suspend (eventContext: StrategyStartingContext) -> Unit)

Append handler called when a strategy starts execution.

fun onStrategyStarting(handler: suspend (@R|kotlin/ParameterName|(name = String(eventContext)) ai/koog/agents/core/feature/handler/strategy/StrategyStartingContext) -> Unit)

Append handler called when a strategy starts execution.

fun onStrategyStarting(handler: suspend (eventContext: StrategyStartingContext) -> Unit)

Append handler called when a strategy starts execution.

Link copied to clipboard

Append handler called after a subgraph in the agent's execution graph has been processed.

fun onSubgraphExecutionCompleted(handler: suspend (@R|kotlin/ParameterName|(name = String(eventContext)) ai/koog/agents/core/feature/handler/subgraph/SubgraphExecutionCompletedContext) -> Unit)

Append handler called after a subgraph in the agent's execution graph has been processed.

Append handler called after a subgraph in the agent's execution graph has been processed.

Link copied to clipboard
fun onSubgraphExecutionFailed(handler: suspend (eventContext: SubgraphExecutionFailedContext) -> Unit)

Append handler called when an error occurs during the execution of a subgraph.

fun onSubgraphExecutionFailed(handler: suspend (@R|kotlin/ParameterName|(name = String(eventContext)) ai/koog/agents/core/feature/handler/subgraph/SubgraphExecutionFailedContext) -> Unit)

Append handler called when an error occurs during the execution of a subgraph.

fun onSubgraphExecutionFailed(handler: suspend (eventContext: SubgraphExecutionFailedContext) -> Unit)

Append handler called when an error occurs during the execution of a subgraph.

Link copied to clipboard
fun onSubgraphExecutionStarting(handler: suspend (eventContext: SubgraphExecutionStartingContext) -> Unit)

Append handler called before a subgraph in the agent's execution graph is processed.

fun onSubgraphExecutionStarting(handler: suspend (@R|kotlin/ParameterName|(name = String(eventContext)) ai/koog/agents/core/feature/handler/subgraph/SubgraphExecutionStartingContext) -> Unit)

Append handler called before a subgraph in the agent's execution graph is processed.

fun onSubgraphExecutionStarting(handler: suspend (eventContext: SubgraphExecutionStartingContext) -> Unit)

Append handler called before a subgraph in the agent's execution graph is processed.

Link copied to clipboard
fun onToolCall(handler: suspend (ToolCallContext) -> Unit)

Append handler called when a tool is about to be called.

fun onToolCall(handler: suspend ({ai/koog/agents/core/feature/handler/ToolCallContext=} @R|kotlin/ParameterName|(name = String(eventContext)) ai/koog/agents/core/feature/handler/tool/ToolCallStartingContext) -> Unit)

Append handler called when a tool is about to be called.

fun onToolCall(handler: suspend (ToolCallContext) -> Unit)

Append handler called when a tool is about to be called.

Link copied to clipboard
fun onToolCallCompleted(handler: suspend (eventContext: ToolCallCompletedContext) -> Unit)

Append handler called when a tool call completes successfully.

fun onToolCallCompleted(handler: suspend (@R|kotlin/ParameterName|(name = String(eventContext)) ai/koog/agents/core/feature/handler/tool/ToolCallCompletedContext) -> Unit)

Append handler called when a tool call completes successfully.

fun onToolCallCompleted(handler: suspend (eventContext: ToolCallCompletedContext) -> Unit)

Append handler called when a tool call completes successfully.

Link copied to clipboard
fun onToolCallFailed(handler: suspend (eventContext: ToolCallFailedContext) -> Unit)

Append handler called when a tool call fails with an exception.

fun onToolCallFailed(handler: suspend (@R|kotlin/ParameterName|(name = String(eventContext)) ai/koog/agents/core/feature/handler/tool/ToolCallFailedContext) -> Unit)

Append handler called when a tool call fails with an exception.

fun onToolCallFailed(handler: suspend (eventContext: ToolCallFailedContext) -> Unit)

Append handler called when a tool call fails with an exception.

Link copied to clipboard
fun onToolCallFailure(handler: suspend (ToolCallFailureContext) -> Unit)

Append handler called when a tool call fails with an exception.

fun onToolCallFailure(handler: suspend ({ai/koog/agents/core/feature/handler/ToolCallFailureContext=} @R|kotlin/ParameterName|(name = String(eventContext)) ai/koog/agents/core/feature/handler/tool/ToolCallFailedContext) -> Unit)

Append handler called when a tool call fails with an exception.

fun onToolCallFailure(handler: suspend (ToolCallFailureContext) -> Unit)

Append handler called when a tool call fails with an exception.

Link copied to clipboard
fun onToolCallResult(handler: suspend (ToolCallResultContext) -> Unit)

Append handler called when a tool call completes successfully.

fun onToolCallResult(handler: suspend ({ai/koog/agents/core/feature/handler/ToolCallResultContext=} @R|kotlin/ParameterName|(name = String(eventContext)) ai/koog/agents/core/feature/handler/tool/ToolCallCompletedContext) -> Unit)

Append handler called when a tool call completes successfully.

fun onToolCallResult(handler: suspend (ToolCallResultContext) -> Unit)

Append handler called when a tool call completes successfully.

Link copied to clipboard
fun onToolCallStarting(handler: suspend (eventContext: ToolCallStartingContext) -> Unit)

Append handler called when a tool is about to be called.

fun onToolCallStarting(handler: suspend (@R|kotlin/ParameterName|(name = String(eventContext)) ai/koog/agents/core/feature/handler/tool/ToolCallStartingContext) -> Unit)

Append handler called when a tool is about to be called.

fun onToolCallStarting(handler: suspend (eventContext: ToolCallStartingContext) -> Unit)

Append handler called when a tool is about to be called.

Link copied to clipboard

Append handler called when a validation error occurs during a tool call.

fun onToolValidationError(handler: suspend ({ai/koog/agents/core/feature/handler/ToolValidationErrorContext=} @R|kotlin/ParameterName|(name = String(eventContext)) ai/koog/agents/core/feature/handler/tool/ToolValidationFailedContext) -> Unit)

Append handler called when a validation error occurs during a tool call.

Append handler called when a validation error occurs during a tool call.

Link copied to clipboard
fun onToolValidationFailed(handler: suspend (eventContext: ToolValidationFailedContext) -> Unit)

Append handler called when a validation error occurs during a tool call.

fun onToolValidationFailed(handler: suspend (@R|kotlin/ParameterName|(name = String(eventContext)) ai/koog/agents/core/feature/handler/tool/ToolValidationFailedContext) -> Unit)

Append handler called when a validation error occurs during a tool call.

fun onToolValidationFailed(handler: suspend (eventContext: ToolValidationFailedContext) -> Unit)

Append handler called when a validation error occurs during a tool call.

Link copied to clipboard