Versions in this module Expand all Collapse all v1 v1.1.0 Apr 1, 2026 Changes in this version + var ErrEmptySkillID = errors.New("agent: execution plan has empty skill ID") + var ErrNilPlan = errors.New("agent: execution plan is nil") + var ErrNoSkillsAvailable = errors.New("agent: no skills available for planning") + var ErrPlanningFailed = errors.New("agent: planning failed") + type Agent interface + HandleMessage func(ctx context.Context, req MessageRequest) (*MessageResponse, error) + type DefaultAgent struct + func NewDefaultAgent(planner Planner, executor PlanExecutor, registry SkillRegistry, ...) *DefaultAgent + func (a *DefaultAgent) HandleMessage(ctx context.Context, req MessageRequest) (*MessageResponse, error) + type ExecutionMeta struct + AssistantID string + RequestID string + SessionID string + TenantID string + UserID string + type ExecutionPlan struct + Arguments map[string]any + Reasoning string + SkillID string + func (p *ExecutionPlan) ArgumentsJSON() ([]byte, error) + func (p *ExecutionPlan) Validate() error + type LLMPlanner struct + func NewLLMPlanner(router providers.ModelRouter) *LLMPlanner + func (p *LLMPlanner) Plan(ctx context.Context, runtime *assistant.AssistantRuntime, req PlanRequest) (*ExecutionPlan, error) + type Message struct + Content string + Role string + type MessageRequest struct + Message string + SessionID string + TenantID string + UserID string + type MessageResponse struct + Message string + Plan *ExecutionPlan + SessionID string + SkillUsed string + type MockLLMClient struct + DefaultResponse string + ForcedError error + Responses map[string]string + func NewMockLLMClient() *MockLLMClient + func (c *MockLLMClient) Generate(ctx context.Context, prompt string) (string, error) + type MockPlanner struct + DefaultSkillID string + ForcedError error + ForcedPlan *ExecutionPlan + func NewMockPlanner(defaultSkillID string) *MockPlanner + func (p *MockPlanner) Plan(ctx context.Context, runtime *assistant.AssistantRuntime, req PlanRequest) (*ExecutionPlan, error) + type PlanExecutor interface + ExecuteFromPlan func(ctx context.Context, plan *ExecutionPlan, meta ExecutionMeta) (*execution.ExecutionResult, error) + type PlanRequest struct + AvailableSkills []SkillDescriptor + ConversationHistory []Message + UserMessage string + type Planner interface + Plan func(ctx context.Context, runtime *assistant.AssistantRuntime, req PlanRequest) (*ExecutionPlan, error) + type SkillDescriptor struct + Description string + ID string + InputSchema *control_skills.JSONSchema + Name string + func SkillDescriptorFromSkill(s skills.Skill) SkillDescriptor + type SkillRegistry interface + Get func(id string) (skills.Skill, error) + List func() []string