agent

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AgentWrapper

type AgentWrapper struct {
	*BaseAgent
	ADKAgent agent.Agent
}

AgentWrapper wraps common agent initialization patterns

func NewAgentWrapper

func NewAgentWrapper(base *BaseAgent, adkAgent agent.Agent) *AgentWrapper

NewAgentWrapper creates a wrapper with both base functionality and ADK agent

type BaseAgent

type BaseAgent struct {
	Cfg          *config.Config
	Client       *http.Client
	Model        model.LLM
	ModelFactory *llm.ModelFactory
}

BaseAgent provides common functionality for all agents

func NewBaseAgent

func NewBaseAgent(cfg *config.Config, timeoutSec int) (*BaseAgent, error)

NewBaseAgent creates a new base agent with LLM initialization

func (*BaseAgent) FetchURL

func (ba *BaseAgent) FetchURL(ctx context.Context, url string, maxSizeMB int) (string, error)

FetchURL fetches content from a URL with proper error handling

func (*BaseAgent) GetProviderInfo

func (ba *BaseAgent) GetProviderInfo() string

GetProviderInfo returns information about the LLM provider

func (*BaseAgent) LogError

func (ba *BaseAgent) LogError(agentName, format string, args ...interface{})

LogError logs an error message with agent context

func (*BaseAgent) LogInfo

func (ba *BaseAgent) LogInfo(agentName, format string, args ...interface{})

LogInfo logs an informational message with agent context

Jump to

Keyboard shortcuts

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