claw

package
v0.11.7 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2026 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Unframe added in v0.9.4

func Unframe(text string) string

Unframe strips the envelope frameMessage added, for display purposes.

Types

type Claw

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

func New

func New(config *Config) *Claw

func (*Claw) AgentDir

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

func (*Claw) AgentState added in v0.9.1

func (c *Claw) AgentState(name string) ([]agent.Message, agent.Usage, bool)

func (*Claw) Close added in v0.9.1

func (c *Claw) Close()

func (*Claw) CreateAgent

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

func (*Claw) DeleteAgent

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

func (*Claw) Init

func (c *Claw) Init() error

func (*Claw) ListAgents

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

func (*Claw) Run

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

func (*Claw) Send added in v0.9.4

func (c *Claw) Send(ctx context.Context, msg channel.Message) iter.Seq2[agent.Message, error]

Send routes a message to its target agent and returns the turn stream. It frames the message, serializes the run, and persists the session when the stream ends. Returns nil if the agent does not exist.

type Config

type Config struct {
	AssistantName string

	AgentConfig *agent.Config

	MCP *mcp.Manager

	Tools        []tool.Tool
	Instructions string

	Memory   *memory.Store
	Channels []channel.Channel

	// Authorize gates inbound messages; nil allows everything.
	Authorize func(msg channel.Message) bool
}

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