Documentation
¶
Index ¶
- type Agent
- func (a *Agent) Equip(t ...tools.Tool)
- func (a *Agent) Execute(ctx context.Context, taskDesc, expectedOutput string, ctxTasks []string) (string, error)
- func (a *Agent) GetBackstory() string
- func (a *Agent) GetGoal() string
- func (a *Agent) GetMaxIter() int
- func (a *Agent) GetRole() string
- func (a *Agent) GetTools() []tools.Tool
- func (a *Agent) GetUsageMetrics() map[string]int
- type Config
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Agent ¶
Agent represents an AI agent with a role, goal, tools, and memory.
func (*Agent) Execute ¶
func (a *Agent) Execute(ctx context.Context, taskDesc, expectedOutput string, ctxTasks []string) (string, error)
Execute runs the agent's ReAct loop to complete a given task and returns the output.
func (*Agent) GetBackstory ¶
GetBackstory returns the agent's backstory.
func (*Agent) GetMaxIter ¶
GetMaxIter returns the maximum number of iterations for the agent's ReAct loop.
func (*Agent) GetUsageMetrics ¶
GetUsageMetrics returns the agent's token and tool usage metrics.
type Config ¶
type Config struct {
Role string
Goal string
Backstory string
LLM llm.Client
Tools []tools.Tool
Memory memory.Store
MaxIter int
MaxRPM int
MaxRetries int
MaxExecutionTime time.Duration
Verbose bool
AllowDelegation bool
StepCallback callback.Callback
}
Config defines the configuration for an Agent.
Click to show internal directories.
Click to hide internal directories.