controller

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package controller implements the single-writer orchestrator that coordinates agentic loops, manages executions, and communicates with local and remote agents.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Registry        *Registry
	EventLogBuilder eventlog.EventLogBuilder
}

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) Registry

func (d *Controller) Registry() *Registry

Registry returns the agent registry.

type ExecHandler

type ExecHandler func(resp *proto.ExecResponse) error

type Registry

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

Registry manages a collection of harnesses.

func NewRegistry

func NewRegistry() *Registry

NewRegistry creates a new harness registry.

func (*Registry) Close

func (r *Registry) Close() error

Close releases resources held by the registry.

func (*Registry) Harness added in v0.2.0

func (r *Registry) Harness(id string) (harness.Harness, error)

Harness retrieves a harness by id.

func (*Registry) RegisterHarness added in v0.2.0

func (r *Registry) RegisterHarness(id string, h harness.Harness) error

RegisterHarness registers a harness under the given id.

func (*Registry) SetDefaultHarness added in v0.2.0

func (r *Registry) SetDefaultHarness(id string) error

SetDefaultHarness marks a registered harness id as the default.

Directories

Path Synopsis
Package eventlog contains an AX event log.
Package eventlog contains an AX event log.

Jump to

Keyboard shortcuts

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