Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
New wraps the given Agent as a Tool. The tool's name and description are taken directly from the agent's Name() and Description() methods.
When invoked, the tool runs the agent with a single user message containing the task, collects its final assistant text response, and returns it as the tool result string.
Design note: the sub-agent receives only the delegated task as its input; it does not inherit the parent agent's conversation history. This is an intentional stateless task-delegation pattern. If the sub-agent requires broader context it must be captured in its Instruction or supplied via other means. Propagating arbitrary parent history would require a breaking change to the tool.Tool interface.
Types ¶
This section is empty.