Documentation
¶
Index ¶
- func Load(ctx context.Context, p string, runtimeConfig *config.RuntimeConfig, ...) (*team.Team, error)
- func LoadFrom(ctx context.Context, source AgentSource, runtimeConfig *config.RuntimeConfig, ...) (*team.Team, error)
- func LoadTeams(ctx context.Context, agentsPathOrDirectory string, ...) (map[string]*team.Team, error)
- func WithInstructions(inner tools.ToolSet, instruction string) tools.ToolSet
- func WithToolsFilter(inner tools.ToolSet, toolNames ...string) tools.ToolSet
- func WithToon(inner tools.ToolSet, toon string) tools.ToolSet
- type AgentSource
- type Opt
- type ToolsetCreator
- type ToolsetRegistry
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Load ¶
func Load(ctx context.Context, p string, runtimeConfig *config.RuntimeConfig, opts ...Opt) (*team.Team, error)
Load loads an agent team from the given file path. Prefers LoadFrom for more control over the source.
func LoadFrom ¶ added in v1.9.13
func LoadFrom(ctx context.Context, source AgentSource, runtimeConfig *config.RuntimeConfig, opts ...Opt) (*team.Team, error)
LoadFrom loads an agent team from the given source
func LoadTeams ¶
func LoadTeams(ctx context.Context, agentsPathOrDirectory string, runtimeConfig *config.RuntimeConfig) (map[string]*team.Team, error)
LoadTeams loads all agent teams from the given directory or file path
func WithInstructions ¶ added in v1.6.3
func WithToolsFilter ¶ added in v1.8.0
Types ¶
type AgentSource ¶ added in v1.9.13
func NewBytesSource ¶ added in v1.9.13
func NewBytesSource(workingDir string, data []byte) AgentSource
func NewFileSource ¶ added in v1.9.13
func NewFileSource(path string) AgentSource
type Opt ¶ added in v1.8.0
type Opt func(*loadOptions) error
func WithModelOverrides ¶ added in v1.8.0
func WithToolsetRegistry ¶ added in v1.9.0
func WithToolsetRegistry(registry *ToolsetRegistry) Opt
WithToolsetRegistry allows using a custom toolset registry instead of the default
type ToolsetCreator ¶ added in v1.9.0
type ToolsetCreator func(ctx context.Context, toolset latest.Toolset, parentDir string, runtimeConfig *config.RuntimeConfig) (tools.ToolSet, error)
ToolsetCreator is a function that creates a toolset based on the provided configuration
type ToolsetRegistry ¶ added in v1.9.0
type ToolsetRegistry struct {
// contains filtered or unexported fields
}
ToolsetRegistry manages the registration of toolset creators by type
func NewDefaultToolsetRegistry ¶ added in v1.9.0
func NewDefaultToolsetRegistry() *ToolsetRegistry
func NewToolsetRegistry ¶ added in v1.9.0
func NewToolsetRegistry() *ToolsetRegistry
NewToolsetRegistry creates a new empty toolset registry
func (*ToolsetRegistry) CreateTool ¶ added in v1.9.0
func (r *ToolsetRegistry) CreateTool(ctx context.Context, toolset latest.Toolset, parentDir string, runtimeConfig *config.RuntimeConfig) (tools.ToolSet, error)
CreateTool creates a toolset using the registered creator for the given type
func (*ToolsetRegistry) Get ¶ added in v1.9.0
func (r *ToolsetRegistry) Get(toolsetType string) (ToolsetCreator, bool)
Get retrieves a toolset creator for the given type
func (*ToolsetRegistry) Register ¶ added in v1.9.0
func (r *ToolsetRegistry) Register(toolsetType string, creator ToolsetCreator)
Register adds a new toolset creator for the given type