agent

package
v0.0.0-...-91534d0 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2026 License: GPL-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LLM_OPENAI    = "OpenAI"
	LLM_ANTHROPIC = "Anthropic"
	LLM_OLLAMA    = "Ollama"
)

Variables

This section is empty.

Functions

func Close

func Close(tileId string)

func New

func New(renderer types.Renderer, tile types.Tile)

func ToolsAdd

func ToolsAdd(t aitypes.Tool)

Types

type Agent

type Agent struct {
	Meta *aitypes.Meta
	// contains filtered or unexported fields
}

func Get

func Get(tileId string) *Agent

func TryGet

func TryGet(tileId string) (*Agent, bool)

func (*Agent) ChooseTools

func (agent *Agent) ChooseTools(cancel types.MenuCallbackT)

func (*Agent) CurrentModelLabel

func (agent *Agent) CurrentModelLabel() string

func (*Agent) GetMeta

func (agt *Agent) GetMeta() *aitypes.Meta

func (*Agent) IsWorkspaceActive

func (agt *Agent) IsWorkspaceActive() bool

func (*Agent) ListModels

func (agent *Agent) ListModels() ([]ServiceModelIndexT, []string)

func (*Agent) ListModelsInputVariable

func (agent *Agent) ListModelsInputVariable() types.InputBoxWTVariables

ListModelsInputVariable returns a pre-configured InputBox variable definition that can be used directly in InputBoxWT options.

func (*Agent) MaxIterations

func (agt *Agent) MaxIterations() int

func (*Agent) McpMenu

func (agent *Agent) McpMenu(cancel types.MenuCallbackT)

func (*Agent) McpServerAdd

func (agt *Agent) McpServerAdd(server string, client client)

func (*Agent) McpServerExists

func (agt *Agent) McpServerExists(server string) bool

func (*Agent) ModelName

func (agent *Agent) ModelName() string

func (*Agent) Reload

func (agt *Agent) Reload()

func (*Agent) Renderer

func (agt *Agent) Renderer() types.Renderer

func (*Agent) RunLLMWithMessageStream

func (agent *Agent) RunLLMWithMessageStream(ctx context.Context, messages []*schema.Message, streamCallback func(string)) (result string, err error)

RunLLMWithMessageStream calls the configured runtime with structured messages and streams text chunks.

func (*Agent) RunLLMWithStream

func (agent *Agent) RunLLMWithStream(ctx context.Context, prompt string, streamCallback func(string)) (result string, err error)

RunLLMWithStream calls the configured runtime and streams text chunks. Use ai package helpers to construct provider-appropriate prompts.

func (*Agent) SelectServiceModel

func (agent *Agent) SelectServiceModel(returnFn func())

func (*Agent) ServiceName

func (agent *Agent) ServiceName() string

func (*Agent) SetServiceModelFromSelection

func (agent *Agent) SetServiceModelFromSelection(selection string) error

SetServiceModelFromSelection sets the active service/model from a list label formatted as "<Service>: <Model>".

func (*Agent) StartServersFromConfig

func (agent *Agent) StartServersFromConfig(config *mcp_config.ConfigT) error

func (*Agent) StartServersFromJson

func (agent *Agent) StartServersFromJson(filename string) error

func (*Agent) StartTools

func (agent *Agent) StartTools(tools []*skills.ToolsT) error

func (*Agent) SwitchServiceModel

func (agent *Agent) SwitchServiceModel(modelXRef []ServiceModelIndexT, i int)

func (*Agent) Term

func (agt *Agent) Term() types.Term

func (*Agent) ToolsAdd

func (agent *Agent) ToolsAdd(t aitypes.Tool) error

func (*Agent) Workspace

func (agt *Agent) Workspace() string

type ServiceModelIndexT

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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