llmagent

package
v0.0.16 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ResolveProvider

func ResolveProvider(providerName string) (fantasy.Provider, error)

func ToolsFromMcpClients

func ToolsFromMcpClients(clients []McpClient, interceptor toolInterceptor) []fantasy.AgentTool

ToolsFromMcpClients adapts all of the tools available in the mcp clients to fantasy.AgentTool

Types

type AcpAgent

type AcpAgent interface {
	RunACP(ctx context.Context, in io.Reader, out io.Writer) error
}

func New

func New(ctx context.Context, cfg Config) (AcpAgent, error)

type Config

type Config struct {
	// Model specifies the provider and model in "provider:model-id" format
	// Supported providers: openai, anthropic, gemini
	// Example: "openai:gpt-5", "gemini:gemini-3-pro"
	Model string

	// SystemPrompt contains optional system instructions for the agent
	SystemPrompt string
}

func (*Config) ParseModel

func (cfg *Config) ParseModel() (provider, modelID string, err error)

type McpClient

type McpClient interface {
	GetTools() []mcpsdk.Tool
	CallTool(ctx context.Context, name string, arguments map[string]any) (string, error)
	Close() error
}

func NewMcpClient

func NewMcpClient(ctx context.Context, serverURL string, headers http.Header) (McpClient, error)

Jump to

Keyboard shortcuts

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