claw

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: May 3, 2026 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Claw

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

Claw is the main orchestrator — the Go equivalent of nanoclaw's index.ts. It connects channels to explicitly registered agents.

func New

func New(config *Config) *Claw

func (*Claw) AgentDir

func (c *Claw) AgentDir(name string) string

AgentDir returns the directory for an agent.

func (*Claw) CreateAgent

func (c *Claw) CreateAgent(name string) error

CreateAgent registers a new agent by creating its directory structure and loading it. Returns an error if the agent already exists.

func (*Claw) DeleteAgent

func (c *Claw) DeleteAgent(name string) error

DeleteAgent removes a registered agent and its data.

func (*Claw) GetAgent

func (c *Claw) GetAgent(name string) *agent.Agent

GetAgent returns a loaded agent by name.

func (*Claw) Init

func (c *Claw) Init() error

Init loads all registered agents from the memory store. Must be called before Run.

func (*Claw) ListAgents

func (c *Claw) ListAgents() ([]string, error)

ListAgents returns the names of all registered agents.

func (*Claw) Run

func (c *Claw) Run(ctx context.Context) error

Run starts schedulers and all channels, blocking until ctx is cancelled.

type Config

type Config struct {
	AssistantName string

	AgentConfig *agent.Config

	MCP *mcp.Manager

	Tools        []tool.Tool
	Instructions string

	Memory   *memory.Store
	Channels []channel.Channel
}

func DefaultConfig

func DefaultConfig() (*Config, func(), error)

Directories

Path Synopsis
cli
tool

Jump to

Keyboard shortcuts

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