agent

package
v0.2.7 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2026 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Agent

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

func New

func New(opts Options) (*Agent, error)

func (*Agent) Process

func (a *Agent) Process(ctx context.Context, input string) (string, error)

type Loop

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

func NewLoop

func NewLoop(opts LoopOptions) (*Loop, error)

func (*Loop) ProcessDirect

func (l *Loop) ProcessDirect(ctx context.Context, content, sessionKey, channel, chatID string) (string, error)

func (*Loop) Run

func (l *Loop) Run(ctx context.Context) error

func (*Loop) SetSpawn

func (l *Loop) SetSpawn(fn func(ctx context.Context, task, label, originChannel, originChatID string) (string, error))

type LoopOptions

type LoopOptions struct {
	Config       *config.Config
	WorkspaceDir string
	Model        string
	MaxIters     int
	Bus          *bus.Bus
	Sessions     *session.Manager
	Skills       *skills.Loader
	Cron         *cron.Service
	Spawn        func(ctx context.Context, task, label, originChannel, originChatID string) (string, error)
	Verbose      bool
}

type Options

type Options struct {
	Config       *config.Config
	WorkspaceDir string
	SessionKey   string
	MaxIters     int
	Verbose      bool
}

type SubagentManager

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

func NewSubagentManager

func NewSubagentManager(loop *Loop) *SubagentManager

func (*SubagentManager) Spawn

func (m *SubagentManager) Spawn(ctx context.Context, task, label, originChannel, originChatID string) (string, error)

Jump to

Keyboard shortcuts

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