EventHandler
A feature that allows hooking into various events in the agent's lifecycle.
The EventHandler provides a way to register callbacks for different events that occur during the execution of an agent, such as agent lifecycle events, strategy events, node events, LLM call events, and tool call events.
Example usage:
handleEvents {
onToolCall = { stage, tool, toolArgs ->
println("Tool called: ${tool.name} with args $toolArgs")
}
onAgentFinished = { strategyName, result ->
println("Agent finished with result: $result")
}
}
Content copied to clipboard
Types
Link copied to clipboard
Implementation of the AIAgentFeature interface for the EventHandler feature.