commands

package
v1.0.0-alpha.12 Latest Latest
Warning

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

Go to latest
Published: May 11, 2026 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AgentConfig

type AgentConfig struct {
	Root string `help:"Agent root directory (FHS layout)" default:"."`

	Model         string `help:"Model identifier (e.g. anthropic/claude-sonnet-4-20250514)" optional:""`
	Name          string `help:"Agent name" default:"agent"`
	MaxTokens     int    `help:"Max output tokens" default:"4096"`
	MaxIterations int    `help:"Max tool iterations per turn" default:"20"`

	APIKey  string `help:"API key for the provider" optional:""`
	APIBase string `help:"Custom API base URL for the provider" optional:""`
	Addr    string `help:"gRPC listen address" default:":8080"`

	Tools     []ToolConfig      `help:"Tool configurations" yaml:"tools,omitempty" json:"tools,omitempty"`
	Neighbors []NeighborConfig  `help:"Neighbor agent configurations" yaml:"neighbors,omitempty" json:"neighbors,omitempty"`
	Memory    MemoryServeConfig `embed:"" prefix:"memory-"`
}

type MemoryServeConfig

type MemoryServeConfig struct {
	Strategy    string `json:"strategy,omitempty" yaml:"strategy,omitempty" help:"Compaction strategy (sliding or summarize)" default:"summarize"`
	MaxMessages int    `json:"max_messages,omitempty" yaml:"max_messages,omitempty" help:"Max messages before compaction" default:"20"`
	MaxTokens   int    `json:"max_tokens,omitempty" yaml:"max_tokens,omitempty" help:"Max estimated tokens before compaction" default:"0"`
}

type NeighborConfig

type NeighborConfig struct {
	Name  string `json:"name" yaml:"name"`
	URL   string `json:"url" yaml:"url"`
	WSUrl string `json:"ws_url,omitempty" yaml:"ws_url,omitempty"`
	Token string `json:"token,omitempty" yaml:"token,omitempty"`
}

type Prompt

type Prompt struct {
	AgentConfig `embed:""`
	Message     string `arg:"" help:"Message to send to the agent"`
}

func (*Prompt) Run

func (p *Prompt) Run(
	ctx context.Context,
	common *cmd.Commons,
	sqlite *cmd.SQLite,
) error

type Serve

type Serve struct {
	AgentConfig `embed:""`
}

func (*Serve) Run

func (s *Serve) Run(
	ctx context.Context,
	common *cmd.Commons,
	sqlite *cmd.SQLite,
) error

type ToolConfig

type ToolConfig struct {
	Name        string   `json:"name" yaml:"name"`
	Description string   `json:"description" yaml:"description"`
	Binary      string   `json:"binary" yaml:"binary"`
	Args        []string `json:"args,omitempty" yaml:"args,omitempty"`
	Docs        ToolDocs `json:"docs,omitempty" yaml:"docs,omitempty"`
}

type ToolDocs

type ToolDocs struct {
	Usage string `json:"usage,omitempty" yaml:"usage,omitempty"`
}

ToolDocs are documentation artefacts the executor materialised alongside the BIN binary (sourced from the image's vnd.openotters.bin.* annotations). Each field is a path the loader reads when assembling the model-facing tool description: relative paths resolve against the agent's root, absolute paths are used verbatim. Empty fields mean "BIN ships no doc of that kind."

Jump to

Keyboard shortcuts

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