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 ¶
- type Agent
- type ApplicationRef
- type CreateRequest
- type Entitlement
- type GroupRef
- type ListOptions
- type ListResponse
- type Meta
- type Protocol
- type Reference
- type Role
- type Service
- func (s *Service) Create(ctx context.Context, req *CreateRequest) (*Agent, error)
- func (s *Service) Delete(ctx context.Context, id string) error
- func (s *Service) Get(ctx context.Context, id string) (*Agent, error)
- func (s *Service) List(ctx context.Context, opts *ListOptions) (*ListResponse, error)
- func (s *Service) Replace(ctx context.Context, id string, req *CreateRequest) (*Agent, error)
- type X509Certificate
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 ¶
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 ¶
Entitlement represents an entitlement granted to an agent.
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 ¶
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 Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service provides operations for managing Agent resources.
func (*Service) List ¶
func (s *Service) List(ctx context.Context, opts *ListOptions) (*ListResponse, error)
List retrieves a list of agents.