SafeTool
data class SafeTool<TArgs, TResult>(tool: Tool<TArgs, TResult>, environment: AIAgentEnvironment, clock: Clock)(source)
A wrapper class designed to safely execute a tool within a given AI agent environment. It provides mechanisms for handling tool execution results and differentiating between success and failure cases.
Constructors
Types
Functions
Link copied to clipboard
Executes the tool with the provided arguments and returns the result.
Link copied to clipboard
Executes a tool with the provided arguments in an unsafe manner. This method does not enforce type safety for the arguments provided to the tool.
Link copied to clipboard
suspend fun <TResult> SafeTool<ERROR CLASS: Symbol not found for ToolFromCallable.Args, TResult>.executeUnsafe(serializer: ERROR CLASS: Symbol not found for JSONSerializer, vararg args: Any?): SafeTool.Result<TResult>