Versions in this module Expand all Collapse all v0 v0.1.0 Dec 14, 2025 Changes in this version + var ErrCommandNotFound = errors.New("command not found") + var ErrNotACommand = errors.New("input is not a slash command") + func ParseCommandInput(input string) (cmdName, arguments string) + type Agent struct + Content string + Description string + FilePath string + Name string + Tools []string + func ParseAgent(path string) (*Agent, error) + func (a *Agent) FilterTools(tools []llm.Tool) []llm.Tool + func (a *Agent) NewRunner(opts ...AgentOption) *AgentRunner + func (a *Agent) ToOption() llm.Option + func (a *Agent) ToSystemMessage() string + type AgentContext struct + func NewAgentContext() *AgentContext + func (c *AgentContext) AddMessage(msg llm.Message) + func (c *AgentContext) AddMessages(msgs ...llm.Message) + func (c *AgentContext) Clear() + func (c *AgentContext) ClearHistory() + func (c *AgentContext) ClearState() + func (c *AgentContext) Clone() *AgentContext + func (c *AgentContext) DeleteState(key string) + func (c *AgentContext) GetState(key string) (any, bool) + func (c *AgentContext) HasState(key string) bool + func (c *AgentContext) History() []llm.Message + func (c *AgentContext) HistoryLen() int + func (c *AgentContext) LastMessage() *llm.Message + func (c *AgentContext) LastNMessages(n int) []llm.Message + func (c *AgentContext) NewChildContext() *AgentContext + func (c *AgentContext) Parent() *AgentContext + func (c *AgentContext) SetParent(parent *AgentContext) + func (c *AgentContext) SetState(key string, value any) + func (c *AgentContext) StateKeys() []string + type AgentIndex struct + Description string + Name string + Tools []string + type AgentOption func(*AgentRunner) + func WithAgentContext(ctx *AgentContext) AgentOption + func WithAgentLLMOptions(opts ...llm.Option) AgentOption + func WithAgentMaxTokens(n int) AgentOption + func WithAgentModel(model string) AgentOption + func WithAgentProvider(name string) AgentOption + func WithAgentTemperature(t float64) AgentOption + func WithAgentTools(tools ...llm.Tool) AgentOption + type AgentRunner struct + func (r *AgentRunner) Agent() *Agent + func (r *AgentRunner) ClearContext() + func (r *AgentRunner) ClearHistory() + func (r *AgentRunner) Context() *AgentContext + func (r *AgentRunner) FilteredTools() []llm.Tool + func (r *AgentRunner) Run(ctx context.Context, task string, runOpts ...RunOption) (llm.Response[string], error) + func (r *AgentRunner) RunWithMessages(ctx context.Context, messages []llm.Message, runOpts ...RunOption) (llm.Response[string], error) + type Author struct + Email string + Name string + URL string + type Command struct + Content string + Description string + FilePath string + Name string + func ParseCommand(path string) (*Command, error) + func (c *Command) ToOption() llm.Option + func (c *Command) ToOptionWithArgs(arguments string) llm.Option + func (c *Command) ToSystemMessage() string + type CommandIndex struct + Description string + Name string + type ExpandedCommand struct + Arguments string + Command *Command + SystemMessage string + UserMessage string + func (e *ExpandedCommand) ToOption() llm.Option + type MCPServerConfig struct + Args []string + Command string + Env map[string]string + type Plugin struct + Agents []Agent + Author Author + Commands []Command + Description string + MCPServers map[string]MCPServerConfig + Name string + RootPath string + Skills []Skill + Version string + func Load(path string) (*Plugin, error) + func (p *Plugin) AgentsIndex() []AgentIndex + func (p *Plugin) AgentsIndexSystemMessage() string + func (p *Plugin) AgentsSystemMessage() string + func (p *Plugin) CommandsIndex() []CommandIndex + func (p *Plugin) CommandsIndexSystemMessage() string + func (p *Plugin) CommandsSystemMessage() string + func (p *Plugin) ExpandCommand(input string) (*ExpandedCommand, error) + func (p *Plugin) GetAgent(name string) *Agent + func (p *Plugin) GetCommand(name string) *Command + func (p *Plugin) GetSkill(name string) *Skill + func (p *Plugin) HasAgent(name string) bool + func (p *Plugin) HasCommand(name string) bool + func (p *Plugin) HasSkill(name string) bool + func (p *Plugin) IsCommand(input string) bool + func (p *Plugin) PluginIndexSystemMessage() string + func (p *Plugin) ProcessInput(input string) (opt llm.Option, userMessage string, err error) + func (p *Plugin) SkillsIndex() []SkillIndex + func (p *Plugin) SkillsIndexSystemMessage() string + func (p *Plugin) SkillsSystemMessage() string + func (p *Plugin) ToSystemMessage() string + type RunOption func(*runConfig) + func WithRunLLMOptions(opts ...llm.Option) RunOption + func WithRunSystemMessage(msg string) RunOption + type Skill struct + Content string + Description string + FilePath string + Name string + Tools []string + func ParseSkill(dirPath string) (*Skill, error) + func (s *Skill) FilterTools(tools []llm.Tool) []llm.Tool + func (s *Skill) HasRequiredTools(tools []llm.Tool) bool + func (s *Skill) MissingTools(tools []llm.Tool) []string + func (s *Skill) ToOption() llm.Option + func (s *Skill) ToSystemMessage() string + type SkillIndex struct + Description string + Name string