createAgentTool
inline fun <Input, Output> AIAgentService<Input, Output, *>.createAgentTool(agentName: String, agentDescription: String, inputDescription: String? = null, inputType: TypeToken = typeToken<Input>(), outputType: TypeToken = typeToken<Output>(), parentAgentId: String? = null, clock: KoogClock = KoogClock.System): Tool<AIAgentTool.AgentToolInput<Input>, AIAgentTool.AgentToolResult<Output>>(source)
Creates an AIAgent and converts it to a Tool that can be used by other AI Agents.
Return
A special tool that wraps the agent functionality.
A tool instance configured with the provided parameters, representing the AI agent.
Parameters
agentName
Agent name that would be a tool name for this agent tool.
agentDescription
Agent description that would be a tool description for this agent tool.
inputType
Type token representing agent input.
outputType
Type token representing agent output.
parentAgentId
Optional ID of the parent AI agent. Tool agent IDs will be generated as "parentAgentId.
clock
The clock instance used to manage time-related operations. Defaults to KoogClock.System.