agent

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: May 14, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package agent provides error definitions for agent operations.

Package agent provides high-level APIs for agent management.

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrInvalidAgentID is returned when agent ID is empty or invalid.
	ErrInvalidAgentID = errors.New("invalid agent ID")

	// ErrAgentNotFound is returned when agent does not exist.
	ErrAgentNotFound = errors.New("agent not found")

	// ErrAgentAlreadyExists is returned when trying to create duplicate agent.
	ErrAgentAlreadyExists = errors.New("agent already exists")
)

Functions

This section is empty.

Types

type Agent

type Agent struct {
	ID        string `json:"id"`
	SessionID string `json:"session_id"`
	Status    Status `json:"status"`
	CreatedAt int64  `json:"created_at"`
}

Agent represents an AI agent with session management.

type Service

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

Service provides agent management operations.

func NewService

func NewService(memoryMgr memory.MemoryManager) *Service

NewService creates a new agent service instance. Args: memoryMgr - memory manager for session and task management. Returns new agent service instance.

func (*Service) CreateAgent

func (s *Service) CreateAgent(ctx context.Context, agentID string) (*Agent, error)

CreateAgent creates a new agent with default configuration. Args: ctx - operation context. agentID - unique identifier for the agent. Returns new agent instance or error.

func (*Service) DeleteAgent

func (s *Service) DeleteAgent(ctx context.Context, agentID string) error

DeleteAgent deletes an agent and its associated data. Args: ctx - operation context. agentID - agent identifier. Returns error if deletion fails.

func (*Service) GetAgent

func (s *Service) GetAgent(ctx context.Context, agentID string) (*Agent, error)

GetAgent retrieves an agent by ID. Args: ctx - operation context. agentID - agent identifier. Returns agent instance or error if not found.

type Status

type Status string

Status represents the current status of an agent.

const (
	StatusReady   Status = "ready"
	StatusRunning Status = "running"
	StatusStopped Status = "stopped"
	StatusError   Status = "error"
)

Jump to

Keyboard shortcuts

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