gemini

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 20, 2026 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

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

type AgentRegistry interface {
	List() []string
	GetInfo(id string) (*agent.AgentInfo, error)
}

AgentRegistry defines the interface needed by the planner to discover agents.

type BashTool

type BashTool struct{}

func (*BashTool) FuncDecl

func (t *BashTool) FuncDecl() []*genai.Tool

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) Name

func (t *BashTool) Name() string

func (*BashTool) SystemPrompt

func (t *BashTool) SystemPrompt() string

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 NewGeminiAgent

func NewGeminiAgent() *GeminiAgent

NewGeminiAgent creates a new Gemini agent.

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) FuncDecl

func (t *NoopTool) FuncDecl() []*genai.Tool

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) Name

func (t *NoopTool) Name() string

func (*NoopTool) SystemPrompt

func (t *NoopTool) SystemPrompt() string

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

func NewSkillsTool(dir string) (Tool, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL