Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithMaxRetries ¶
func WithMaxRetries(max int) opt
WithMaxRetries sets the maximum number of retries for tool execution.
func WithPersistenceManager ¶
func WithPersistenceManager(pm *persistence.PersistenceManager) opt
WithPersistenceManager sets the persistence manager for the agent.
func WithSkills ¶
WithSkills sets the skills available to the agent.
Types ¶
type Agent ¶
type Agent struct {
// contains filtered or unexported fields
}
Agent orchestrates multi-step reasoning with tool calling and memory.
type AgentStrings ¶
type AgentStrings struct {
IntroPrompt string
AvailableSkillsHeader string
UseSkillsHint string
AvailableToolsHeader string
ToolCallInstructions string
MultipleToolCallsHint string
PreferSkillsHint string
UserRequestHeader string
ToolExecutionResultsHeader string
ToolHeader string
InputLabel string
ErrorLabel string
OutputLabel string
FinalResponsePrompt string
ReplanPrompt string
}
AgentStrings contains all localizable strings for the agent package
func ChineseStrings ¶
func ChineseStrings() AgentStrings
ChineseStrings returns Chinese language strings
func EnglishStrings ¶
func EnglishStrings() AgentStrings
EnglishStrings returns English language strings
func GetStrings ¶
func GetStrings(locale string) AgentStrings
GetStrings returns the appropriate strings based on locale
type Tool ¶
type Tool interface {
// Name returns the unique identifier for this tool.
Name() string
// Description returns a human-readable explanation of what this tool does.
Description() string
// Execute runs the tool with the given input and returns the result.
Execute(ctx context.Context, input json.RawMessage) (json.RawMessage, error)
}
Tool represents an action that an agent can invoke.
Click to show internal directories.
Click to hide internal directories.