agent

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: May 16, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Agent

type Agent struct {
	// contains filtered or unexported fields
}

Agent represents an MCP agent

func New

func New(cfg AgentConfig, logger *common.Logger) *Agent

New creates a new agent instance

func (*Agent) Run

func (a *Agent) Run(ctx context.Context, userInput chan string, agentOutput chan string) error

Run executes the agent

func (*Agent) Validate

func (a *Agent) Validate() error

Validate checks if the configuration is valid

type AgentConfig

type AgentConfig struct {
	ConfigFile   string
	Model        string
	SystemPrompt string
	UserPrompt   string
	OpenAIApiKey string
	OpenAIApiURL string
	Once         bool
	Version      string
}

AgentConfig holds the configuration for the agent

Jump to

Keyboard shortcuts

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