Documentation
¶
Overview ¶
Package agent loads agent definitions, catalogs, and built-in agent behavior.
Index ¶
Constants ¶
View Source
const DefaultID = "builder"
Variables ¶
View Source
var ( ErrAgentIDRequired = errors.New("agent id is required") ErrAgentModeInvalid = errors.New("agent mode is invalid") ErrAgentFallbackModelsUnsupported = errors.New("agent fallback models are not supported") )
View Source
var ErrAgentNotFound = errors.New("agent not found")
Functions ¶
func BuiltinAgentFS ¶
Types ¶
type Catalog ¶
type Catalog struct {
// contains filtered or unexported fields
}
func NewBuiltinsCatalog ¶
func (*Catalog) List ¶
func (c *Catalog) List() []Definition
type Definition ¶
type Definition struct {
ID string
Description string
Prompt string
ModelRoute provider.ModelRoute
Mode Mode
Hidden bool
AllowedTools []string
DisallowedTools []string
Handoff HandoffContract
}
func (Definition) AllowsTool ¶
func (d Definition) AllowsTool(name string) bool
func (Definition) Delegatable ¶
func (d Definition) Delegatable() bool
func (Definition) EffectiveMode ¶
func (d Definition) EffectiveMode() Mode
func (Definition) HasPrompt ¶
func (d Definition) HasPrompt() bool
func (Definition) PromptFragment ¶
func (d Definition) PromptFragment() prompt.Fragment
func (Definition) Selectable ¶
func (d Definition) Selectable() bool
func (Definition) Validate ¶
func (d Definition) Validate() error
type HandoffConsume ¶
type HandoffContract ¶
type HandoffContract struct {
Provides []HandoffProvide
Consumes []HandoffConsume
}
type HandoffProvide ¶
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
func NewRegistry ¶
func NewRegistry(config RegistryConfig) (*Registry, error)
type RegistryConfig ¶
type RegistryConfig struct {
GlobalDir string
}
Click to show internal directories.
Click to hide internal directories.