Documentation
¶
Index ¶
- func NewGeminiPlannerAgent(ctx context.Context, registry AgentRegistry, cfg GeminiPlannerConfig) (agent.Agent, error)
- type AgentRegistry
- type BashTool
- func (t *BashTool) FuncDecl() []*genai.Tool
- func (t *BashTool) HandleCall(ctx context.Context, fc *genai.FunctionCall, o agent.OutputHandler) error
- func (t *BashTool) HandleExecute(ctx context.Context, fc *genai.FunctionCall, approved bool, ...) error
- func (t *BashTool) Name() string
- func (t *BashTool) SystemPrompt() string
- type ContentGenerator
- type GeminiAgent
- type GeminiPlannerConfig
- type NoopTool
- func (t *NoopTool) FuncDecl() []*genai.Tool
- func (t *NoopTool) HandleCall(ctx context.Context, fc *genai.FunctionCall, o agent.OutputHandler) error
- func (t *NoopTool) HandleExecute(ctx context.Context, fc *genai.FunctionCall, approved bool, ...) error
- func (t *NoopTool) Name() string
- func (t *NoopTool) SystemPrompt() string
- type SkillsTool
- func (t *SkillsTool) FuncDecl() []*genai.Tool
- func (t *SkillsTool) HandleCall(ctx context.Context, fc *genai.FunctionCall, o agent.OutputHandler) error
- func (t *SkillsTool) HandleExecute(ctx context.Context, fc *genai.FunctionCall, approved bool, ...) error
- func (t *SkillsTool) Name() string
- func (t *SkillsTool) SystemPrompt() string
- type Tool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewGeminiPlannerAgent ¶
func NewGeminiPlannerAgent(ctx context.Context, registry AgentRegistry, cfg GeminiPlannerConfig) (agent.Agent, error)
NewGeminiPlannerAgent creates a new Gemini-based agent.
Types ¶
type AgentRegistry ¶
AgentRegistry defines the interface needed by the planner to discover agents.
type BashTool ¶
type BashTool struct{}
func (*BashTool) HandleCall ¶
func (t *BashTool) HandleCall(ctx context.Context, fc *genai.FunctionCall, o agent.OutputHandler) error
func (*BashTool) HandleExecute ¶
func (t *BashTool) HandleExecute(ctx context.Context, fc *genai.FunctionCall, approved bool, o agent.OutputHandler) error
func (*BashTool) SystemPrompt ¶
type ContentGenerator ¶
type ContentGenerator interface {
GenerateContent(ctx context.Context, model string, contents []*genai.Content, config *genai.GenerateContentConfig) (*genai.GenerateContentResponse, error)
}
ContentGenerator abstracts Gemini content generation for testing.
type GeminiAgent ¶
type GeminiAgent struct {
}
GeminiAgent implements task.Agent using Gemini.
func (*GeminiAgent) Close ¶
func (a *GeminiAgent) Close() error
func (*GeminiAgent) Connect ¶
func (a *GeminiAgent) Connect(ctx context.Context, conversationID string, execID string, start *proto.AgentStart, e agent.Executor, handler agent.OutputHandler) error
type GeminiPlannerConfig ¶
type GeminiPlannerConfig struct {
GeminiConfig *config.GeminiConfig
SkillsDir string // Directory for discovering skills (optional)
}
GeminiPlannerConfig configures the Gemini-based planner.
type NoopTool ¶
type NoopTool struct {
}
func (*NoopTool) HandleCall ¶
func (t *NoopTool) HandleCall(ctx context.Context, fc *genai.FunctionCall, o agent.OutputHandler) error
func (*NoopTool) HandleExecute ¶
func (t *NoopTool) HandleExecute(ctx context.Context, fc *genai.FunctionCall, approved bool, o agent.OutputHandler) error
func (*NoopTool) SystemPrompt ¶
type SkillsTool ¶
type SkillsTool struct {
// contains filtered or unexported fields
}
func (*SkillsTool) FuncDecl ¶
func (t *SkillsTool) FuncDecl() []*genai.Tool
func (*SkillsTool) HandleCall ¶
func (t *SkillsTool) HandleCall(ctx context.Context, fc *genai.FunctionCall, o agent.OutputHandler) error
func (*SkillsTool) HandleExecute ¶
func (t *SkillsTool) HandleExecute(ctx context.Context, fc *genai.FunctionCall, approved bool, o agent.OutputHandler) error
func (*SkillsTool) Name ¶
func (t *SkillsTool) Name() string
func (*SkillsTool) SystemPrompt ¶
func (t *SkillsTool) SystemPrompt() string
type Tool ¶
type Tool interface {
Name() string
FuncDecl() []*genai.Tool
SystemPrompt() string
HandleCall(ctx context.Context, fc *genai.FunctionCall, o agent.OutputHandler) error
HandleExecute(ctx context.Context, fc *genai.FunctionCall, approved bool, o agent.OutputHandler) error
}
func NewSkillsTool ¶
Click to show internal directories.
Click to hide internal directories.