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 {
onToolCall { stage, tool, toolArgs ->
println("Tool called: ${tool.name} with args $toolArgs")
}
onAgentFinished { strategyName, result ->
println("Agent finished with result: $result")
}
}
Properties
Functions
Append handler called after a response is received from the language model.
Append handler called after a node in the agent's execution graph has been processed.
Append handler called when an agent finishes execution.
Append handler called when an error occurs during agent execution.
Append handler called when an agent is started.
Append handler called before a call is made to the language model.
Append handler called before a node in the agent's execution graph is processed.
Append handler called when a strategy finishes execution.
Append handler called when a strategy starts execution.
Append handler called when a tool is about to be called.
Append handler called when a tool call fails with an exception.
Append handler called when a tool call completes successfully.
Append handler called when a validation error occurs during a tool call.