Package com.tnsai.agents.execution
Interface ToolCallListener
public interface ToolCallListener
Listener for tool call lifecycle events.
Used by CLI to render tool call visualization (spinners, results).
Set via AgentToolExecutor.setToolCallListener(ToolCallListener).
-
Method Summary
Modifier and TypeMethodDescriptionvoidonToolCallComplete(String toolName, Object result, boolean success, long latencyMs) Called after a tool call completes (success or failure).voidonToolCallStart(String toolName, Map<String, Object> arguments) Called before a tool call is executed.
-
Method Details
-
onToolCallStart
Called before a tool call is executed.- Parameters:
toolName- the name of the toolarguments- the arguments passed to the tool
-
onToolCallComplete
Called after a tool call completes (success or failure).- Parameters:
toolName- the name of the toolresult- the result (or error message)success- true if the call succeededlatencyMs- execution time in milliseconds
-