agent

package
v0.35.3 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package agent provides agent capability discovery via Agent Card.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AgentCard

type AgentCard struct {
	Name         string       `json:"name"`
	Provider     Provider     `json:"provider"`
	URL          string       `json:"url"`
	CreatedAt    time.Time    `json:"created_at"`
	Capabilities Capabilities `json:"capabilities"`
	Skills       []Skill      `json:"skills"`
	Security     []Security   `json:"security"`
}

AgentCard describes this HotPlex instance's capabilities and identity.

type AgentRegistry

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

AgentRegistry manages the local AgentCard and discovers remote agents.

func NewAgentRegistry

func NewAgentRegistry(card *AgentCard) *AgentRegistry

NewAgentRegistry creates a new registry with the given local card.

func (*AgentRegistry) Discover

func (r *AgentRegistry) Discover(remoteURL string) (*AgentCard, error)

Discover fetches and caches a remote agent card.

func (*AgentRegistry) GetAgentCard

func (r *AgentRegistry) GetAgentCard() *AgentCard

GetAgentCard returns the local agent card.

func (*AgentRegistry) Register

func (r *AgentRegistry) Register(card *AgentCard)

Register replaces the local agent card.

type Capabilities

type Capabilities struct {
	Streaming         bool `json:"streaming"`
	PushNotifications bool `json:"push_notifications"`
}

Capabilities declares what features this agent supports.

type Provider

type Provider struct {
	Organization string `json:"organization"`
	URL          string `json:"url,omitempty"`
}

Provider describes the AI provider backing this agent.

type Security

type Security struct {
	Type        string `json:"type"`
	Description string `json:"description,omitempty"`
}

Security declares the security mechanisms this agent requires.

type Skill

type Skill struct {
	ID          string `json:"id"`
	Name        string `json:"name"`
	Description string `json:"description"`
}

Skill represents a named capability this agent can perform.

Jump to

Keyboard shortcuts

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