agent

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2026 License: Apache-2.0 Imports: 11 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 {
	ID           string                 `json:"id"`
	OrgID        string                 `json:"org_id"`
	Name         string                 `json:"name"`
	Description  string                 `json:"description,omitempty"`
	Config       map[string]interface{} `json:"config,omitempty"`
	CreatedAt    time.Time              `json:"created_at"`
	LastActiveAt *time.Time             `json:"last_active_at,omitempty"`
}

Agent represents a registered agent

type CreateRequest

type CreateRequest struct {
	Name        string                 `json:"name"`
	Description string                 `json:"description,omitempty"`
	Config      map[string]interface{} `json:"config,omitempty"`
}

CreateRequest is the request body for registering an agent

type Manager

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

Manager handles agent CRUD

func NewManager

func NewManager(metaDB *metadata.DB, arcRegistry *arc.Registry, logger zerolog.Logger) *Manager

NewManager creates a new agent manager

func (*Manager) Create

func (m *Manager) Create(ctx context.Context, orgID string, req *CreateRequest) (*Agent, error)

Create registers a new agent

func (*Manager) Delete

func (m *Manager) Delete(ctx context.Context, orgID, agentID string) error

Delete removes an agent

func (*Manager) Get

func (m *Manager) Get(ctx context.Context, orgID, agentID string) (*Agent, error)

Get returns an agent by ID

func (*Manager) GetStats

func (m *Manager) GetStats(ctx context.Context, orgID, agentID string) (*Stats, error)

GetStats returns memory stats for an agent

func (*Manager) List

func (m *Manager) List(ctx context.Context, orgID string) ([]*Agent, error)

List returns all agents for an org

func (*Manager) UpdateLastActive

func (m *Manager) UpdateLastActive(ctx context.Context, agentID string)

UpdateLastActive updates the last_active_at for an agent

type Stats

type Stats struct {
	AgentID        string         `json:"agent_id"`
	MemoryCount    int            `json:"memory_count"`
	Memories24h    int            `json:"memories_24h"`
	Errors24h      int            `json:"errors_24h"`
	SessionCount   int            `json:"session_count"`
	ActiveSessions int            `json:"active_sessions"`
	LastActiveAt   *time.Time     `json:"last_active_at,omitempty"`
	MemoryTypes    map[string]int `json:"memory_types"`
}

Stats represents memory statistics for an agent

Jump to

Keyboard shortcuts

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