AIAgentTool
class AIAgentTool(agent: AIAgentBase, agentName: String, agentDescription: String, requestDescription: String = "Input for the task") : Tool<AIAgentTool.AgentToolArgs, AIAgentTool.AgentToolResult> (source)
AIAgentTool is a specialized tool that integrates an AI agent for processing tasks by leveraging input arguments and producing corresponding results.
This class extends the generic Tool interface with custom argument and result types.
Parameters
agent
The AI agent that implements the AIAgentBase interface and handles task execution.
agentName
A name assigned to the tool that helps identify it.
agentDescription
A brief description of what the tool does.
requestDescription
An optional description of the input to the tool, defaulting to "Input for the task".
Constructors
Link copied to clipboard
constructor(agent: AIAgentBase, agentName: String, agentDescription: String, requestDescription: String = "Input for the task")
Creates an instance of AIAgentTool with the specified AI agent, its name, description, and an optional description for the request parameter.
Types
Link copied to clipboard
Link copied to clipboard
@Serializable
Functions
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
suspend fun executeAndSerialize(args: AIAgentTool.AgentToolArgs, enabler: DirectToolCallsEnabler): Pair<AIAgentTool.AgentToolResult, String>
Link copied to clipboard