agents

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package agents provides operations for managing SCIM Agent resources.

An Agent represents an AI agent with its own identifier, metadata, and privileges, independent of a particular runtime environment or containing application.

Example Usage

// Create an agent
agent, err := client.Agents().Create(ctx, &agents.CreateRequest{
    Name:        "my-ai-assistant",
    DisplayName: "My AI Assistant",
    AgentType:   "Assistant",
    Active:      true,
})

// Get an agent by ID
agent, err := client.Agents().Get(ctx, "agent-id")

// List all agents
list, err := client.Agents().List(ctx, &agents.ListOptions{
    Filter: "name eq 'my-ai-assistant'",
})

// Update an agent
agent, err := client.Agents().Update(ctx, "agent-id", &agents.UpdateRequest{
    Active: false,
})

// Delete an agent
err := client.Agents().Delete(ctx, "agent-id")

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Agent

type Agent struct {
	ID           string
	ExternalID   string
	Name         string
	DisplayName  string
	Description  string
	AgentType    string
	Active       bool
	Subject      string
	Groups       []GroupRef
	Entitlements []Entitlement
	Roles        []Role
	X509Certs    []X509Certificate
	Applications []ApplicationRef
	Protocols    []Protocol
	Parent       *Reference
	Owners       []Reference
	Meta         *Meta
}

Agent represents an AI agent resource.

type ApplicationRef

type ApplicationRef struct {
	Reference
	Type string
}

ApplicationRef represents an application reference.

type CreateRequest

type CreateRequest struct {
	ExternalID   string
	Name         string // Required
	DisplayName  string
	Description  string
	AgentType    string
	Active       bool
	Subject      string
	Entitlements []Entitlement
	Roles        []Role
	X509Certs    []X509Certificate
	Protocols    []Protocol
	Parent       *Reference
	Owners       []Reference
}

CreateRequest contains the data for creating a new agent.

func (*CreateRequest) Validate

func (r *CreateRequest) Validate() error

Validate validates the create request.

type Entitlement

type Entitlement struct {
	Value   string
	Display string
	Type    string
	Primary bool
}

Entitlement represents an entitlement granted to an agent.

type GroupRef

type GroupRef struct {
	Reference
	Type string // "direct" or "indirect"
}

GroupRef represents a group membership reference.

type ListOptions

type ListOptions struct {
	Filter             string
	StartIndex         int
	Count              int
	SortBy             string
	SortOrder          string // "ascending" or "descending"
	Attributes         string
	ExcludedAttributes string
}

ListOptions contains options for listing agents.

type ListResponse

type ListResponse struct {
	TotalResults int
	StartIndex   int
	ItemsPerPage int
	Resources    []*Agent
}

ListResponse contains the response from listing agents.

type Meta

type Meta struct {
	ResourceType string
	Created      string
	LastModified string
	Location     string
	Version      string
}

Meta contains SCIM resource metadata.

type Protocol

type Protocol struct {
	Type             string // "A2A", "OpenAPI", "MCP-Server"
	SpecificationURL string
}

Protocol represents a communication protocol supported by an agent.

type Reference

type Reference struct {
	Value   string
	Ref     string
	Display string
}

Reference represents a reference to another SCIM resource.

type Role

type Role struct {
	Value   string
	Display string
	Type    string
	Primary bool
}

Role represents a role assigned to an agent.

type Service

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

Service provides operations for managing Agent resources.

func New

func New(apiClient *api.Client) *Service

New creates a new agents service.

func (*Service) Create

func (s *Service) Create(ctx context.Context, req *CreateRequest) (*Agent, error)

Create creates a new agent.

func (*Service) Delete

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

Delete deletes an agent.

func (*Service) Get

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

Get retrieves an agent by ID.

func (*Service) List

func (s *Service) List(ctx context.Context, opts *ListOptions) (*ListResponse, error)

List retrieves a list of agents.

func (*Service) Replace

func (s *Service) Replace(ctx context.Context, id string, req *CreateRequest) (*Agent, error)

Replace replaces an existing agent entirely.

type X509Certificate

type X509Certificate struct {
	Value   string // Base64-encoded DER
	Display string
	Type    string
	Primary bool
}

X509Certificate represents an X.509 certificate.

Jump to

Keyboard shortcuts

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