Documentation
¶
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"`
Description string `json:"description"`
URL string `json:"url"`
Capabilities []string `json:"capabilities,omitempty"`
}
AgentCard describes an agent's capabilities.
type Artifact ¶
type Artifact struct {
Type string `json:"type"`
MimeType string `json:"mimeType,omitempty"`
Data string `json:"data"`
}
Artifact represents output from an agent.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client calls other A2A agents.
func (*Client) GetAgentCard ¶
GetAgentCard fetches an agent's card from well-known endpoint.
type Message ¶
type Message struct {
Role string `json:"role"`
Parts []Part `json:"parts"`
MessageID string `json:"messageId,omitempty"`
}
Message represents an A2A message (JSON-RPC 2.0).
type Part ¶
type Part struct {
Type string `json:"type"` // "text", "file", etc.
Text string `json:"text,omitempty"`
}
Part represents a content part in a message.
type Request ¶
type Request struct {
JSONRPC string `json:"jsonrpc"`
ID any `json:"id"`
Method string `json:"method"`
Params map[string]any `json:"params"`
}
Request is the JSON-RPC request for A2A.
type Response ¶
type Response struct {
JSONRPC string `json:"jsonrpc"`
ID any `json:"id"`
Result *Result `json:"result,omitempty"`
Error *Error `json:"error,omitempty"`
}
Response is the JSON-RPC response for A2A.
type Result ¶
type Result struct {
Artifacts []Artifact `json:"artifacts,omitempty"`
Usage map[string]any `json:"usage,omitempty"`
ToolsUsed []string `json:"toolsUsed,omitempty"`
}
Result contains the successful response data.
Click to show internal directories.
Click to hide internal directories.