AIAgentEnvironment

AIAgentEnvironment provides a mechanism for AI agents to interface with an external environment. It offers methods for tool execution, error reporting, and sending termination messages.

Inheritors

Functions

Link copied to clipboard
abstract suspend fun executeTool(toolCall: MessagePart.Tool.Call): ReceivedToolResult

Executes a tool call and returns its result.

Executes a tool call with caller-supplied metadata and returns its result.

Link copied to clipboard

Executes a batch of tool calls within the AI agent environment and processes their results.

Executes a batch of tool calls with shared caller-supplied metadata and returns their results.

Link copied to clipboard
abstract suspend fun reportProblem(exception: Throwable)

Reports a problem that occurred within the environment.