subagent

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2026 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddSkillsRequest

type AddSkillsRequest struct {
	Skills []string `json:"skills"`
}

type ContextResponse

type ContextResponse struct {
	Messages []map[string]any `json:"messages"`
	Usage    map[string]any   `json:"usage"`
}

type CreateRequest

type CreateRequest struct {
	Name        string           `json:"name"`
	Description string           `json:"description"`
	Messages    []map[string]any `json:"messages,omitempty"`
	Metadata    map[string]any   `json:"metadata,omitempty"`
	Skills      []string         `json:"skills,omitempty"`
}

type ListResponse

type ListResponse struct {
	Items []Subagent `json:"items"`
}

type Service

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

func NewService

func NewService(log *slog.Logger, queries *sqlc.Queries) *Service

func (*Service) AddSkills

func (s *Service) AddSkills(ctx context.Context, id string, req AddSkillsRequest) (Subagent, error)

func (*Service) Create

func (s *Service) Create(ctx context.Context, botID string, req CreateRequest) (Subagent, error)

func (*Service) Delete

func (s *Service) Delete(ctx context.Context, id string) error

func (*Service) Get

func (s *Service) Get(ctx context.Context, id string) (Subagent, error)

func (*Service) GetByBotAndName

func (s *Service) GetByBotAndName(ctx context.Context, botID string, name string) (Subagent, error)

func (*Service) GetOrCreate

func (s *Service) GetOrCreate(ctx context.Context, botID string, req CreateRequest) (Subagent, error)

func (*Service) List

func (s *Service) List(ctx context.Context, botID string) ([]Subagent, error)

func (*Service) Update

func (s *Service) Update(ctx context.Context, id string, req UpdateRequest) (Subagent, error)

func (*Service) UpdateContext

func (s *Service) UpdateContext(ctx context.Context, id string, req UpdateContextRequest) (Subagent, error)

func (*Service) UpdateSkills

func (s *Service) UpdateSkills(ctx context.Context, id string, req UpdateSkillsRequest) (Subagent, error)

type SkillsResponse

type SkillsResponse struct {
	Skills []string `json:"skills"`
}

type Subagent

type Subagent struct {
	ID          string           `json:"id"`
	Name        string           `json:"name"`
	Description string           `json:"description"`
	BotID       string           `json:"bot_id"`
	Messages    []map[string]any `json:"messages"`
	Metadata    map[string]any   `json:"metadata"`
	Skills      []string         `json:"skills"`
	Usage       map[string]any   `json:"usage"`
	CreatedAt   time.Time        `json:"created_at"`
	UpdatedAt   time.Time        `json:"updated_at"`
	Deleted     bool             `json:"deleted"`
	DeletedAt   *time.Time       `json:"deleted_at,omitempty"`
}

type UpdateContextRequest

type UpdateContextRequest struct {
	Messages []map[string]any `json:"messages"`
	Usage    map[string]any   `json:"usage,omitempty"`
}

type UpdateRequest

type UpdateRequest struct {
	Name        *string        `json:"name,omitempty"`
	Description *string        `json:"description,omitempty"`
	Metadata    map[string]any `json:"metadata,omitempty"`
}

type UpdateSkillsRequest

type UpdateSkillsRequest struct {
	Skills []string `json:"skills"`
}

Jump to

Keyboard shortcuts

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