GenericAgentEnvironment
class GenericAgentEnvironment(agentId: String, logger: KLogger, toolRegistry: ToolRegistry, serializer: JSONSerializer) : AIAgentEnvironment(source)
Represents base agent environment with generic abstractions.
Constructors
Link copied to clipboard
constructor(agentId: String, logger: KLogger, toolRegistry: ToolRegistry, serializer: JSONSerializer)
Functions
Link copied to clipboard
Executes a tool call and returns its result.
open suspend override fun executeTool(toolCall: MessagePart.Tool.Call, metadata: ToolCallMetadata): ReceivedToolResult
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.
open suspend fun executeTools(toolCalls: List<MessagePart.Tool.Call>, metadata: ToolCallMetadata): List<ReceivedToolResult>
Executes a batch of tool calls with shared caller-supplied metadata and returns their results.
Link copied to clipboard
Reports a problem that occurred within the environment.