Documentation
¶
Index ¶
- Constants
- type AgentTool
- func (at *AgentTool) Description() string
- func (at *AgentTool) DisplayName() string
- func (at *AgentTool) Execute(ctx context.Context, args string) (string, error)
- func (at *AgentTool) Internal() bool
- func (at *AgentTool) Name() string
- func (at *AgentTool) Parameters() map[string]interfaces.ParameterSpec
- func (at *AgentTool) Run(ctx context.Context, input string) (string, error)
- func (at *AgentTool) SetDescription(description string)
- func (at *AgentTool) WithLogger(logger logging.Logger) *AgentTool
- func (at *AgentTool) WithTimeout(timeout time.Duration) *AgentTool
- func (at *AgentTool) WithTracer(tracer interfaces.Tracer) *AgentTool
- type Registry
- type SubAgent
Constants ¶
View Source
const (
// MaxRecursionDepth is the maximum allowed recursion depth
MaxRecursionDepth = 5
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AgentTool ¶
type AgentTool struct {
// contains filtered or unexported fields
}
AgentTool wraps an agent to make it callable as a tool
func NewAgentTool ¶
NewAgentTool creates a new agent tool wrapper
func (*AgentTool) Description ¶
Description returns the description of what the tool does
func (*AgentTool) DisplayName ¶
DisplayName implements interfaces.ToolWithDisplayName.DisplayName
func (*AgentTool) Parameters ¶
func (at *AgentTool) Parameters() map[string]interfaces.ParameterSpec
Parameters returns the parameters that the tool accepts
func (*AgentTool) SetDescription ¶
SetDescription allows updating the tool description
func (*AgentTool) WithLogger ¶
WithLogger sets a custom logger for the agent tool
func (*AgentTool) WithTimeout ¶
WithTimeout sets a custom timeout for the agent tool
func (*AgentTool) WithTracer ¶
func (at *AgentTool) WithTracer(tracer interfaces.Tracer) *AgentTool
WithTracer sets a custom tracer for the agent tool
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry implements the ToolRegistry interface
func (*Registry) Get ¶
func (r *Registry) Get(name string) (interfaces.Tool, bool)
Get returns a tool by name
func (*Registry) List ¶
func (r *Registry) List() []interfaces.Tool
List returns all registered tools
func (*Registry) Register ¶
func (r *Registry) Register(tool interfaces.Tool)
Register registers a tool with the registry
Click to show internal directories.
Click to hide internal directories.