Documentation
¶
Index ¶
- func Load(ctx context.Context, agentSource config.Source, ...) (*team.Team, error)
- func WithInstructions(inner tools.ToolSet, instruction string) tools.ToolSet
- func WithToolsExcludeFilter(inner tools.ToolSet, toolNames ...string) tools.ToolSet
- func WithToolsFilter(inner tools.ToolSet, toolNames ...string) tools.ToolSet
- func WithToon(inner tools.ToolSet, toon string) tools.ToolSet
- type LoadResult
- type Opt
- type ToolsetCreator
- type ToolsetRegistry
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Load ¶
func Load(ctx context.Context, agentSource config.Source, runConfig *config.RuntimeConfig, opts ...Opt) (*team.Team, error)
Load loads an agent team from the given source
func WithInstructions ¶
func WithToolsExcludeFilter ¶
WithToolsExcludeFilter creates a toolset that excludes the specified tools. If no tool names are provided, all tools are included.
func WithToolsFilter ¶
WithToolsFilter creates a toolset that only includes the specified tools. If no tool names are provided, all tools are included.
Types ¶
type LoadResult ¶
type LoadResult struct {
Team *team.Team
Models map[string]latest.ModelConfig
Providers map[string]latest.ProviderConfig
// AgentDefaultModels maps agent names to their configured default model references
AgentDefaultModels map[string]string
}
LoadResult contains the result of loading an agent team, including the team and configuration needed for runtime model switching.
func LoadWithConfig ¶
func LoadWithConfig(ctx context.Context, agentSource config.Source, runConfig *config.RuntimeConfig, opts ...Opt) (*LoadResult, error)
LoadWithConfig loads an agent team and returns both the team and config info needed for runtime model switching.
type Opt ¶
type Opt func(*loadOptions) error
func WithModelOverrides ¶
func WithPromptFiles ¶
WithPromptFiles adds additional prompt files to all agents. These are merged with any prompt files defined in the agent config.
func WithToolsetRegistry ¶
func WithToolsetRegistry(registry *ToolsetRegistry) Opt
WithToolsetRegistry allows using a custom toolset registry instead of the default
type ToolsetCreator ¶
type ToolsetCreator func(ctx context.Context, toolset latest.Toolset, parentDir string, runConfig *config.RuntimeConfig, configName string) (tools.ToolSet, error)
ToolsetCreator is a function that creates a toolset based on the provided configuration. configName identifies the agent config file (e.g. "memory_agent" from "memory_agent.yaml").
type ToolsetRegistry ¶
type ToolsetRegistry struct {
// contains filtered or unexported fields
}
ToolsetRegistry manages the registration of toolset creators by type
func NewDefaultToolsetRegistry ¶
func NewDefaultToolsetRegistry() *ToolsetRegistry
func NewToolsetRegistry ¶
func NewToolsetRegistry() *ToolsetRegistry
NewToolsetRegistry creates a new empty toolset registry
func (*ToolsetRegistry) CreateTool ¶
func (r *ToolsetRegistry) CreateTool(ctx context.Context, toolset latest.Toolset, parentDir string, runConfig *config.RuntimeConfig, agentName string) (tools.ToolSet, error)
CreateTool creates a toolset using the registered creator for the given type
func (*ToolsetRegistry) Get ¶
func (r *ToolsetRegistry) Get(toolsetType string) (ToolsetCreator, bool)
Get retrieves a toolset creator for the given type
func (*ToolsetRegistry) Register ¶
func (r *ToolsetRegistry) Register(toolsetType string, creator ToolsetCreator)
Register adds a new toolset creator for the given type