LLMToolCallObserver
interfacein packageklyn.llm
public interface LLMToolCallObserver:
LLMToolCallObserver

Observes tool calls performed by an LLMChatSession.

An observer is useful for user interfaces that need to display tool activity while a provider request is still running. The observer must stay lightweight: it is called from the same worker that executes the model request and the actual tool invocation.

class ConsoleToolObserver implements LLMToolCallObserver:
public override beforeToolCall(call as ToolCall) as Void:
print("tool: " + call.name)
Methods
Modifier and Type Member Description
public afterToolCall
afterToolCall(call as ToolCall, result as String) as Void
Called after a tool executed successfully.
public beforeToolCall
beforeToolCall(call as ToolCall) as Void
Called just before a tool is executed.
public toolCallFailed
toolCallFailed(call as ToolCall, exception as Exception) as Void
Called when a tool cannot be executed.