Package-level declarations

Types

Link copied to clipboard
Link copied to clipboard
data class ReceivedToolResult(val id: String?, val tool: String, val content: String, val result: ToolResult?)

Represents the result or response received from a tool operation.

Link copied to clipboard
data class SafeTool<TArgs : Tool.Args, TResult : ToolResult>(tool: Tool<TArgs, TResult>, environment: AIAgentEnvironment, clock: Clock)

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.

Link copied to clipboard
data class SafeToolFromCallable<TResult>(val toolFunction: KFunction<TResult>, environment: AIAgentEnvironment, clock: Clock)

A wrapper class that creates a safer abstraction for executing a tool function alongside an associated environment. The tool function is backed by a callable in the form of a KFunction and interacts with the AIAgentEnvironment to perform operations and exchange data.

Link copied to clipboard

Provides constants related to the termination tool functionality in an AI agent environment.

Functions

Link copied to clipboard
Link copied to clipboard

Adds a tool result to the prompt.

Link copied to clipboard

Converts an instance of AIAgentEnvironmentToolResultToAgentContent to a ReceivedToolResult.

Converts an instance of AIAgentEnvironmentToolResultToAgentContent to a ReceivedToolResult.

Link copied to clipboard

Converts a ReceivedToolResult instance into a SafeTool.Result for safer result handling.