Versions in this module Expand all Collapse all v0 v0.7.0 Aug 9, 2026 Changes in this version + const WellKnownPath + var ErrAgentNotFound = errors.New("agent not found") + var ErrCapabilityNotFound = errors.New("capability not found") + var ErrForbidden = errors.New("forbidden") + var ErrRateLimited = errors.New("rate limited") + var ErrTaskNotFound = errors.New("task not found") + var ErrUnauthorized = errors.New("unauthorized") + func HasCapability(card *AgentCard, capabilityID string) bool + func SupportsAuthentication(card *AgentCard, authType string) bool + type AgentCard struct + Authentication *Authentication + Capabilities []Capability + Description string + Endpoints *Endpoints + ID string + Metadata map[string]any + Name string + Provider *Provider + TrustDomain string + Version string + type Authentication struct + Scopes []string + TokenEndpoint string + TrustBundle string + Type string + type Capability struct + Description string + ID string + InputSchema json.RawMessage + Name string + OutputSchema json.RawMessage + RateLimit *RateLimit + RequiredScopes []string + func GetCapability(card *AgentCard, capabilityID string) *Capability + type Client struct + func NewClient(card *AgentCard, opts ...ClientOption) (*Client, error) + func (c *Client) AgentCard() *AgentCard + func (c *Client) Cancel(ctx context.Context, taskID string) error + func (c *Client) GetStatus(ctx context.Context, taskID string) (*TaskStatusResponse, error) + func (c *Client) Invoke(ctx context.Context, req *TaskRequest) (*TaskResponse, error) + func (c *Client) InvokeAndWait(ctx context.Context, req *TaskRequest, pollInterval time.Duration) (*TaskStatusResponse, error) + type ClientOption func(*Client) + func WithClientBearerToken(token string) ClientOption + func WithClientHTTPClient(client *http.Client) ClientOption + func WithClientHeader(key, value string) ClientOption + func WithDelegationToken(token *DelegationToken) ClientOption + type DelegationRequest struct + CapabilityID string + Constraints []string + DelegateTo string + ExpiresIn int + Scope string + type DelegationToken struct + ActorChain []string + ExpiresIn int + Scope string + Token string + TokenType string + type DiscoveryClient struct + func NewDiscoveryClient(opts ...DiscoveryOption) *DiscoveryClient + func (c *DiscoveryClient) DiscoverAgent(ctx context.Context, baseURL string) (*AgentCard, error) + func (c *DiscoveryClient) DiscoverAgentByURL(ctx context.Context, url string) (*AgentCard, error) + type DiscoveryOption func(*DiscoveryClient) + func WithDiscoveryHTTPClient(client *http.Client) DiscoveryOption + type Endpoints struct + Cancel string + Health string + Invoke string + Status string + type LogEntry struct + Level string + Message string + Timestamp string + type Provider struct + Name string + URL string + type RateLimit struct + RequestsPerHour int + RequestsPerMinute int + type TaskRequest struct + CallbackURL string + CapabilityID string + Context map[string]any + Input json.RawMessage + type TaskResponse struct + Error string + Output json.RawMessage + Status TaskStatus + StatusURL string + TaskID string + type TaskStatus string + const TaskStatusCanceled + const TaskStatusCompleted + const TaskStatusFailed + const TaskStatusPending + const TaskStatusRunning + func (s TaskStatus) IsTerminal() bool + type TaskStatusResponse struct + Error string + Logs []LogEntry + Output json.RawMessage + Progress *int + Status TaskStatus + TaskID string