agentool

package
v0.0.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 20, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(a agent.Agent) (tool.Tool, error)

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL