agent

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package agent manages AI agent processes

Index

Constants

This section is empty.

Variables

View Source
var EmbeddedRules string

Functions

This section is empty.

Types

type Agent

type Agent struct {
	Name        string
	Role        string
	WorkDir     string
	ClaudeMDDir string
	// contains filtered or unexported fields
}

Agent represents an AI agent with a specific persona

func New

func New(cfg Config) *Agent

New creates a new agent

func (*Agent) CallTool

func (a *Agent) CallTool(name string, args map[string]interface{}) (string, error)

CallTool calls a specific tool on the agent

func (*Agent) SendTask

func (a *Agent) SendTask(prompt string) (string, error)

SendTask sends a task to the agent

func (*Agent) Start

func (a *Agent) Start() error

Start launches the Claude Code process

func (*Agent) Stop

func (a *Agent) Stop() error

Stop terminates the agent process

type Agents

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

Agents provides pre-configured runners for each team member

func NewAgents

func NewAgents(workDir string) *Agents

NewAgents creates the agent team with project-local priority Priority: project/.maxam/agents/ > ~/.maxam/agents/

func (*Agents) Amara

func (a *Agents) Amara() *Runner

Amara returns the analysis agent

func (*Agents) Get

func (a *Agents) Get(name string) (*Runner, bool)

Get returns a runner by name

func (*Agents) Mei

func (a *Agents) Mei() *Runner

Mei returns the PM agent

func (*Agents) Priya

func (a *Agents) Priya() *Runner

Priya returns the review agent

func (*Agents) Rin

func (a *Agents) Rin() *Runner

Rin returns the frontend agent

func (*Agents) Shiori

func (a *Agents) Shiori() *Runner

Shiori returns the test/docs agent

func (*Agents) Yuki

func (a *Agents) Yuki() *Runner

Yuki returns the implementation agent

type Config

type Config struct {
	Name        string
	Role        string
	WorkDir     string
	ClaudeMDDir string
}

Config holds agent configuration

type Model added in v0.3.0

type Model string

Model represents the Claude model to use

const (
	ModelDefault Model = ""       // Use claude's default
	ModelHaiku   Model = "haiku"  // Fast, lightweight
	ModelSonnet  Model = "sonnet" // Balanced
	ModelOpus    Model = "opus"   // Most capable
)

type Runner

type Runner struct {
	Name        string
	WorkDir     string
	ClaudeMDDir string
	Timeout     time.Duration
	ContextMode config.ContextMode
	Model       Model // Model to use for this agent
}

Runner executes Claude Code with agent persona

func NewRunner

func NewRunner(name, workDir, claudeMDDir string) *Runner

NewRunner creates a new agent runner

func (*Runner) Run

func (r *Runner) Run(ctx context.Context, prompt string) (string, error)

Run executes a task with the agent

func (*Runner) RunWithAllowedTools

func (r *Runner) RunWithAllowedTools(ctx context.Context, prompt string, tools []string) (string, error)

RunWithAllowedTools executes with specific tools enabled

func (*Runner) RunWithModel added in v0.3.0

func (r *Runner) RunWithModel(ctx context.Context, prompt string, model Model) (string, error)

RunWithModel executes a task with a specific model

Jump to

Keyboard shortcuts

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