createAgentTool
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
Agent name that would be a tool name for this agent tool.
Agent description that would be a tool description for this agent tool.
An optional description of the agent's input. Required for primitive types only!
If not specified for a primitive input type (ex: String, Int, ...), an empty input description will be sent to LLM.
Does not have any effect for non-primitive Input type with @LLMDescription annotations.
Serializer to deserialize tool arguments to agent input.
Serializer to serialize agent output to tool result.
Optional Json instance to customize de/serialization behavior.
Optional ID of the parent AI agent. Tool agent IDs will be generated as "parentAgentId.
The clock instance used to manage time-related operations. Defaults to Clock.System
.