Documentation
¶
Overview ¶
Package controller implements the single-writer orchestrator that coordinates agentic loops, manages executions, and communicates with local and remote agents.
Index ¶
- type Config
- type Controller
- func (d *Controller) Close() error
- func (d *Controller) Delete(ctx context.Context, conversationID string) error
- func (d *Controller) Exec(ctx context.Context, req *proto.ExecRequest, handler ExecHandler) error
- func (d *Controller) Fork(ctx context.Context, srcConversationID string, srcSeq int32, ...) (string, error)
- func (d *Controller) Registry() *Registry
- type ExecHandler
- type PlannerBuilder
- type Registry
- func (r *Registry) Close() error
- func (r *Registry) Get(id string) (agent.Agent, error)
- func (r *Registry) GetInfo(id string) (*agent.AgentInfo, error)
- func (r *Registry) List() []string
- func (r *Registry) Map() map[string]agent.Agent
- func (r *Registry) RegisterATE(ctx context.Context, ateTarget string, cfg config.SubstrateAgentConfig) error
- func (r *Registry) RegisterColab(cfg config.ColabAgentConfig) error
- func (r *Registry) RegisterLocal(cfg config.LocalAgentConfig) error
- func (r *Registry) RegisterRemote(ctx context.Context, cfg config.RemoteAgentConfig) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
EventLogBuilder executor.EventLogBuilder
PlannerBuilder PlannerBuilder
}
Config configures the controller.
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
Controller is the main controller that coordinates all components. It acts as a single-writer system for managing agentic loops.
func New ¶
func New(ctx context.Context, cfg Config) (*Controller, error)
New creates a new controller instance.
func (*Controller) Close ¶
func (d *Controller) Close() error
Close gracefully shuts down the controller.
func (*Controller) Delete ¶
func (d *Controller) Delete(ctx context.Context, conversationID string) error
Delete deletes all events for a specific conversation ID.
func (*Controller) Exec ¶
func (d *Controller) Exec(ctx context.Context, req *proto.ExecRequest, handler ExecHandler) error
Exec executes a new agentic loop execution or resumes an existing one. If id is empty, a UUID will be generated. If the execution already exists, it will be resumed with optional new inputs.
func (*Controller) Fork ¶
func (d *Controller) Fork(ctx context.Context, srcConversationID string, srcSeq int32, destConversationID string) (string, error)
Fork forks an event log from a specific conversation up to a checkpoint.
func (*Controller) Registry ¶
func (d *Controller) Registry() *Registry
Registry returns the agent registry.
type ExecHandler ¶
type ExecHandler func(resp *proto.ExecResponse) error
type PlannerBuilder ¶
PlannerBuilder is a function that creates a PlanFunc given a Registry.
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry manages a collection of local and remote agents. It provides agent discovery, health monitoring, and load balancing.
func (*Registry) RegisterATE ¶
func (r *Registry) RegisterATE(ctx context.Context, ateTarget string, cfg config.SubstrateAgentConfig) error
RegisterATE returns an error stating that ATE support is not compiled in.
func (*Registry) RegisterColab ¶
func (r *Registry) RegisterColab(cfg config.ColabAgentConfig) error
RegisterColab registers a Colab agent that executes a local Python file on a remote Colab session via the colab CLI.
func (*Registry) RegisterLocal ¶
func (r *Registry) RegisterLocal(cfg config.LocalAgentConfig) error
RegisterLocal registers a local (in-process) agent.
func (*Registry) RegisterRemote ¶
RegisterRemote registers a remote agent by creating a remote agent client. The protocol field determines what kind of remote agent to register (matched case-insensitively):
- "axp" (default): AX's proto.AgentService.
- "a2a": A2A protocol.