Documentation
¶
Overview ¶
Code generated from JSON schema. DO NOT EDIT.
Index ¶
- Constants
- func MarshalParts(parts []Part) ([]byte, error)
- func NewAgentEvent(eventType, eventID string, data map[string]any) cloudevents.Event
- func NewDeltaEvent(message *Message) cloudevents.Event
- func NewIterationCompletedEvent(iteration int, taskID string, finalMessage *Message) cloudevents.Event
- func NewMessageEvent(eventType, eventID string, message *Message) cloudevents.Event
- type A2AError
- type A2ARequest
- type APIKeySecurityScheme
- type AgentCapabilities
- type AgentCard
- type AgentCardSignature
- type AgentExtension
- type AgentInterface
- type AgentProvider
- type AgentSkill
- type Artifact
- type AuthenticatedExtendedCardNotConfiguredError
- type AuthorizationCodeOAuthFlow
- type CancelTaskRequest
- type CancelTaskResponse
- type CancelTaskSuccessResponse
- type ClientCredentialsOAuthFlow
- type ContentTypeNotSupportedError
- type DataPart
- type DeleteTaskPushNotificationConfigParams
- type DeleteTaskPushNotificationConfigRequest
- type DeleteTaskPushNotificationConfigResponse
- type DeleteTaskPushNotificationConfigSuccessResponse
- type FileBase
- type FilePart
- type FileWithBytes
- type FileWithUri
- type GetAuthenticatedExtendedCardRequest
- type GetAuthenticatedExtendedCardResponse
- type GetAuthenticatedExtendedCardSuccessResponse
- type GetTaskPushNotificationConfigParams
- type GetTaskPushNotificationConfigRequest
- type GetTaskPushNotificationConfigResponse
- type GetTaskPushNotificationConfigSuccessResponse
- type GetTaskRequest
- type GetTaskResponse
- type GetTaskSuccessResponse
- type HTTPAuthSecurityScheme
- type ImplicitOAuthFlow
- type InternalError
- type InvalidAgentResponseError
- type InvalidParamsError
- type InvalidRequestError
- type JSONParseError
- type JSONRPCError
- type JSONRPCErrorResponse
- type JSONRPCMessage
- type JSONRPCRequest
- type JSONRPCResponse
- type JSONRPCSuccessResponse
- type ListTaskPushNotificationConfigParams
- type ListTaskPushNotificationConfigRequest
- type ListTaskPushNotificationConfigResponse
- type ListTaskPushNotificationConfigSuccessResponse
- type ListTasksRequest
- type ListTasksResponse
- type ListTasksSuccessResponse
- type Message
- func NewAssistantMessage(messageID string, parts []Part) *Message
- func NewInputRequiredMessage(toolCallID, message string) *Message
- func NewStreamingStatusMessage(messageID, status string, metadata map[string]any) *Message
- func NewToolResultMessage(toolCallID string, toolName string, result any, hasError bool) *Message
- type MessagePartKind
- type MessageSendConfiguration
- type MessageSendParams
- type MethodNotFoundError
- type MutualTLSSecurityScheme
- type OAuth2SecurityScheme
- type OAuthFlows
- type OpenIdConnectSecurityScheme
- type Part
- type PartBase
- type PasswordOAuthFlow
- type PushNotificationAuthenticationInfo
- type PushNotificationConfig
- type PushNotificationNotSupportedError
- type SecurityScheme
- type SecuritySchemeBase
- type SendMessageRequest
- type SendMessageResponse
- type SendMessageSuccessResponse
- type SendStreamingMessageRequest
- type SendStreamingMessageResponse
- type SendStreamingMessageSuccessResponse
- type SetTaskPushNotificationConfigRequest
- type SetTaskPushNotificationConfigResponse
- type SetTaskPushNotificationConfigSuccessResponse
- type Task
- type TaskArtifactUpdateEvent
- type TaskIdParams
- type TaskList
- type TaskListParams
- type TaskNotCancelableError
- type TaskNotFoundError
- type TaskPushNotificationConfig
- type TaskQueryParams
- type TaskResubscriptionRequest
- type TaskState
- type TaskStatus
- type TaskStatusUpdateEvent
- type TextPart
- type TransportProtocol
- type UnsupportedOperationError
Constants ¶
const ( HealthStatusHealthy = "healthy" HealthStatusDegraded = "degraded" HealthStatusUnhealthy = "unhealthy" )
Health status constants
const ( EventDelta = "adk.agent.delta" EventIterationCompleted = "adk.agent.iteration.completed" EventToolStarted = "adk.agent.tool.started" EventToolCompleted = "adk.agent.tool.completed" EventToolFailed = "adk.agent.tool.failed" EventToolResult = "adk.agent.tool.result" EventInputRequired = "adk.agent.input.required" EventTaskInterrupted = "adk.agent.task.interrupted" EventTaskStatusChanged = "adk.agent.task.status.changed" EventStreamFailed = "adk.agent.stream.failed" )
CloudEvent type constants for agent streaming operations
const (
ToolInputRequired = "input_required"
)
Tool name constants
Variables ¶
This section is empty.
Functions ¶
func MarshalParts ¶ added in v0.14.0
MarshalParts is a utility function to marshal a slice of Parts
func NewAgentEvent ¶ added in v0.9.4
func NewAgentEvent(eventType, eventID string, data map[string]any) cloudevents.Event
NewAgentEvent creates a CloudEvent for agent lifecycle events
func NewDeltaEvent ¶ added in v0.9.4
func NewDeltaEvent(message *Message) cloudevents.Event
NewDeltaEvent creates a CloudEvent for streaming deltas, with the message in the data field
func NewIterationCompletedEvent ¶ added in v0.9.4
func NewIterationCompletedEvent(iteration int, taskID string, finalMessage *Message) cloudevents.Event
NewIterationCompletedEvent creates a CloudEvent for iteration completed with the final message
func NewMessageEvent ¶ added in v0.9.4
func NewMessageEvent(eventType, eventID string, message *Message) cloudevents.Event
NewMessageEvent creates a CloudEvent with a message payload and custom event type
Types ¶
type A2AError ¶
type A2AError any
A discriminated union of all standard JSON-RPC and A2A-specific error types.
type A2ARequest ¶
type A2ARequest any
A discriminated union representing all possible JSON-RPC 2.0 requests supported by the A2A specification.
type APIKeySecurityScheme ¶
type APIKeySecurityScheme struct {
Description *string `json:"description,omitempty"`
In string `json:"in"`
Name string `json:"name"`
Type string `json:"type"`
}
Defines a security scheme using an API key.
type AgentCapabilities ¶
type AgentCapabilities struct {
Extensions []AgentExtension `json:"extensions,omitempty"`
PushNotifications *bool `json:"pushNotifications,omitempty"`
StateTransitionHistory *bool `json:"stateTransitionHistory,omitempty"`
Streaming *bool `json:"streaming,omitempty"`
}
Defines optional capabilities supported by an agent.
type AgentCard ¶
type AgentCard struct {
AdditionalInterfaces []AgentInterface `json:"additionalInterfaces,omitempty"`
Capabilities AgentCapabilities `json:"capabilities"`
DefaultInputModes []string `json:"defaultInputModes"`
DefaultOutputModes []string `json:"defaultOutputModes"`
Description string `json:"description"`
DocumentationURL *string `json:"documentationUrl,omitempty"`
IconURL *string `json:"iconUrl,omitempty"`
Name string `json:"name"`
PreferredTransport string `json:"preferredTransport,omitempty"`
ProtocolVersion string `json:"protocolVersion"`
Provider *AgentProvider `json:"provider,omitempty"`
Security []map[string][]string `json:"security,omitempty"`
SecuritySchemes map[string]SecurityScheme `json:"securitySchemes,omitempty"`
Signatures []AgentCardSignature `json:"signatures,omitempty"`
Skills []AgentSkill `json:"skills"`
SupportsAuthenticatedExtendedCard *bool `json:"supportsAuthenticatedExtendedCard,omitempty"`
URL string `json:"url"`
Version string `json:"version"`
}
The AgentCard is a self-describing manifest for an agent. It provides essential metadata including the agent's identity, capabilities, skills, supported communication methods, and security requirements.
type AgentCardSignature ¶ added in v0.8.0
type AgentCardSignature struct {
Header map[string]any `json:"header,omitempty"`
Protected string `json:"protected"`
Signature string `json:"signature"`
}
AgentCardSignature represents a JWS signature of an AgentCard. This follows the JSON format of an RFC 7515 JSON Web Signature (JWS).
type AgentExtension ¶
type AgentExtension struct {
Description *string `json:"description,omitempty"`
Params map[string]any `json:"params,omitempty"`
Required *bool `json:"required,omitempty"`
URI string `json:"uri"`
}
A declaration of a protocol extension supported by an Agent.
type AgentInterface ¶
Declares a combination of a target URL and a transport protocol for interacting with the agent. This allows agents to expose the same functionality over multiple transport mechanisms.
type AgentProvider ¶
Represents the service provider of an agent.
type AgentSkill ¶
type AgentSkill struct {
Description string `json:"description"`
Examples []string `json:"examples,omitempty"`
ID string `json:"id"`
InputModes []string `json:"inputModes,omitempty"`
Name string `json:"name"`
OutputModes []string `json:"outputModes,omitempty"`
Security []map[string][]string `json:"security,omitempty"`
Tags []string `json:"tags"`
}
Represents a distinct capability or function that an agent can perform.
type Artifact ¶
type Artifact struct {
ArtifactID string `json:"artifactId"`
Description *string `json:"description,omitempty"`
Extensions []string `json:"extensions,omitempty"`
Metadata map[string]any `json:"metadata,omitempty"`
Name *string `json:"name,omitempty"`
Parts []Part `json:"parts"`
}
Represents a file, data structure, or other resource generated by an agent during a task.
type AuthenticatedExtendedCardNotConfiguredError ¶ added in v0.8.0
type AuthenticatedExtendedCardNotConfiguredError struct {
Code int `json:"code"`
Data *any `json:"data,omitempty"`
Message string `json:"message"`
}
An A2A-specific error indicating that the agent does not have an Authenticated Extended Card configured
type AuthorizationCodeOAuthFlow ¶
type AuthorizationCodeOAuthFlow struct {
AuthorizationURL string `json:"authorizationUrl"`
RefreshURL *string `json:"refreshUrl,omitempty"`
Scopes map[string]string `json:"scopes"`
TokenURL string `json:"tokenUrl"`
}
Defines configuration details for the OAuth 2.0 Authorization Code flow.
type CancelTaskRequest ¶
type CancelTaskRequest struct {
ID any `json:"id"`
JSONRPC string `json:"jsonrpc"`
Method string `json:"method"`
Params TaskIdParams `json:"params"`
}
Represents a JSON-RPC request for the `tasks/cancel` method.
type CancelTaskResponse ¶
type CancelTaskResponse any
Represents a JSON-RPC response for the `tasks/cancel` method.
type CancelTaskSuccessResponse ¶
type CancelTaskSuccessResponse struct {
ID any `json:"id"`
JSONRPC string `json:"jsonrpc"`
Result Task `json:"result"`
}
Represents a successful JSON-RPC response for the `tasks/cancel` method.
type ClientCredentialsOAuthFlow ¶
type ClientCredentialsOAuthFlow struct {
RefreshURL *string `json:"refreshUrl,omitempty"`
Scopes map[string]string `json:"scopes"`
TokenURL string `json:"tokenUrl"`
}
Defines configuration details for the OAuth 2.0 Client Credentials flow.
type ContentTypeNotSupportedError ¶
type ContentTypeNotSupportedError struct {
Code int `json:"code"`
Data *any `json:"data,omitempty"`
Message string `json:"message"`
}
An A2A-specific error indicating an incompatibility between the requested content types and the agent's capabilities.
type DataPart ¶
type DataPart struct {
Data map[string]any `json:"data"`
Kind string `json:"kind"`
Metadata map[string]any `json:"metadata,omitempty"`
}
Represents a structured data segment (e.g., JSON) within a message or artifact.
type DeleteTaskPushNotificationConfigParams ¶
type DeleteTaskPushNotificationConfigParams struct {
ID string `json:"id"`
Metadata map[string]any `json:"metadata,omitempty"`
PushNotificationConfigID string `json:"pushNotificationConfigId"`
}
Defines parameters for deleting a specific push notification configuration for a task.
type DeleteTaskPushNotificationConfigRequest ¶
type DeleteTaskPushNotificationConfigRequest struct {
ID any `json:"id"`
JSONRPC string `json:"jsonrpc"`
Method string `json:"method"`
Params DeleteTaskPushNotificationConfigParams `json:"params"`
}
Represents a JSON-RPC request for the `tasks/pushNotificationConfig/delete` method.
type DeleteTaskPushNotificationConfigResponse ¶
type DeleteTaskPushNotificationConfigResponse any
Represents a JSON-RPC response for the `tasks/pushNotificationConfig/delete` method.
type DeleteTaskPushNotificationConfigSuccessResponse ¶
type DeleteTaskPushNotificationConfigSuccessResponse struct {
ID any `json:"id"`
JSONRPC string `json:"jsonrpc"`
Result any `json:"result"`
}
Represents a successful JSON-RPC response for the `tasks/pushNotificationConfig/delete` method.
type FileBase ¶
type FileBase struct {
MIMEType *string `json:"mimeType,omitempty"`
Name *string `json:"name,omitempty"`
}
Defines base properties for a file.
type FilePart ¶
type FilePart struct {
File any `json:"file"`
Kind string `json:"kind"`
Metadata map[string]any `json:"metadata,omitempty"`
}
Represents a file segment within a message or artifact. The file content can be provided either directly as bytes or as a URI.
type FileWithBytes ¶
type FileWithBytes struct {
Bytes string `json:"bytes"`
MIMEType *string `json:"mimeType,omitempty"`
Name *string `json:"name,omitempty"`
}
Represents a file with its content provided directly as a base64-encoded string.
type FileWithUri ¶
type FileWithUri struct {
MIMEType *string `json:"mimeType,omitempty"`
Name *string `json:"name,omitempty"`
URI string `json:"uri"`
}
Represents a file with its content located at a specific URI.
type GetAuthenticatedExtendedCardRequest ¶ added in v0.8.0
type GetAuthenticatedExtendedCardRequest struct {
ID any `json:"id"`
JSONRPC string `json:"jsonrpc"`
Method string `json:"method"`
}
Represents a JSON-RPC request for the `agent/getAuthenticatedExtendedCard` method.
type GetAuthenticatedExtendedCardResponse ¶ added in v0.8.0
type GetAuthenticatedExtendedCardResponse any
Represents a JSON-RPC response for the `agent/getAuthenticatedExtendedCard` method.
type GetAuthenticatedExtendedCardSuccessResponse ¶ added in v0.8.0
type GetAuthenticatedExtendedCardSuccessResponse struct {
ID any `json:"id"`
JSONRPC string `json:"jsonrpc"`
Result AgentCard `json:"result"`
}
Represents a successful JSON-RPC response for the `agent/getAuthenticatedExtendedCard` method.
type GetTaskPushNotificationConfigParams ¶
type GetTaskPushNotificationConfigParams struct {
ID string `json:"id"`
Metadata map[string]any `json:"metadata,omitempty"`
PushNotificationConfigID *string `json:"pushNotificationConfigId,omitempty"`
}
Defines parameters for fetching a specific push notification configuration for a task.
type GetTaskPushNotificationConfigRequest ¶
type GetTaskPushNotificationConfigRequest struct {
ID any `json:"id"`
JSONRPC string `json:"jsonrpc"`
Method string `json:"method"`
Params any `json:"params"`
}
Represents a JSON-RPC request for the `tasks/pushNotificationConfig/get` method.
type GetTaskPushNotificationConfigResponse ¶
type GetTaskPushNotificationConfigResponse any
Represents a JSON-RPC response for the `tasks/pushNotificationConfig/get` method.
type GetTaskPushNotificationConfigSuccessResponse ¶
type GetTaskPushNotificationConfigSuccessResponse struct {
ID any `json:"id"`
JSONRPC string `json:"jsonrpc"`
Result TaskPushNotificationConfig `json:"result"`
}
Represents a successful JSON-RPC response for the `tasks/pushNotificationConfig/get` method.
type GetTaskRequest ¶
type GetTaskRequest struct {
ID any `json:"id"`
JSONRPC string `json:"jsonrpc"`
Method string `json:"method"`
Params TaskQueryParams `json:"params"`
}
Represents a JSON-RPC request for the `tasks/get` method.
type GetTaskResponse ¶
type GetTaskResponse any
Represents a JSON-RPC response for the `tasks/get` method.
type GetTaskSuccessResponse ¶
type GetTaskSuccessResponse struct {
ID any `json:"id"`
JSONRPC string `json:"jsonrpc"`
Result Task `json:"result"`
}
Represents a successful JSON-RPC response for the `tasks/get` method.
type HTTPAuthSecurityScheme ¶
type HTTPAuthSecurityScheme struct {
BearerFormat *string `json:"bearerFormat,omitempty"`
Description *string `json:"description,omitempty"`
Scheme string `json:"scheme"`
Type string `json:"type"`
}
Defines a security scheme using HTTP authentication.
type ImplicitOAuthFlow ¶
type ImplicitOAuthFlow struct {
AuthorizationURL string `json:"authorizationUrl"`
RefreshURL *string `json:"refreshUrl,omitempty"`
Scopes map[string]string `json:"scopes"`
}
Defines configuration details for the OAuth 2.0 Implicit flow.
type InternalError ¶
type InternalError struct {
Code int `json:"code"`
Data *any `json:"data,omitempty"`
Message string `json:"message"`
}
An error indicating an internal error on the server.
type InvalidAgentResponseError ¶
type InvalidAgentResponseError struct {
Code int `json:"code"`
Data *any `json:"data,omitempty"`
Message string `json:"message"`
}
An A2A-specific error indicating that the agent returned a response that does not conform to the specification for the current method.
type InvalidParamsError ¶
type InvalidParamsError struct {
Code int `json:"code"`
Data *any `json:"data,omitempty"`
Message string `json:"message"`
}
An error indicating that the method parameters are invalid.
type InvalidRequestError ¶
type InvalidRequestError struct {
Code int `json:"code"`
Data *any `json:"data,omitempty"`
Message string `json:"message"`
}
An error indicating that the JSON sent is not a valid Request object.
type JSONParseError ¶
type JSONParseError struct {
Code int `json:"code"`
Data *any `json:"data,omitempty"`
Message string `json:"message"`
}
An error indicating that the server received invalid JSON.
type JSONRPCError ¶
type JSONRPCError struct {
Code int `json:"code"`
Data *any `json:"data,omitempty"`
Message string `json:"message"`
}
Represents a JSON-RPC 2.0 Error object, included in an error response.
type JSONRPCErrorResponse ¶
type JSONRPCErrorResponse struct {
Error any `json:"error"`
ID any `json:"id"`
JSONRPC string `json:"jsonrpc"`
}
Represents a JSON-RPC 2.0 Error Response object.
type JSONRPCMessage ¶
Defines the base structure for any JSON-RPC 2.0 request, response, or notification.
type JSONRPCRequest ¶
type JSONRPCRequest struct {
ID *any `json:"id,omitempty"`
JSONRPC string `json:"jsonrpc"`
Method string `json:"method"`
Params map[string]any `json:"params,omitempty"`
}
Represents a JSON-RPC 2.0 Request object.
type JSONRPCResponse ¶
type JSONRPCResponse any
A discriminated union representing all possible JSON-RPC 2.0 responses for the A2A specification methods.
type JSONRPCSuccessResponse ¶
type JSONRPCSuccessResponse struct {
ID any `json:"id"`
JSONRPC string `json:"jsonrpc"`
Result any `json:"result"`
}
Represents a successful JSON-RPC 2.0 Response object.
type ListTaskPushNotificationConfigParams ¶
type ListTaskPushNotificationConfigParams struct {
ID string `json:"id"`
Metadata map[string]any `json:"metadata,omitempty"`
}
Defines parameters for listing all push notification configurations associated with a task.
type ListTaskPushNotificationConfigRequest ¶
type ListTaskPushNotificationConfigRequest struct {
ID any `json:"id"`
JSONRPC string `json:"jsonrpc"`
Method string `json:"method"`
Params ListTaskPushNotificationConfigParams `json:"params"`
}
Represents a JSON-RPC request for the `tasks/pushNotificationConfig/list` method.
type ListTaskPushNotificationConfigResponse ¶
type ListTaskPushNotificationConfigResponse any
Represents a JSON-RPC response for the `tasks/pushNotificationConfig/list` method.
type ListTaskPushNotificationConfigSuccessResponse ¶
type ListTaskPushNotificationConfigSuccessResponse struct {
ID any `json:"id"`
JSONRPC string `json:"jsonrpc"`
Result []TaskPushNotificationConfig `json:"result"`
}
Represents a successful JSON-RPC response for the `tasks/pushNotificationConfig/list` method.
type ListTasksRequest ¶
type ListTasksRequest struct {
ID any `json:"id"`
JSONRPC string `json:"jsonrpc"`
Method string `json:"method"`
Params *TaskListParams `json:"params,omitempty"`
}
JSON-RPC request model for the 'tasks/list' method.
type ListTasksSuccessResponse ¶
type ListTasksSuccessResponse struct {
ID any `json:"id"`
JSONRPC string `json:"jsonrpc"`
Result TaskList `json:"result"`
}
JSON-RPC success response for the 'tasks/list' method.
type Message ¶
type Message struct {
ContextID *string `json:"contextId,omitempty"`
Extensions []string `json:"extensions,omitempty"`
Kind string `json:"kind"`
MessageID string `json:"messageId"`
Metadata map[string]any `json:"metadata,omitempty"`
Parts []Part `json:"parts"`
ReferenceTaskIds []string `json:"referenceTaskIds,omitempty"`
Role string `json:"role"`
TaskID *string `json:"taskId,omitempty"`
}
Represents a single message in the conversation between a user and an agent.
func NewAssistantMessage ¶ added in v0.9.4
NewAssistantMessage creates a standardized assistant message
func NewInputRequiredMessage ¶ added in v0.9.4
NewInputRequiredMessage creates an input required message
func NewStreamingStatusMessage ¶ added in v0.9.4
NewStreamingStatusMessage creates a status message for streaming
func NewToolResultMessage ¶ added in v0.9.4
NewToolResultMessage creates a standardized tool result message
func (*Message) UnmarshalJSON ¶ added in v0.14.0
UnmarshalJSON custom unmarshaler for Message that properly handles typed Parts
type MessagePartKind ¶
type MessagePartKind string
MessagePartKind represents the different types of message parts supported by A2A protocol. Based on the A2A specification: https://google-a2a.github.io/A2A/latest/
const ( // MessagePartKindText represents a text segment within message parts MessagePartKindText MessagePartKind = "text" // MessagePartKindFile represents a file segment within message parts MessagePartKindFile MessagePartKind = "file" // MessagePartKindData represents a structured data segment within message parts MessagePartKindData MessagePartKind = "data" )
MessagePartKind enum values for the three official message part types
func (MessagePartKind) IsValid ¶
func (k MessagePartKind) IsValid() bool
IsValid checks if the MessagePartKind is one of the supported values
func (MessagePartKind) String ¶
func (k MessagePartKind) String() string
String returns the string representation of the MessagePartKind
type MessageSendConfiguration ¶
type MessageSendConfiguration struct {
AcceptedOutputModes []string `json:"acceptedOutputModes,omitempty"`
Blocking *bool `json:"blocking,omitempty"`
HistoryLength *int `json:"historyLength,omitempty"`
PushNotificationConfig *PushNotificationConfig `json:"pushNotificationConfig,omitempty"`
}
Defines configuration options for a `message/send` or `message/stream` request.
type MessageSendParams ¶
type MessageSendParams struct {
Configuration *MessageSendConfiguration `json:"configuration,omitempty"`
Message Message `json:"message"`
Metadata map[string]any `json:"metadata,omitempty"`
}
Defines the parameters for a request to send a message to an agent. This can be used to create a new task, continue an existing one, or restart a task.
type MethodNotFoundError ¶
type MethodNotFoundError struct {
Code int `json:"code"`
Data *any `json:"data,omitempty"`
Message string `json:"message"`
}
An error indicating that the requested method does not exist or is not available.
type MutualTLSSecurityScheme ¶ added in v0.8.0
type MutualTLSSecurityScheme struct {
Description *string `json:"description,omitempty"`
Type string `json:"type"`
}
Defines a security scheme using mTLS authentication.
type OAuth2SecurityScheme ¶
type OAuth2SecurityScheme struct {
Description *string `json:"description,omitempty"`
Flows OAuthFlows `json:"flows"`
Oauth2metadataURL *string `json:"oauth2MetadataUrl,omitempty"`
Type string `json:"type"`
}
Defines a security scheme using OAuth 2.0.
type OAuthFlows ¶
type OAuthFlows struct {
AuthorizationCode *AuthorizationCodeOAuthFlow `json:"authorizationCode,omitempty"`
ClientCredentials *ClientCredentialsOAuthFlow `json:"clientCredentials,omitempty"`
Implicit *ImplicitOAuthFlow `json:"implicit,omitempty"`
Password *PasswordOAuthFlow `json:"password,omitempty"`
}
Defines the configuration for the supported OAuth 2.0 flows.
type OpenIdConnectSecurityScheme ¶
type OpenIdConnectSecurityScheme struct {
Description *string `json:"description,omitempty"`
OpenIDConnectURL string `json:"openIdConnectUrl"`
Type string `json:"type"`
}
Defines a security scheme using OpenID Connect.
type Part ¶
type Part any
A discriminated union representing a part of a message or artifact, which can be text, a file, or structured data.
func NewDataPart ¶ added in v0.9.4
NewDataPart creates a generic data part for a message
func NewTextPart ¶ added in v0.9.4
NewTextPart creates a text part for a message
func NewToolCallPart ¶ added in v0.9.4
NewToolCallPart creates a tool call part for a message
func UnmarshalPart ¶ added in v0.14.0
UnmarshalPart unmarshals a single Part from JSON with proper type handling
func UnmarshalParts ¶ added in v0.14.0
UnmarshalParts is a utility function to unmarshal a slice of Parts with proper type handling
type PasswordOAuthFlow ¶
type PasswordOAuthFlow struct {
RefreshURL *string `json:"refreshUrl,omitempty"`
Scopes map[string]string `json:"scopes"`
TokenURL string `json:"tokenUrl"`
}
Defines configuration details for the OAuth 2.0 Resource Owner Password flow.
type PushNotificationAuthenticationInfo ¶
type PushNotificationAuthenticationInfo struct {
Credentials *string `json:"credentials,omitempty"`
Schemes []string `json:"schemes"`
}
Defines authentication details for a push notification endpoint.
type PushNotificationConfig ¶
type PushNotificationConfig struct {
Authentication *PushNotificationAuthenticationInfo `json:"authentication,omitempty"`
ID *string `json:"id,omitempty"`
Token *string `json:"token,omitempty"`
URL string `json:"url"`
}
Defines the configuration for setting up push notifications for task updates.
type PushNotificationNotSupportedError ¶
type PushNotificationNotSupportedError struct {
Code int `json:"code"`
Data *any `json:"data,omitempty"`
Message string `json:"message"`
}
An A2A-specific error indicating that the agent does not support push notifications.
type SecurityScheme ¶
type SecurityScheme any
Defines a security scheme that can be used to secure an agent's endpoints. This is a discriminated union type based on the OpenAPI 3.0 Security Scheme Object.
type SecuritySchemeBase ¶
type SecuritySchemeBase struct {
Description *string `json:"description,omitempty"`
}
Defines base properties shared by all security scheme objects.
type SendMessageRequest ¶
type SendMessageRequest struct {
ID any `json:"id"`
JSONRPC string `json:"jsonrpc"`
Method string `json:"method"`
Params MessageSendParams `json:"params"`
}
Represents a JSON-RPC request for the `message/send` method.
type SendMessageResponse ¶
type SendMessageResponse any
Represents a JSON-RPC response for the `message/send` method.
type SendMessageSuccessResponse ¶
type SendMessageSuccessResponse struct {
ID any `json:"id"`
JSONRPC string `json:"jsonrpc"`
Result any `json:"result"`
}
Represents a successful JSON-RPC response for the `message/send` method.
type SendStreamingMessageRequest ¶
type SendStreamingMessageRequest struct {
ID any `json:"id"`
JSONRPC string `json:"jsonrpc"`
Method string `json:"method"`
Params MessageSendParams `json:"params"`
}
Represents a JSON-RPC request for the `message/stream` method.
type SendStreamingMessageResponse ¶
type SendStreamingMessageResponse any
Represents a JSON-RPC response for the `message/stream` method.
type SendStreamingMessageSuccessResponse ¶
type SendStreamingMessageSuccessResponse struct {
ID any `json:"id"`
JSONRPC string `json:"jsonrpc"`
Result any `json:"result"`
}
Represents a successful JSON-RPC response for the `message/stream` method. The server may send multiple response objects for a single request.
type SetTaskPushNotificationConfigRequest ¶
type SetTaskPushNotificationConfigRequest struct {
ID any `json:"id"`
JSONRPC string `json:"jsonrpc"`
Method string `json:"method"`
Params TaskPushNotificationConfig `json:"params"`
}
Represents a JSON-RPC request for the `tasks/pushNotificationConfig/set` method.
type SetTaskPushNotificationConfigResponse ¶
type SetTaskPushNotificationConfigResponse any
Represents a JSON-RPC response for the `tasks/pushNotificationConfig/set` method.
type SetTaskPushNotificationConfigSuccessResponse ¶
type SetTaskPushNotificationConfigSuccessResponse struct {
ID any `json:"id"`
JSONRPC string `json:"jsonrpc"`
Result TaskPushNotificationConfig `json:"result"`
}
Represents a successful JSON-RPC response for the `tasks/pushNotificationConfig/set` method.
type Task ¶
type Task struct {
Artifacts []Artifact `json:"artifacts,omitempty"`
ContextID string `json:"contextId"`
History []Message `json:"history,omitempty"`
ID string `json:"id"`
Kind string `json:"kind"`
Metadata map[string]any `json:"metadata,omitempty"`
Status TaskStatus `json:"status"`
}
Represents a single, stateful operation or conversation between a client and an agent.
type TaskArtifactUpdateEvent ¶
type TaskArtifactUpdateEvent struct {
Append *bool `json:"append,omitempty"`
Artifact Artifact `json:"artifact"`
ContextID string `json:"contextId"`
Kind string `json:"kind"`
LastChunk *bool `json:"lastChunk,omitempty"`
Metadata map[string]any `json:"metadata,omitempty"`
TaskID string `json:"taskId"`
}
An event sent by the agent to notify the client that an artifact has been generated or updated. This is typically used in streaming models.
type TaskIdParams ¶
type TaskIdParams struct {
ID string `json:"id"`
Metadata map[string]any `json:"metadata,omitempty"`
}
Defines parameters containing a task ID, used for simple task operations.
type TaskList ¶
type TaskList struct {
Limit int `json:"limit"`
Offset int `json:"offset"`
Tasks []Task `json:"tasks"`
Total int `json:"total"`
}
List of tasks with pagination information.
type TaskListParams ¶
type TaskListParams struct {
ContextID *string `json:"contextId,omitempty"`
Limit int `json:"limit,omitempty"`
Metadata map[string]any `json:"metadata,omitempty"`
Offset int `json:"offset,omitempty"`
State *TaskState `json:"state,omitempty"`
}
Parameters for listing tasks with optional filtering and pagination.
type TaskNotCancelableError ¶
type TaskNotCancelableError struct {
Code int `json:"code"`
Data *any `json:"data,omitempty"`
Message string `json:"message"`
}
An A2A-specific error indicating that the task is in a state where it cannot be canceled.
type TaskNotFoundError ¶
type TaskNotFoundError struct {
Code int `json:"code"`
Data *any `json:"data,omitempty"`
Message string `json:"message"`
}
An A2A-specific error indicating that the requested task ID was not found.
type TaskPushNotificationConfig ¶
type TaskPushNotificationConfig struct {
PushNotificationConfig PushNotificationConfig `json:"pushNotificationConfig"`
TaskID string `json:"taskId"`
}
A container associating a push notification configuration with a specific task.
type TaskQueryParams ¶
type TaskQueryParams struct {
HistoryLength *int `json:"historyLength,omitempty"`
ID string `json:"id"`
Metadata map[string]any `json:"metadata,omitempty"`
}
Defines parameters for querying a task, with an option to limit history length.
type TaskResubscriptionRequest ¶
type TaskResubscriptionRequest struct {
ID any `json:"id"`
JSONRPC string `json:"jsonrpc"`
Method string `json:"method"`
Params TaskIdParams `json:"params"`
}
Represents a JSON-RPC request for the `tasks/resubscribe` method, used to resume a streaming connection.
type TaskState ¶
type TaskState string
Defines the lifecycle states of a Task.
const ( TaskStateAuthRequired TaskState = "auth-required" TaskStateCanceled TaskState = "canceled" TaskStateCompleted TaskState = "completed" TaskStateFailed TaskState = "failed" TaskStateInputRequired TaskState = "input-required" TaskStateRejected TaskState = "rejected" TaskStateSubmitted TaskState = "submitted" TaskStateUnknown TaskState = "unknown" TaskStateWorking TaskState = "working" )
TaskState enum values
type TaskStatus ¶
type TaskStatus struct {
Message *Message `json:"message,omitempty"`
State TaskState `json:"state"`
Timestamp *string `json:"timestamp,omitempty"`
}
Represents the status of a task at a specific point in time.
type TaskStatusUpdateEvent ¶
type TaskStatusUpdateEvent struct {
ContextID string `json:"contextId"`
Final bool `json:"final"`
Kind string `json:"kind"`
Metadata map[string]any `json:"metadata,omitempty"`
Status TaskStatus `json:"status"`
TaskID string `json:"taskId"`
}
An event sent by the agent to notify the client of a change in a task's status. This is typically used in streaming or subscription models.
type TextPart ¶
type TextPart struct {
Kind string `json:"kind"`
Metadata map[string]any `json:"metadata,omitempty"`
Text string `json:"text"`
}
Represents a text segment within a message or artifact.
type TransportProtocol ¶ added in v0.8.0
type TransportProtocol string
Supported A2A transport protocols.
const ( TransportProtocolGrpc TransportProtocol = "GRPC" TransportProtocolHttpjson TransportProtocol = "HTTP+JSON" TransportProtocolJSONRPC TransportProtocol = "JSONRPC" )
TransportProtocol enum values
type UnsupportedOperationError ¶
type UnsupportedOperationError struct {
Code int `json:"code"`
Data *any `json:"data,omitempty"`
Message string `json:"message"`
}
An A2A-specific error indicating that the requested operation is not supported by the agent.