a2a 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.agent-docs/ROADMAP.md +423 -0
- data/.agent-docs/index.md +124 -0
- data/.agent-docs/llms.txt +318 -0
- data/.agent-docs/specification/json.json +2575 -0
- data/.agent-docs/specification.md +1924 -0
- data/.agent-docs/topics/a2a-and-mcp.md +132 -0
- data/.agent-docs/topics/agent-discovery.md +96 -0
- data/.agent-docs/topics/enterprise-ready.md +139 -0
- data/.agent-docs/topics/extensions.md +260 -0
- data/.agent-docs/topics/key-concepts.md +99 -0
- data/.agent-docs/topics/life-of-a-task.md +255 -0
- data/.agent-docs/topics/streaming-and-async.md +111 -0
- data/.agent-docs/topics/what-is-a2a.md +218 -0
- data/.agent-docs/tutorials/index.md +31 -0
- data/.agent-docs/tutorials/python/1-introduction.md +32 -0
- data/.agent-docs/tutorials/python/2-setup.md +55 -0
- data/.agent-docs/tutorials/python/3-agent-skills-and-card.md +48 -0
- data/.agent-docs/tutorials/python/4-agent-executor.md +57 -0
- data/.agent-docs/tutorials/python/5-start-server.md +55 -0
- data/.agent-docs/tutorials/python/6-interact-with-server.md +95 -0
- data/.agent-docs/tutorials/python/7-streaming-and-multiturn.md +97 -0
- data/.agent-docs/tutorials/python/8-next-steps.md +40 -0
- data/.agent-docs/types.ts +1544 -0
- data/.agent-docs/types_mapping.md +196 -0
- data/.claude/commands/gemfile/update.md +52 -0
- data/.claude/settings.local.json +23 -0
- data/.tool-versions +1 -1
- data/CHANGELOG.md +68 -1
- data/CLAUDE.md +98 -0
- data/README.md +20 -14
- data/Rakefile +1 -3
- data/WARP.md +115 -0
- data/lib/a2a/extensions/json_deserialization.rb +1 -3
- data/lib/a2a/types/agent_capabilities.rb +3 -0
- data/lib/a2a/types/agent_card.rb +49 -17
- data/lib/a2a/types/agent_card_signature.rb +17 -0
- data/lib/a2a/types/agent_extension.rb +19 -0
- data/lib/a2a/types/agent_interface.rb +13 -0
- data/lib/a2a/types/agent_provider.rb +2 -2
- data/lib/a2a/types/agent_skill.rb +11 -4
- data/lib/a2a/types/api_key_security_scheme.rb +15 -0
- data/lib/a2a/types/artifact.rb +10 -15
- data/lib/a2a/types/authenticated_extended_card_not_configured_error.rb +43 -0
- data/lib/a2a/types/authorization_code_oauth_flow.rb +22 -0
- data/lib/a2a/types/cancel_task_request.rb +5 -2
- data/lib/a2a/types/cancel_task_response.rb +3 -3
- data/lib/a2a/types/client_credentials_oauth_flow.rb +16 -0
- data/lib/a2a/types/content_type_not_supported_error.rb +42 -0
- data/lib/a2a/types/data_part.rb +5 -8
- data/lib/a2a/types/delete_task_push_notification_config_params.rb +9 -0
- data/lib/a2a/types/delete_task_push_notification_config_request.rb +18 -0
- data/lib/a2a/types/delete_task_push_notification_config_response.rb +13 -0
- data/lib/a2a/types/error.rb +19 -0
- data/lib/a2a/types/error_codes.rb +6 -0
- data/lib/a2a/types/file_base.rb +12 -0
- data/lib/a2a/types/file_part.rb +7 -9
- data/lib/a2a/types/file_with_bytes.rb +9 -0
- data/lib/a2a/types/file_with_uri.rb +9 -0
- data/lib/a2a/types/get_authenticated_extended_card_request.rb +15 -0
- data/lib/a2a/types/get_authenticated_extended_card_response.rb +13 -0
- data/lib/a2a/types/get_task_push_notification_config_params.rb +9 -0
- data/lib/a2a/types/get_task_push_notification_config_request.rb +21 -0
- data/lib/a2a/types/get_task_push_notification_request.rb +5 -2
- data/lib/a2a/types/get_task_push_notification_response.rb +4 -4
- data/lib/a2a/types/get_task_request.rb +5 -2
- data/lib/a2a/types/get_task_response.rb +3 -3
- data/lib/a2a/types/http_auth_security_scheme.rb +18 -0
- data/lib/a2a/types/implicit_oauth_flow.rb +16 -0
- data/lib/a2a/types/invalid_agent_response_error.rb +41 -0
- data/lib/a2a/types/list_task_push_notification_config_params.rb +8 -0
- data/lib/a2a/types/list_task_push_notification_config_request.rb +18 -0
- data/lib/a2a/types/list_task_push_notification_config_response.rb +13 -0
- data/lib/a2a/types/message.rb +24 -4
- data/lib/a2a/types/message_send_configuration.rb +20 -0
- data/lib/a2a/types/message_send_params.rb +16 -0
- data/lib/a2a/types/mutual_tls_security_scheme.rb +9 -0
- data/lib/a2a/types/oauth2_security_scheme.rb +16 -0
- data/lib/a2a/types/oauth_flows.rb +20 -0
- data/lib/a2a/types/openid_connect_security_scheme.rb +12 -0
- data/lib/a2a/types/part.rb +2 -1
- data/lib/a2a/types/part_base.rb +9 -0
- data/lib/a2a/types/password_oauth_flow.rb +16 -0
- data/lib/a2a/types/push_notification_authentication_info.rb +12 -0
- data/lib/a2a/types/push_notification_config.rb +11 -6
- data/lib/a2a/types/push_notification_not_supported_error.rb +37 -10
- data/lib/a2a/types/request.rb +15 -0
- data/lib/a2a/types/security_scheme.rb +11 -0
- data/lib/a2a/types/security_scheme_base.rb +9 -0
- data/lib/a2a/types/send_message_request.rb +18 -0
- data/lib/a2a/types/send_message_response.rb +13 -0
- data/lib/a2a/types/send_streaming_message_request.rb +18 -0
- data/lib/a2a/types/send_streaming_message_response.rb +15 -0
- data/lib/a2a/types/set_task_push_notification_config_request.rb +18 -0
- data/lib/a2a/types/set_task_push_notification_request.rb +5 -2
- data/lib/a2a/types/set_task_push_notification_response.rb +4 -4
- data/lib/a2a/types/task.rb +15 -11
- data/lib/a2a/types/task_artifact_update_event.rb +18 -7
- data/lib/a2a/types/task_not_cancelable_error.rb +37 -10
- data/lib/a2a/types/task_not_found_error.rb +37 -10
- data/lib/a2a/types/task_resubscription_request.rb +5 -2
- data/lib/a2a/types/task_state.rb +2 -1
- data/lib/a2a/types/task_status_update_event.rb +13 -6
- data/lib/a2a/types/text_part.rb +5 -8
- data/lib/a2a/types/transport_protocol.rb +6 -0
- data/lib/a2a/types/unsupported_operation_error.rb +37 -10
- data/lib/a2a/types.rb +13 -0
- data/lib/a2a/version.rb +1 -1
- data/lib/a2a.rb +15 -5
- metadata +101 -19
- data/lib/a2a/types/agent_authentication.rb +0 -13
- data/lib/a2a/types/authentication_info.rb +0 -9
- data/lib/a2a/types/file_content.rb +0 -18
- data/lib/a2a/types/internal_error.rb +0 -15
- data/lib/a2a/types/invalid_params_error.rb +0 -15
- data/lib/a2a/types/invalid_request_error.rb +0 -15
- data/lib/a2a/types/json_parse_error.rb +0 -15
- data/lib/a2a/types/jsonrpc_error.rb +0 -15
- data/lib/a2a/types/jsonrpc_message.rb +0 -12
- data/lib/a2a/types/jsonrpc_request.rb +0 -15
- data/lib/a2a/types/jsonrpc_response.rb +0 -12
- data/lib/a2a/types/method_not_found_error.rb +0 -15
- data/lib/a2a/types/send_task_request.rb +0 -15
- data/lib/a2a/types/send_task_response.rb +0 -13
- data/lib/a2a/types/send_task_streaming_request.rb +0 -15
- data/lib/a2a/types/send_task_streaming_response.rb +0 -15
- data/lib/a2a/types/task_send_params.rb +0 -26
@@ -0,0 +1,1924 @@
|
|
1
|
+
# Agent2Agent (A2A) Protocol Official Specification
|
2
|
+
|
3
|
+
{% macro render_spec_tabs(region_tag) %}
|
4
|
+
=== "JSON-RPC"
|
5
|
+
|
6
|
+
```ts { .no-copy }
|
7
|
+
--8<-- "types/src/types.ts:{{ region_tag }}"
|
8
|
+
```
|
9
|
+
|
10
|
+
=== "gRPC"
|
11
|
+
|
12
|
+
```proto { .no-copy }
|
13
|
+
--8<-- "specification/grpc/a2a.proto:{{ region_tag }}"
|
14
|
+
```
|
15
|
+
{% endmacro %}
|
16
|
+
|
17
|
+
**Version:** [`0.3.0`](https://github.com/a2aproject/A2A/releases/tag/v0.3.0)
|
18
|
+
|
19
|
+
See [Release Notes](https://github.com/a2aproject/A2A/releases) for changes made between versions.
|
20
|
+
|
21
|
+
## 1. Introduction
|
22
|
+
|
23
|
+
The Agent2Agent (A2A) Protocol is an open standard designed to facilitate communication and interoperability between independent, potentially opaque AI agent systems. In an ecosystem where agents might be built using different frameworks, languages, or by different vendors, A2A provides a common language and interaction model.
|
24
|
+
|
25
|
+
This document provides the detailed technical specification for the A2A protocol. Its primary goal is to enable agents to:
|
26
|
+
|
27
|
+
- Discover each other's capabilities.
|
28
|
+
- Negotiate interaction modalities (text, files, structured data).
|
29
|
+
- Manage collaborative tasks.
|
30
|
+
- Securely exchange information to achieve user goals **without needing access to each other's internal state, memory, or tools.**
|
31
|
+
|
32
|
+
### 1.1. Key Goals of A2A
|
33
|
+
|
34
|
+
- **Interoperability:** Bridge the communication gap between disparate agentic systems.
|
35
|
+
- **Collaboration:** Enable agents to delegate tasks, exchange context, and work together on complex user requests.
|
36
|
+
- **Discovery:** Allow agents to dynamically find and understand the capabilities of other agents.
|
37
|
+
- **Flexibility:** Support various interaction modes including synchronous request/response, streaming for real-time updates, and asynchronous push notifications for long-running tasks.
|
38
|
+
- **Security:** Facilitate secure communication patterns suitable for enterprise environments, relying on standard web security practices.
|
39
|
+
- **Asynchronicity:** Natively support long-running tasks and interactions that may involve human-in-the-loop scenarios.
|
40
|
+
|
41
|
+
### 1.2. Guiding Principles
|
42
|
+
|
43
|
+
- **Simple:** Reuse existing, well-understood standards (HTTP, JSON-RPC 2.0, Server-Sent Events).
|
44
|
+
- **Enterprise Ready:** Address authentication, authorization, security, privacy, tracing, and monitoring by aligning with established enterprise practices.
|
45
|
+
- **Async First:** Designed for (potentially very) long-running tasks and human-in-the-loop interactions.
|
46
|
+
- **Modality Agnostic:** Support exchange of diverse content types including text, audio/video (via file references), structured data/forms, and potentially embedded UI components (e.g., iframes referenced in parts).
|
47
|
+
- **Opaque Execution:** Agents collaborate based on declared capabilities and exchanged information, without needing to share their internal thoughts, plans, or tool implementations.
|
48
|
+
|
49
|
+
For a broader understanding of A2A's purpose and benefits, see [What is A2A?](./topics/what-is-a2a.md).
|
50
|
+
|
51
|
+
## 2. Core Concepts Summary
|
52
|
+
|
53
|
+
A2A revolves around several key concepts. For detailed explanations, please refer to the [Key Concepts guide](./topics/key-concepts.md).
|
54
|
+
|
55
|
+
- **A2A Client:** An application or agent that initiates requests to an A2A Server on behalf of a user or another system.
|
56
|
+
- **A2A Server (Remote Agent):** An agent or agentic system that exposes an A2A-compliant HTTP endpoint, processing tasks and providing responses.
|
57
|
+
- **Agent Card:** A JSON metadata document published by an A2A Server, describing its identity, capabilities, skills, service endpoint, and authentication requirements.
|
58
|
+
- **Message:** A communication turn between a client and a remote agent, having a `role` ("user" or "agent") and containing one or more `Parts`.
|
59
|
+
- **Task:** The fundamental unit of work managed by A2A, identified by a unique ID. Tasks are stateful and progress through a defined lifecycle.
|
60
|
+
- **Part:** The smallest unit of content within a Message or Artifact (e.g., `TextPart`, `FilePart`, `DataPart`).
|
61
|
+
- **Artifact:** An output (e.g., a document, image, structured data) generated by the agent as a result of a task, composed of `Parts`.
|
62
|
+
- **Streaming (SSE):** Real-time, incremental updates for tasks (status changes, artifact chunks) delivered via Server-Sent Events.
|
63
|
+
- **Push Notifications:** Asynchronous task updates delivered via server-initiated HTTP POST requests to a client-provided webhook URL, for long-running or disconnected scenarios.
|
64
|
+
- **Context:** An optional, server-generated identifier to logically group related tasks.
|
65
|
+
- **Extension:** A mechanism for agents to provide additional functionality or data beyond the core A2A specification.
|
66
|
+
|
67
|
+
## 3. Transport and Format
|
68
|
+
|
69
|
+
### 3.1. Transport Layer Requirements
|
70
|
+
|
71
|
+
A2A supports multiple transport protocols, all operating over **HTTP(S)**. Agents have flexibility in choosing which transport protocols to implement based on their specific requirements and use cases:
|
72
|
+
|
73
|
+
- A2A communication **MUST** occur over **HTTP(S)**.
|
74
|
+
- The A2A Server exposes its service at one or more URLs defined in its `AgentCard`.
|
75
|
+
- Agents **MUST** implement at least one of the three core transport protocols defined in this specification.
|
76
|
+
- All supported transport protocols are considered equal in status and capability.
|
77
|
+
|
78
|
+
### 3.2. Supported Transport Protocols
|
79
|
+
|
80
|
+
A2A defines three core transport protocols. **A2A-compliant agents SHOULD implement at least one of these transport protocols. They MAY be compliant implementing a transport extension as defined in [3.2.4](#324-transport-extensions)** All three protocols are considered equal in status, and agents may choose to implement any combination of them based on their requirements.
|
81
|
+
|
82
|
+
#### 3.2.1. JSON-RPC 2.0 Transport
|
83
|
+
|
84
|
+
Agents **MAY** support JSON-RPC 2.0 transport. If implemented, it **MUST** conform to these requirements:
|
85
|
+
|
86
|
+
- The primary data format is **[JSON-RPC 2.0](https://www.jsonrpc.org/specification)** for all requests and responses (excluding SSE stream wrapper).
|
87
|
+
- Client requests and server responses **MUST** adhere to the JSON-RPC 2.0 specification.
|
88
|
+
- The `Content-Type` header for HTTP requests and responses containing JSON-RPC payloads **MUST** be `application/json`.
|
89
|
+
- Method names follow the pattern `{category}/{action}` (e.g., `"message/send"`, `"tasks/get"`).
|
90
|
+
|
91
|
+
#### 3.2.2. gRPC Transport
|
92
|
+
|
93
|
+
Agents **MAY** support gRPC transport. If implemented, it **MUST** conform to these requirements:
|
94
|
+
|
95
|
+
- **Protocol Definition**: **MUST** use the normative Protocol Buffers definition in [`specification/grpc/a2a.proto`](https://github.com/a2aproject/A2A/blob/main/specification/grpc/a2a.proto).
|
96
|
+
- **Message Serialization**: **MUST** use Protocol Buffers version 3 for message serialization.
|
97
|
+
- **Service Definition**: **MUST** implement the `A2AService` gRPC service as defined in the proto file.
|
98
|
+
- **Method Coverage**: **MUST** provide all methods with functionally equivalent behavior to other supported transports.
|
99
|
+
- **Field Mapping**: **MUST** use the `json_name` annotations for HTTP/JSON transcoding compatibility.
|
100
|
+
- **Error Handling**: **MUST** map A2A error codes to appropriate gRPC status codes as defined in the proto annotations.
|
101
|
+
- **Transport Security**: **MUST** support TLS encryption (gRPC over HTTP/2 with TLS).
|
102
|
+
|
103
|
+
#### 3.2.3. HTTP+JSON/REST Transport
|
104
|
+
|
105
|
+
Agents **MAY** support REST-style HTTP+JSON transport. If implemented, it **MUST** conform to these requirements:
|
106
|
+
|
107
|
+
- **HTTP Methods**: **MUST** use appropriate HTTP verbs (GET for queries, POST for actions, PUT for updates, DELETE for removal).
|
108
|
+
- **URL Patterns**: **MUST** follow the URL patterns documented in each method section (e.g., `/v1/message:send`, `/v1/tasks/{id}`).
|
109
|
+
- **Content-Type**: **MUST** use `application/json` for request and response bodies.
|
110
|
+
- **HTTP Status Codes**: **MUST** use appropriate HTTP status codes (200, 400, 401, 403, 404, 500, etc.) that correspond to A2A error types.
|
111
|
+
- **Request/Response Format**: **MUST** use JSON objects that are structurally equivalent to the core A2A data structures.
|
112
|
+
- **Method Coverage**: **MUST** provide all methods with functionally equivalent behavior to other supported transports.
|
113
|
+
- **Error Format**: **MUST** return error responses in a consistent JSON format that maps to A2A error types.
|
114
|
+
|
115
|
+
#### 3.2.4. Transport Extensions
|
116
|
+
|
117
|
+
Additional transport protocols **MAY** be defined as extensions to the core A2A specification. Such extensions:
|
118
|
+
|
119
|
+
- **MUST** maintain functional equivalence with the core transports
|
120
|
+
- **MUST** use clear namespace identifiers to avoid conflicts
|
121
|
+
- **MUST** be clearly documented and specified
|
122
|
+
- **SHOULD** provide migration paths from core transports
|
123
|
+
|
124
|
+
### 3.3. Streaming Transport (Server-Sent Events)
|
125
|
+
|
126
|
+
Streaming capabilities are **transport-specific**:
|
127
|
+
|
128
|
+
#### 3.3.1. JSON-RPC 2.0 Streaming
|
129
|
+
|
130
|
+
When streaming is used for methods like `message/stream` or `tasks/resubscribe`:
|
131
|
+
|
132
|
+
- The server responds with an HTTP `200 OK` status and a `Content-Type` header of `text/event-stream`.
|
133
|
+
- The body of this HTTP response contains a stream of **[Server-Sent Events (SSE)](https://html.spec.whatwg.org/multipage/server-sent-events.html#server-sent-events)** as defined by the W3C.
|
134
|
+
- Each SSE `data` field contains a complete JSON-RPC 2.0 Response object (specifically, a [`SendStreamingMessageResponse`](#721-sendstreamingmessageresponse-object)).
|
135
|
+
|
136
|
+
#### 3.3.2. gRPC Streaming
|
137
|
+
|
138
|
+
gRPC transport uses **server streaming RPCs** for streaming operations as defined in the Protocol Buffers specification.
|
139
|
+
|
140
|
+
#### 3.3.3. HTTP+JSON/REST Streaming
|
141
|
+
|
142
|
+
If REST transport is supported it **MUST** implement streaming using Server-Sent Events similar to JSON-RPC.
|
143
|
+
|
144
|
+
### 3.4. Transport Compliance and Interoperability
|
145
|
+
|
146
|
+
#### 3.4.1. Functional Equivalence Requirements
|
147
|
+
|
148
|
+
When an agent supports multiple transports, all supported transports **MUST**:
|
149
|
+
|
150
|
+
- **Identical Functionality**: Provide the same set of operations and capabilities.
|
151
|
+
- **Consistent Behavior**: Return semantically equivalent results for the same requests.
|
152
|
+
- **Same Error Handling**: Map errors consistently across transports using the error codes defined in [Section 8](#8-error-handling).
|
153
|
+
- **Equivalent Authentication**: Support the same authentication schemes declared in the `AgentCard`.
|
154
|
+
|
155
|
+
#### 3.4.2. Transport Selection and Negotiation
|
156
|
+
|
157
|
+
- **Agent Declaration**: Agents **MUST** declare all supported transports in their `AgentCard` using the `preferredTransport` and `additionalInterfaces` fields.
|
158
|
+
- **Client Choice**: Clients **MAY** choose any transport declared by the agent.
|
159
|
+
- **No Transport Negotiation**: A2A does not define a dynamic transport negotiation protocol. Clients select a transport based on the static `AgentCard` information.
|
160
|
+
- **Fallback Behavior**: Clients **SHOULD** implement fallback logic to try alternative transports if their preferred transport fails. The specific fallback strategy is implementation-dependent.
|
161
|
+
|
162
|
+
#### 3.4.3. Transport-Specific Extensions
|
163
|
+
|
164
|
+
Transports **MAY** provide transport-specific optimizations or extensions that do not compromise functional equivalence:
|
165
|
+
|
166
|
+
- **gRPC**: May leverage gRPC-specific features like bidirectional streaming, metadata, or custom status codes.
|
167
|
+
- **REST**: May provide additional HTTP caching headers or support HTTP conditional requests.
|
168
|
+
- **JSON-RPC**: May include additional fields in the JSON-RPC request/response objects that do not conflict with the core specification.
|
169
|
+
|
170
|
+
Such extensions **MUST** be backward-compatible and **MUST NOT** break interoperability with clients that do not support the extensions.
|
171
|
+
|
172
|
+
### 3.5. Method Mapping and Naming Conventions
|
173
|
+
|
174
|
+
To ensure consistency and predictability across different transports, A2A defines normative method mapping rules.
|
175
|
+
|
176
|
+
#### 3.5.1. JSON-RPC Method Naming
|
177
|
+
|
178
|
+
JSON-RPC methods **MUST** follow the pattern: `{category}/{action}` where:
|
179
|
+
|
180
|
+
- `category` represents the resource type (e.g., "message", "tasks", "agent")
|
181
|
+
- `action` represents the operation (e.g., "send", "get", "cancel")
|
182
|
+
- Nested actions use forward slashes (e.g., "tasks/pushNotificationConfig/set")
|
183
|
+
|
184
|
+
#### 3.5.2. gRPC Method Naming
|
185
|
+
|
186
|
+
gRPC methods **MUST** follow Protocol Buffers service conventions using PascalCase:
|
187
|
+
|
188
|
+
- Convert JSON-RPC category/action to PascalCase compound words
|
189
|
+
- Use standard gRPC method prefixes (Get, Set, List, Create, Delete, Cancel)
|
190
|
+
|
191
|
+
#### 3.5.3. HTTP+JSON/REST Method Naming
|
192
|
+
|
193
|
+
REST endpoints **MUST** follow RESTful URL patterns with appropriate HTTP verbs:
|
194
|
+
|
195
|
+
- Use resource-based URLs: `/v1/{resource}[/{id}][:{action}]`
|
196
|
+
- Use standard HTTP methods aligned with REST semantics
|
197
|
+
- Use colon notation for non-CRUD actions
|
198
|
+
|
199
|
+
#### 3.5.4. Method Mapping Compliance
|
200
|
+
|
201
|
+
When implementing multiple transports, agents **MUST**:
|
202
|
+
|
203
|
+
- **Use standard mappings**: Follow the method mappings defined in sections 3.5.2 and 3.5.3.
|
204
|
+
- **Maintain functional equivalence**: Each transport-specific method **MUST** provide identical functionality across all supported transports.
|
205
|
+
- **Consistent parameters**: Use equivalent parameter structures across transports (accounting for transport-specific serialization differences).
|
206
|
+
- **Equivalent responses**: Return semantically equivalent responses across all transports for the same operation.
|
207
|
+
|
208
|
+
#### 3.5.5. Extension Method Naming
|
209
|
+
|
210
|
+
For custom or extension methods not defined in the core A2A specification:
|
211
|
+
|
212
|
+
- **JSON-RPC**: Follow the `{category}/{action}` pattern with a clear namespace (e.g., `myorg.extension/action`)
|
213
|
+
- **gRPC**: Use appropriate service and method names following Protocol Buffers conventions
|
214
|
+
- **REST**: Use clear resource-based URLs with appropriate HTTP methods
|
215
|
+
|
216
|
+
Extension methods **MUST** be clearly documented and **MUST NOT** conflict with core A2A method names or semantics.
|
217
|
+
|
218
|
+
#### 3.5.6. Method Mapping Reference Table
|
219
|
+
|
220
|
+
For quick reference, the following table summarizes the method mappings across all transports:
|
221
|
+
|
222
|
+
| JSON-RPC Method | gRPC Method | REST Endpoint | Description |
|
223
|
+
|:----------------|:------------|:--------------|:------------|
|
224
|
+
| `message/send` | `SendMessage` | `POST /v1/message:send` | Send message to agent |
|
225
|
+
| `message/stream` | `SendStreamingMessage` | `POST /v1/message:stream` | Send message with streaming |
|
226
|
+
| `tasks/get` | `GetTask` | `GET /v1/tasks/{id}` | Get task status |
|
227
|
+
| `tasks/list` | `ListTask` | `GET /v1/tasks` | List tasks (gRPC/REST only) |
|
228
|
+
| `tasks/cancel` | `CancelTask` | `POST /v1/tasks/{id}:cancel` | Cancel task |
|
229
|
+
| `tasks/resubscribe` | `TaskSubscription` | `POST /v1/tasks/{id}:subscribe` | Resume task streaming |
|
230
|
+
| `tasks/pushNotificationConfig/set` | `CreateTaskPushNotification` | `POST /v1/tasks/{id}/pushNotificationConfigs` | Set push notification config |
|
231
|
+
| `tasks/pushNotificationConfig/get` | `GetTaskPushNotification` | `GET /v1/tasks/{id}/pushNotificationConfigs/{configId}` | Get push notification config |
|
232
|
+
| `tasks/pushNotificationConfig/list` | `ListTaskPushNotification` | `GET /v1/tasks/{id}/pushNotificationConfigs` | List push notification configs |
|
233
|
+
| `tasks/pushNotificationConfig/delete` | `DeleteTaskPushNotification` | `DELETE /v1/tasks/{id}/pushNotificationConfigs/{configId}` | Delete push notification config |
|
234
|
+
| `agent/getAuthenticatedExtendedCard` | `GetAgentCard` | `GET /v1/card` | Get authenticated agent card |
|
235
|
+
|
236
|
+
## 4. Authentication and Authorization
|
237
|
+
|
238
|
+
A2A treats agents as standard enterprise applications, relying on established web security practices. Identity information is **not** transmitted within A2A JSON-RPC payloads; it is handled at the HTTP transport layer.
|
239
|
+
|
240
|
+
For a comprehensive guide on enterprise security aspects, see [Enterprise-Ready Features](./topics/enterprise-ready.md).
|
241
|
+
|
242
|
+
### 4.1. Transport Security
|
243
|
+
|
244
|
+
As stated in section 3.1, production deployments **MUST** use HTTPS. Implementations **SHOULD** use modern [TLS](https://datatracker.ietf.org/doc/html/rfc8446) configurations (TLS 1.3+ recommended) with strong cipher suites.
|
245
|
+
|
246
|
+
### 4.2. Server Identity Verification
|
247
|
+
|
248
|
+
A2A Clients **SHOULD** verify the A2A Server's identity by validating its TLS certificate against trusted certificate authorities (CAs) during the TLS handshake.
|
249
|
+
|
250
|
+
### 4.3. Client/User Identity & Authentication Process
|
251
|
+
|
252
|
+
1. **Discovery of Requirements:** The client discovers the server's required authentication schemes via the `authentication` field in the [`AgentCard`](#55-agentcard-object-structure). Scheme names often align with [OpenAPI Authentication methods](https://swagger.io/docs/specification/authentication/) (e.g., "Bearer" for OAuth 2.0 tokens, "Basic" for Basic Auth, "ApiKey" for API keys).
|
253
|
+
2. **Credential Acquisition (Out-of-Band):** The client obtains the necessary credentials (e.g., API keys, OAuth tokens, JWTs) through an **out-of-band process** specific to the required authentication scheme and the identity provider. This process is outside the scope of the A2A protocol itself.
|
254
|
+
3. **Credential Transmission:** The client includes these credentials in the appropriate [HTTP headers](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers) (e.g., `Authorization: Bearer <token>`, `X-API-Key: <value>`) of every A2A request sent to the server.
|
255
|
+
|
256
|
+
### 4.4. Server Responsibilities for Authentication
|
257
|
+
|
258
|
+
The A2A Server:
|
259
|
+
|
260
|
+
- **MUST** authenticate every incoming request based on the provided HTTP credentials and its declared authentication requirements from its Agent Card.
|
261
|
+
- **SHOULD** use standard HTTP status codes like [`401 Unauthorized`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/401) or [`403 Forbidden`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/403) for authentication challenges or rejections.
|
262
|
+
- **SHOULD** include relevant HTTP headers (e.g., [`WWW-Authenticate`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/WWW-Authenticate)) with `401 Unauthorized` responses to indicate the required authentication scheme(s), guiding the client.
|
263
|
+
- **SHOULD** verify the Client's webhook server identity by validating its TLS certificate against trusted certificate authorities (CAs) during the TLS handshake.
|
264
|
+
|
265
|
+
### 4.5. In-Task Authentication (Secondary Credentials)
|
266
|
+
|
267
|
+
If an agent, during the execution of a task, requires _additional_ credentials for a _different_ system or resource (e.g., to access a specific tool on behalf of the user that requires its own auth):
|
268
|
+
|
269
|
+
1. It **SHOULD** transition the A2A task to the `auth-required` state (see [`TaskState`](#63-taskstate-enum)).
|
270
|
+
2. The accompanying `TaskStatus.message` (often a [`DataPart`](#653-datapart-object)) **SHOULD** provide details about the required secondary authentication, potentially using an [`PushNotificationAuthenticationInfo`](#69-pushnotificationauthenticationinfo-object)-like structure to describe the need.
|
271
|
+
3. The A2A Client then obtains these new credentials out-of-band and provides them in a subsequent [`message/send`](#71-messagesend) or [`message/stream`](#72-messagestream) request. How these credentials are used (e.g., passed as data within the A2A message if the agent is proxying, or used by the client to interact directly with the secondary system) depends on the specific scenario.
|
272
|
+
|
273
|
+
### 4.6. Authorization
|
274
|
+
|
275
|
+
Once a client is authenticated, the A2A Server is responsible for authorizing the request based on the authenticated client/user identity and its own policies. Authorization logic is implementation-specific and MAY be enforced based on:
|
276
|
+
|
277
|
+
- The specific skills requested (e.g., as identified by `AgentSkill.id` from the Agent Card).
|
278
|
+
- The actions attempted within the task.
|
279
|
+
- Data access policies relevant to the resources the agent manages.
|
280
|
+
- OAuth scopes associated with the presented token, if applicable.
|
281
|
+
|
282
|
+
Servers should implement the principle of least privilege.
|
283
|
+
|
284
|
+
## 5. Agent Discovery: The Agent Card
|
285
|
+
|
286
|
+
### 5.1. Purpose
|
287
|
+
|
288
|
+
A2A Servers **MUST** make an Agent Card available. The Agent Card is a JSON document that describes the server's identity, capabilities, skills, service endpoint URL, and how clients should authenticate and interact with it. Clients use this information for discovering suitable agents and for configuring their interactions.
|
289
|
+
|
290
|
+
For more on discovery strategies, see the [Agent Discovery guide](./topics/agent-discovery.md).
|
291
|
+
|
292
|
+
### 5.2. Discovery Mechanisms
|
293
|
+
|
294
|
+
Clients can find Agent Cards through various methods, including but not limited to:
|
295
|
+
|
296
|
+
- **Well-Known URI:** Accessing a predefined path on the agent's domain (see [Section 5.3](#53-recommended-location)).
|
297
|
+
- **Registries/Catalogs:** Querying curated catalogs or registries of agents (which might be enterprise-specific, public, or domain-specific).
|
298
|
+
- **Direct Configuration:** Clients may be pre-configured with the Agent Card URL or the card content itself.
|
299
|
+
|
300
|
+
### 5.3. Recommended Location
|
301
|
+
|
302
|
+
If using the well-known URI strategy, the recommended location for an agent's Agent Card is:
|
303
|
+
`https://{server_domain}/.well-known/agent-card.json`
|
304
|
+
This follows the principles of [RFC 8615](https://datatracker.ietf.org/doc/html/rfc8615) for well-known URIs.
|
305
|
+
|
306
|
+
### 5.4. Security of Agent Cards
|
307
|
+
|
308
|
+
Agent Cards themselves might contain information that is considered sensitive.
|
309
|
+
|
310
|
+
- If an Agent Card contains sensitive information, the endpoint serving the card **MUST** be protected by appropriate access controls (e.g., mTLS, network restrictions, authentication required to fetch the card).
|
311
|
+
- It is generally **NOT RECOMMENDED** to include plaintext secrets (like static API keys) directly in an Agent Card. Prefer authentication schemes where clients obtain dynamic credentials out-of-band.
|
312
|
+
|
313
|
+
### 5.5. `AgentCard` Object Structure
|
314
|
+
|
315
|
+
{{ render_spec_tabs('AgentCard') }}
|
316
|
+
|
317
|
+
#### 5.5.1. `AgentProvider` Object
|
318
|
+
|
319
|
+
Information about the organization or entity providing the agent.
|
320
|
+
|
321
|
+
{{ render_spec_tabs('AgentProvider') }}
|
322
|
+
|
323
|
+
#### 5.5.2. `AgentCapabilities` Object
|
324
|
+
|
325
|
+
Specifies optional A2A protocol features supported by the agent.
|
326
|
+
|
327
|
+
{{ render_spec_tabs('AgentCapabilities') }}
|
328
|
+
|
329
|
+
#### 5.5.2.1. `AgentExtension` Object
|
330
|
+
|
331
|
+
Specifies an extension to the A2A protocol supported by the agent.
|
332
|
+
|
333
|
+
{{ render_spec_tabs('AgentExtension') }}
|
334
|
+
|
335
|
+
#### 5.5.3. `SecurityScheme` Object
|
336
|
+
|
337
|
+
Describes the authentication requirements for accessing the agent's `url` endpoint. Refer [Sample Agent Card](#57-sample-agent-card) for an example.
|
338
|
+
|
339
|
+
{{ render_spec_tabs('SecurityScheme') }}
|
340
|
+
|
341
|
+
#### 5.5.4. `AgentSkill` Object
|
342
|
+
|
343
|
+
Describes a specific capability, function, or area of expertise the agent can perform or address.
|
344
|
+
|
345
|
+
{{ render_spec_tabs('AgentSkill') }}
|
346
|
+
|
347
|
+
#### 5.5.5. `AgentInterface` Object
|
348
|
+
|
349
|
+
Provides a declaration of a combination of the target URL and the supported transport to interact with the agent. This enables agents to expose the same functionality through multiple transport protocols.
|
350
|
+
|
351
|
+
```ts { .no-copy }
|
352
|
+
--8<-- "types/src/types.ts:TransportProtocol"
|
353
|
+
```
|
354
|
+
|
355
|
+
{{ render_spec_tabs('AgentInterface') }}
|
356
|
+
|
357
|
+
The `transport` field **SHOULD** use one of the core A2A transport protocol values:
|
358
|
+
|
359
|
+
- `"JSONRPC"`: JSON-RPC 2.0 over HTTP
|
360
|
+
- `"GRPC"`: gRPC over HTTP/2
|
361
|
+
- `"HTTP+JSON"`: REST-style HTTP with JSON
|
362
|
+
|
363
|
+
Additional transport values **MAY** be used for future extensions, but such extensions **MUST** not conflict with core A2A protocol functionality.
|
364
|
+
|
365
|
+
#### 5.5.6. `AgentCardSignature` Object
|
366
|
+
|
367
|
+
Represents a JSON Web Signature (JWS) used to verify the integrity of the AgentCard.
|
368
|
+
|
369
|
+
{{ render_spec_tabs('AgentCardSignature') }}
|
370
|
+
|
371
|
+
### 5.6. Transport Declaration and URL Relationships
|
372
|
+
|
373
|
+
The AgentCard **MUST** properly declare the relationship between URLs and transport protocols:
|
374
|
+
|
375
|
+
#### 5.6.1. Main URL and Preferred Transport
|
376
|
+
|
377
|
+
- **Main URL requirement**: The `url` field **MUST** specify the primary endpoint for the agent.
|
378
|
+
- **Transport correspondence**: The transport protocol available at the main `url` **MUST** match the `preferredTransport` field.
|
379
|
+
- **Required declaration**: The `preferredTransport` field is **REQUIRED** and **MUST** be present in every `AgentCard`.
|
380
|
+
- **Transport availability**: The main `url` **MUST** support the transport protocol declared in `preferredTransport`.
|
381
|
+
|
382
|
+
#### 5.6.2. Additional Interfaces
|
383
|
+
|
384
|
+
- **URL uniqueness**: Each `AgentInterface` in `additionalInterfaces` **SHOULD** specify a distinct URL for clarity, but **MAY** reuse URLs if multiple transport protocols are available at the same endpoint.
|
385
|
+
- **Transport declaration**: Each `AgentInterface` **MUST** accurately declare the transport protocol available at its specified URL.
|
386
|
+
- **Completeness**: The `additionalInterfaces` array **SHOULD** include all supported transports, including the main URL's transport for completeness.
|
387
|
+
|
388
|
+
#### 5.6.3. Client Transport Selection Rules
|
389
|
+
|
390
|
+
Clients **MUST** follow these rules when selecting a transport:
|
391
|
+
|
392
|
+
1. **Parse transport declarations**: Extract available transports from both the main `url`/`preferredTransport` combination and all `additionalInterfaces`.
|
393
|
+
2. **Prefer declared preference**: If the client supports the `preferredTransport`, it **SHOULD** use the main `url`.
|
394
|
+
3. **Fallback selection**: If the preferred transport is not supported by the client, it **MAY** select any supported transport from `additionalInterfaces`.
|
395
|
+
4. **Graceful degradation**: Clients **SHOULD** implement fallback logic to try alternative transports if their first choice fails.
|
396
|
+
5. **URL-transport matching**: Clients **MUST** use the correct URL for the selected transport protocol as declared in the AgentCard.
|
397
|
+
|
398
|
+
#### 5.6.4. Validation Requirements
|
399
|
+
|
400
|
+
Agent Cards **MUST** satisfy these validation requirements:
|
401
|
+
|
402
|
+
- **Transport consistency**: The `preferredTransport` value **MUST** be present and **MUST** be available at the main `url`.
|
403
|
+
- **Interface completeness**: If `additionalInterfaces` is provided, it **SHOULD** include an entry corresponding to the main `url` and `preferredTransport`.
|
404
|
+
- **No conflicts**: The same URL **MUST NOT** declare conflicting transport protocols across different interface declarations.
|
405
|
+
- **Minimum transport requirement**: The agent **MUST** declare at least one supported transport protocol through either the main `url`/`preferredTransport` combination or `additionalInterfaces`.
|
406
|
+
|
407
|
+
### 5.7. Sample Agent Card
|
408
|
+
|
409
|
+
```json
|
410
|
+
{
|
411
|
+
"protocolVersion": "0.2.9",
|
412
|
+
"name": "GeoSpatial Route Planner Agent",
|
413
|
+
"description": "Provides advanced route planning, traffic analysis, and custom map generation services. This agent can calculate optimal routes, estimate travel times considering real-time traffic, and create personalized maps with points of interest.",
|
414
|
+
"url": "https://georoute-agent.example.com/a2a/v1",
|
415
|
+
"preferredTransport": "JSONRPC",
|
416
|
+
"additionalInterfaces" : [
|
417
|
+
{"url": "https://georoute-agent.example.com/a2a/v1", "transport": "JSONRPC"},
|
418
|
+
{"url": "https://georoute-agent.example.com/a2a/grpc", "transport": "GRPC"},
|
419
|
+
{"url": "https://georoute-agent.example.com/a2a/json", "transport": "HTTP+JSON"}
|
420
|
+
],
|
421
|
+
"provider": {
|
422
|
+
"organization": "Example Geo Services Inc.",
|
423
|
+
"url": "https://www.examplegeoservices.com"
|
424
|
+
},
|
425
|
+
"iconUrl": "https://georoute-agent.example.com/icon.png",
|
426
|
+
"version": "1.2.0",
|
427
|
+
"documentationUrl": "https://docs.examplegeoservices.com/georoute-agent/api",
|
428
|
+
"capabilities": {
|
429
|
+
"streaming": true,
|
430
|
+
"pushNotifications": true,
|
431
|
+
"stateTransitionHistory": false
|
432
|
+
},
|
433
|
+
"securitySchemes": {
|
434
|
+
"google": {
|
435
|
+
"type": "openIdConnect",
|
436
|
+
"openIdConnectUrl": "https://accounts.google.com/.well-known/openid-configuration"
|
437
|
+
}
|
438
|
+
},
|
439
|
+
"security": [{ "google": ["openid", "profile", "email"] }],
|
440
|
+
"defaultInputModes": ["application/json", "text/plain"],
|
441
|
+
"defaultOutputModes": ["application/json", "image/png"],
|
442
|
+
"skills": [
|
443
|
+
{
|
444
|
+
"id": "route-optimizer-traffic",
|
445
|
+
"name": "Traffic-Aware Route Optimizer",
|
446
|
+
"description": "Calculates the optimal driving route between two or more locations, taking into account real-time traffic conditions, road closures, and user preferences (e.g., avoid tolls, prefer highways).",
|
447
|
+
"tags": ["maps", "routing", "navigation", "directions", "traffic"],
|
448
|
+
"examples": [
|
449
|
+
"Plan a route from '1600 Amphitheatre Parkway, Mountain View, CA' to 'San Francisco International Airport' avoiding tolls.",
|
450
|
+
"{\"origin\": {\"lat\": 37.422, \"lng\": -122.084}, \"destination\": {\"lat\": 37.7749, \"lng\": -122.4194}, \"preferences\": [\"avoid_ferries\"]}"
|
451
|
+
],
|
452
|
+
"inputModes": ["application/json", "text/plain"],
|
453
|
+
"outputModes": [
|
454
|
+
"application/json",
|
455
|
+
"application/vnd.geo+json",
|
456
|
+
"text/html"
|
457
|
+
]
|
458
|
+
},
|
459
|
+
{
|
460
|
+
"id": "custom-map-generator",
|
461
|
+
"name": "Personalized Map Generator",
|
462
|
+
"description": "Creates custom map images or interactive map views based on user-defined points of interest, routes, and style preferences. Can overlay data layers.",
|
463
|
+
"tags": ["maps", "customization", "visualization", "cartography"],
|
464
|
+
"examples": [
|
465
|
+
"Generate a map of my upcoming road trip with all planned stops highlighted.",
|
466
|
+
"Show me a map visualizing all coffee shops within a 1-mile radius of my current location."
|
467
|
+
],
|
468
|
+
"inputModes": ["application/json"],
|
469
|
+
"outputModes": [
|
470
|
+
"image/png",
|
471
|
+
"image/jpeg",
|
472
|
+
"application/json",
|
473
|
+
"text/html"
|
474
|
+
]
|
475
|
+
}
|
476
|
+
],
|
477
|
+
"supportsAuthenticatedExtendedCard": true,
|
478
|
+
"signatures": [
|
479
|
+
{
|
480
|
+
"protected": "eyJhbGciOiJFUzI1NiIsInR5cCI6IkpPU0UiLCJraWQiOiJrZXktMSIsImprdSI6Imh0dHBzOi8vZXhhbXBsZS5jb20vYWdlbnQvandrcy5qc29uIn0",
|
481
|
+
"signature": "QFdkNLNszlGj3z3u0YQGt_T9LixY3qtdQpZmsTdDHDe3fXV9y9-B3m2-XgCpzuhiLt8E0tV6HXoZKHv4GtHgKQ"
|
482
|
+
}
|
483
|
+
]
|
484
|
+
}
|
485
|
+
```
|
486
|
+
|
487
|
+
## 6. Protocol Data Objects
|
488
|
+
|
489
|
+
These objects define the structure of data exchanged within the JSON-RPC methods of the A2A protocol.
|
490
|
+
|
491
|
+
### 6.1. `Task` Object
|
492
|
+
|
493
|
+
Represents the stateful unit of work being processed by the A2A Server for an A2A Client. A task encapsulates the entire interaction related to a specific goal or request. A task which has reached a terminal state (completed, canceled, rejected, or failed) can't be restarted. Tasks in completed state SHOULD use artifacts for returning the generated output to the clients. For more information, refer to the [Life of a Task guide](./topics/life-of-a-task.md).
|
494
|
+
|
495
|
+
{{ render_spec_tabs('Task') }}
|
496
|
+
|
497
|
+
### 6.2. `TaskStatus` Object
|
498
|
+
|
499
|
+
Represents the current state and associated context (e.g., a message from the agent) of a `Task`.
|
500
|
+
|
501
|
+
{{ render_spec_tabs('TaskStatus') }}
|
502
|
+
|
503
|
+
### 6.3. `TaskState` Enum
|
504
|
+
|
505
|
+
Defines the possible lifecycle states of a `Task`.
|
506
|
+
|
507
|
+
{{ render_spec_tabs('TaskState') }}
|
508
|
+
|
509
|
+
### 6.4. `Message` Object
|
510
|
+
|
511
|
+
Represents a single communication turn or a piece of contextual information between a client and an agent. Messages are used for instructions, prompts, replies, and status updates.
|
512
|
+
|
513
|
+
{{ render_spec_tabs('Message') }}
|
514
|
+
|
515
|
+
### 6.5. `Part` Union Type
|
516
|
+
|
517
|
+
Represents a distinct piece of content within a `Message` or `Artifact`. A `Part` is a union type representing exportable content as either `TextPart`, `FilePart`, or `DataPart`. All `Part` types also include an optional `metadata` field (`Record<string, any>`) for part-specific metadata.
|
518
|
+
|
519
|
+
{{ render_spec_tabs('Part') }}
|
520
|
+
|
521
|
+
```ts { .no-copy }
|
522
|
+
--8<-- "types/src/types.ts:PartBase"
|
523
|
+
```
|
524
|
+
|
525
|
+
It **MUST** be one of the following:
|
526
|
+
|
527
|
+
#### 6.5.1. `TextPart` Object
|
528
|
+
|
529
|
+
For conveying plain textual content.
|
530
|
+
|
531
|
+
```ts { .no-copy }
|
532
|
+
--8<-- "types/src/types.ts:TextPart"
|
533
|
+
```
|
534
|
+
|
535
|
+
#### 6.5.2. `FilePart` Object
|
536
|
+
|
537
|
+
For conveying file-based content.
|
538
|
+
|
539
|
+
{{ render_spec_tabs('FilePart') }}
|
540
|
+
|
541
|
+
#### 6.5.3. `DataPart` Object
|
542
|
+
|
543
|
+
For conveying structured JSON data. Useful for forms, parameters, or any machine-readable information.
|
544
|
+
|
545
|
+
{{ render_spec_tabs('DataPart') }}
|
546
|
+
|
547
|
+
### 6.6 `FileBase` Object
|
548
|
+
|
549
|
+
Base entity for File Contents.
|
550
|
+
|
551
|
+
```ts { .no-copy }
|
552
|
+
--8<-- "types/src/types.ts:FileBase"
|
553
|
+
```
|
554
|
+
|
555
|
+
#### 6.6.1 `FileWithBytes` Object
|
556
|
+
|
557
|
+
Represents the data for a file, used within a `FilePart`.
|
558
|
+
|
559
|
+
```ts { .no-copy }
|
560
|
+
--8<-- "types/src/types.ts:FileWithBytes"
|
561
|
+
```
|
562
|
+
|
563
|
+
#### 6.6.2 `FileWithUri` Object
|
564
|
+
|
565
|
+
Represents the URI for a file, used within a `FilePart`.
|
566
|
+
|
567
|
+
```ts { .no-copy }
|
568
|
+
--8<-- "types/src/types.ts:FileWithUri"
|
569
|
+
```
|
570
|
+
|
571
|
+
### 6.7. `Artifact` Object
|
572
|
+
|
573
|
+
Represents a tangible output generated by the agent during a task. Artifacts are the results or products of the agent's work.
|
574
|
+
|
575
|
+
{{ render_spec_tabs('Artifact') }}
|
576
|
+
|
577
|
+
### 6.8. `PushNotificationConfig` Object
|
578
|
+
|
579
|
+
Configuration provided by the client to the server for sending asynchronous push notifications about task updates.
|
580
|
+
|
581
|
+
{{ render_spec_tabs('PushNotificationConfig') }}
|
582
|
+
|
583
|
+
### 6.9. `PushNotificationAuthenticationInfo` Object
|
584
|
+
|
585
|
+
A generic structure for specifying authentication requirements, typically used within `PushNotificationConfig` to describe how the A2A Server should authenticate to the client's webhook.
|
586
|
+
|
587
|
+
{{ render_spec_tabs('PushNotificationAuthenticationInfo') }}
|
588
|
+
|
589
|
+
### 6.10. `TaskPushNotificationConfig` Object
|
590
|
+
|
591
|
+
Used as the `params` object for the [`tasks/pushNotificationConfig/set`](#75-taskspushnotificationconfigset) method and as the `result` object for the [`tasks/pushNotificationConfig/get`](#76-taskspushnotificationconfigget) method.
|
592
|
+
|
593
|
+
{{ render_spec_tabs('TaskPushNotificationConfig') }}
|
594
|
+
|
595
|
+
### 6.11. JSON-RPC Structures
|
596
|
+
|
597
|
+
A2A adheres to the standard [JSON-RPC 2.0](https://www.jsonrpc.org/specification) structures for requests and responses.
|
598
|
+
|
599
|
+
#### 6.11.1. `JSONRPCRequest` Object
|
600
|
+
|
601
|
+
All A2A method calls are encapsulated in a JSON-RPC Request object.
|
602
|
+
|
603
|
+
- `jsonrpc`: A String specifying the version of the JSON-RPC protocol. **MUST** be exactly `"2.0"`.
|
604
|
+
- `method`: A String containing the name of the method to be invoked (e.g., `"message/send"`, `"tasks/get"`).
|
605
|
+
- `params`: A Structured value that holds the parameter values to be used during the invocation of the method. This member **MAY** be omitted if the method expects no parameters. A2A methods typically use an `object` for `params`.
|
606
|
+
- `id`: An identifier established by the Client that **MUST** contain a String, Number, or `NULL` value if included. If it is not included it is assumed to be a notification. The value **SHOULD NOT** be `NULL` for requests expecting a response, and Numbers **SHOULD NOT** contain fractional parts. The Server **MUST** reply with the same value in the Response object if included. This member is used to correlate the context between the two objects. A2A methods typically expect a response or stream, so `id` will usually be present and non-null.
|
607
|
+
|
608
|
+
#### 6.11.2. `JSONRPCResponse` Object
|
609
|
+
|
610
|
+
Responses from the A2A Server are encapsulated in a JSON-RPC Response object.
|
611
|
+
|
612
|
+
- `jsonrpc`: A String specifying the version of the JSON-RPC protocol. **MUST** be exactly `"2.0"`.
|
613
|
+
- `id`: This member is **REQUIRED**. It **MUST** be the same as the value of the `id` member in the Request Object. If there was an error in detecting the `id` in the Request object (e.g. Parse error/Invalid Request), it **MUST** be `null`.
|
614
|
+
- **EITHER** `result`: This member is **REQUIRED** on success. This member **MUST NOT** exist if there was an error invoking the method. The value of this member is determined by the method invoked on the Server.
|
615
|
+
- **OR** `error`: This member is **REQUIRED** on failure. This member **MUST NOT** exist if there was no error triggered during invocation. The value of this member **MUST** be an [`JSONRPCError`](#612-jsonrpcerror-object) object.
|
616
|
+
- The members `result` and `error` are mutually exclusive: one **MUST** be present, and the other **MUST NOT**.
|
617
|
+
|
618
|
+
### 6.12. `JSONRPCError` Object
|
619
|
+
|
620
|
+
When a JSON-RPC call encounters an error, the Response Object will contain an `error` member with a value of this structure.
|
621
|
+
|
622
|
+
```ts { .no-copy }
|
623
|
+
--8<-- "types/src/types.ts:JSONRPCError"
|
624
|
+
```
|
625
|
+
|
626
|
+
## 7. Protocol RPC Methods
|
627
|
+
|
628
|
+
All A2A RPC methods are invoked by the A2A Client by sending an HTTP POST request to the A2A Server's `url` (as specified in its `AgentCard`). The body of the HTTP POST request **MUST** be a `JSONRPCRequest` object, and the `Content-Type` header **MUST** be `application/json`.
|
629
|
+
|
630
|
+
The A2A Server's HTTP response body **MUST** be a `JSONRPCResponse` object (or, for streaming methods, an SSE stream where each event's data is a `JSONRPCResponse`). The `Content-Type` for JSON-RPC responses is `application/json`. For SSE streams, it is `text/event-stream`.
|
631
|
+
|
632
|
+
### 7.1. `message/send`
|
633
|
+
|
634
|
+
Sends a message to an agent to initiate a new interaction or to continue an existing one. This method is suitable for synchronous request/response interactions or when client-side polling (using `tasks/get`) is acceptable for monitoring longer-running tasks. A task which has reached a terminal state (completed, canceled, rejected, or failed) can't be restarted. Sending a message to such a task will result in an error. For more information, refer to the [Life of a Task guide](./topics/life-of-a-task.md).
|
635
|
+
|
636
|
+
<div class="grid cards" markdown>
|
637
|
+
|
638
|
+
=== "JSON-RPC"
|
639
|
+
- **URL:** `message/send`
|
640
|
+
- **HTTP Method:** `POST`
|
641
|
+
- **Payload**: [`MessageSendParams`](#711-messagesendparams-object)
|
642
|
+
- **Response**: [`Task` | `Message`](#61-task-object) (A message object or the current or final state of the task after processing the message).
|
643
|
+
|
644
|
+
=== "gRPC"
|
645
|
+
- **URL:** `SendMessage`
|
646
|
+
- **HTTP Method:** `POST`
|
647
|
+
- **Payload:**
|
648
|
+
```proto
|
649
|
+
message SendMessageRequest {
|
650
|
+
Message msg = 1;
|
651
|
+
SendMessageConfiguration configuration = 2;
|
652
|
+
}
|
653
|
+
```
|
654
|
+
- **Response:**
|
655
|
+
```proto
|
656
|
+
message SendMessageResponse {
|
657
|
+
oneof payload {
|
658
|
+
Task task = 1;
|
659
|
+
Message msg = 2;
|
660
|
+
}
|
661
|
+
}
|
662
|
+
```
|
663
|
+
|
664
|
+
=== "REST"
|
665
|
+
- **URL:** `/v1/message:send`
|
666
|
+
- **HTTP Method:** `POST`
|
667
|
+
- **Payload:**
|
668
|
+
```typescript
|
669
|
+
{
|
670
|
+
message: Message,
|
671
|
+
configuration?: MessageSendConfiguration,
|
672
|
+
metadata?: { [key: string]: any }
|
673
|
+
}
|
674
|
+
```
|
675
|
+
- **Response:**
|
676
|
+
```typescript
|
677
|
+
// Returns one of a message or a task
|
678
|
+
{
|
679
|
+
message?: Message,
|
680
|
+
task?: Task
|
681
|
+
}
|
682
|
+
```
|
683
|
+
|
684
|
+
</div>
|
685
|
+
|
686
|
+
The `error` response for all transports in case of failure is a [`JSONRPCError`](#612-jsonrpcerror-object) or equivalent.
|
687
|
+
|
688
|
+
#### 7.1.1. `MessageSendParams` Object
|
689
|
+
|
690
|
+
{{ render_spec_tabs('MessageSendParams') }}
|
691
|
+
|
692
|
+
{{ render_spec_tabs('MessageSendConfiguration') }}
|
693
|
+
|
694
|
+
### 7.2. `message/stream`
|
695
|
+
|
696
|
+
Sends a message to an agent to initiate/continue a task AND subscribes the client to real-time updates for that task via Server-Sent Events (SSE). This method requires the server to have `AgentCard.capabilities.streaming: true`. Just like `message/send`, a task which has reached a terminal state (completed, canceled, rejected, or failed) can't be restarted. Sending a message to such a task will result in an error. For more information, refer to the [Life of a Task guide](./topics/life-of-a-task.md).
|
697
|
+
|
698
|
+
<div class="grid cards" markdown>
|
699
|
+
|
700
|
+
=== "JSON-RPC"
|
701
|
+
- **URL:** `message/stream`
|
702
|
+
- **HTTP Method:** `POST`
|
703
|
+
- **Payload**: [`MessageSendParams`](#711-messagesendparams-object) (same as `message/send`)
|
704
|
+
- **Response**: A stream of Server-Sent Events. Each SSE `data` field contains a [`SendStreamingMessageResponse`](#721-sendstreamingmessageresponse-object)
|
705
|
+
|
706
|
+
=== "gRPC"
|
707
|
+
- **URL:** `SendStreamingMessage`
|
708
|
+
- **HTTP Method:** `POST`
|
709
|
+
- **Payload:**
|
710
|
+
```proto
|
711
|
+
message SendMessageRequest {
|
712
|
+
Message msg = 1;
|
713
|
+
SendMessageConfiguration configuration = 2;
|
714
|
+
}
|
715
|
+
```
|
716
|
+
- **Response:**
|
717
|
+
```proto
|
718
|
+
message StreamResponse {
|
719
|
+
oneof payload {
|
720
|
+
Task task;
|
721
|
+
Message msg;
|
722
|
+
TaskStatusUpdateEvent status_update;
|
723
|
+
TaskArtifactUpdateEvent artifact_update;
|
724
|
+
}
|
725
|
+
}
|
726
|
+
```
|
727
|
+
|
728
|
+
=== "REST"
|
729
|
+
- **URL:** `/v1/message:stream`
|
730
|
+
- **HTTP Method:** `POST`
|
731
|
+
- **Payload:**
|
732
|
+
```typescript
|
733
|
+
{
|
734
|
+
message: Message,
|
735
|
+
configuration?: MessageSendConfiguration,
|
736
|
+
metadata?: { [key: string]: any }
|
737
|
+
}
|
738
|
+
```
|
739
|
+
- **Response:**
|
740
|
+
```typescript
|
741
|
+
{
|
742
|
+
message?: Message
|
743
|
+
task?: Task
|
744
|
+
statusUpdate?: TaskStatusUpdateEvent
|
745
|
+
artifactUpdate?: TaskArtifactUpdateEvent
|
746
|
+
}
|
747
|
+
```
|
748
|
+
|
749
|
+
</div>
|
750
|
+
|
751
|
+
#### 7.2.1. `SendStreamingMessageResponse` Object
|
752
|
+
|
753
|
+
This is the structure of the JSON object found in the `data` field of each Server-Sent Event sent by the server for a `message/stream` request or `tasks/resubscribe` request.
|
754
|
+
|
755
|
+
```ts { .no-copy }
|
756
|
+
--8<-- "types/src/types.ts:SendStreamingMessageResponse"
|
757
|
+
```
|
758
|
+
|
759
|
+
{{ render_spec_tabs('SendStreamingMessageSuccessResponse') }}
|
760
|
+
|
761
|
+
#### 7.2.2. `TaskStatusUpdateEvent` Object
|
762
|
+
|
763
|
+
Carries information about a change in the task's status during streaming. This is one of the possible `result` types in a `SendStreamingMessageSuccessResponse`.
|
764
|
+
|
765
|
+
{{ render_spec_tabs('TaskStatusUpdateEvent') }}
|
766
|
+
|
767
|
+
#### 7.2.3. `TaskArtifactUpdateEvent` Object
|
768
|
+
|
769
|
+
Carries a new or updated artifact (or a chunk of an artifact) generated by the task during streaming. This is one of the possible `result` types in a `SendTaskStreamingResponse`.
|
770
|
+
|
771
|
+
{{ render_spec_tabs('TaskArtifactUpdateEvent') }}
|
772
|
+
|
773
|
+
### 7.3. `tasks/get`
|
774
|
+
|
775
|
+
Retrieves the current state (including status, artifacts, and optionally history) of a previously initiated task. This is typically used for polling the status of a task initiated with `message/send`, or for fetching the final state of a task after being notified via a push notification or after an SSE stream has ended.
|
776
|
+
|
777
|
+
<div class="grid cards" markdown>
|
778
|
+
|
779
|
+
=== "JSON-RPC"
|
780
|
+
- **URL:** `tasks/get`
|
781
|
+
- **HTTP Method:** `POST`
|
782
|
+
- **Payload**: [`TaskQueryParams`](#731-taskqueryparams-object)
|
783
|
+
- **Response**: `Task`
|
784
|
+
|
785
|
+
=== "gRPC"
|
786
|
+
- **URL:** `GetTask`
|
787
|
+
- **HTTP Method:** `POST`
|
788
|
+
- **Payload:**
|
789
|
+
```proto
|
790
|
+
message GetTaskRequest {
|
791
|
+
// name=tasks/{id}
|
792
|
+
string name;
|
793
|
+
int32 history_length;
|
794
|
+
}
|
795
|
+
```
|
796
|
+
- **Response**: `Task`
|
797
|
+
|
798
|
+
=== "REST"
|
799
|
+
- **URL:** `v1/tasks/{id}?historyLength={historyLength}`
|
800
|
+
- **HTTP Method:** `GET`
|
801
|
+
- **Payload:** None
|
802
|
+
- **Response**: `Task`
|
803
|
+
|
804
|
+
</div>
|
805
|
+
|
806
|
+
#### 7.3.1. `TaskQueryParams` Object
|
807
|
+
|
808
|
+
{{ render_spec_tabs('TaskQueryParams') }}
|
809
|
+
|
810
|
+
### 7.4. `tasks/cancel`
|
811
|
+
|
812
|
+
Requests the cancellation of an ongoing task. The server will attempt to cancel the task, but success is not guaranteed (e.g., the task might have already completed or failed, or cancellation might not be supported at its current stage).
|
813
|
+
|
814
|
+
<div class="grid cards" markdown>
|
815
|
+
|
816
|
+
=== "JSON-RPC"
|
817
|
+
- **URL:** `tasks/cancel`
|
818
|
+
- **HTTP Method:** `POST`
|
819
|
+
- **Payload**: [`TaskIdParams`](#741-taskidparams-object-for-taskscancel-and-taskspushnotificationconfigget)
|
820
|
+
- **Response**: `Task`
|
821
|
+
|
822
|
+
=== "gRPC"
|
823
|
+
- **URL:** `CancelTask`
|
824
|
+
- **HTTP Method:** `POST`
|
825
|
+
- **Payload:**
|
826
|
+
```proto
|
827
|
+
message CancelTaskRequest{
|
828
|
+
// name=tasks/{id}
|
829
|
+
string name;
|
830
|
+
}
|
831
|
+
```
|
832
|
+
- **Response**: `Task`
|
833
|
+
|
834
|
+
=== "REST"
|
835
|
+
- **URL:** `/v1/tasks/{id}:cancel`
|
836
|
+
- **HTTP Method:** `POST`
|
837
|
+
- **Payload:**
|
838
|
+
```typescript
|
839
|
+
{
|
840
|
+
name: string
|
841
|
+
}
|
842
|
+
```
|
843
|
+
- **Response**: `Task`
|
844
|
+
|
845
|
+
</div>
|
846
|
+
|
847
|
+
#### 7.4.1. `TaskIdParams` Object (for `tasks/cancel` and `tasks/pushNotificationConfig/get`)
|
848
|
+
|
849
|
+
A simple object containing just the task ID and optional metadata.
|
850
|
+
|
851
|
+
{{ render_spec_tabs('TaskIdParams') }}
|
852
|
+
|
853
|
+
### 7.5. `tasks/pushNotificationConfig/set`
|
854
|
+
|
855
|
+
Sets or updates the push notification configuration for a specified task. This allows the client to tell the server where and how to send asynchronous updates for the task. Requires the server to have `AgentCard.capabilities.pushNotifications: true`.
|
856
|
+
|
857
|
+
<div class="grid cards" markdown>
|
858
|
+
|
859
|
+
=== "JSON-RPC"
|
860
|
+
- **URL:** `tasks/pushNotificationConfig/set`
|
861
|
+
- **HTTP Method:** `POST`
|
862
|
+
- **Payload**: [`TaskPushNotificationConfig`](#610-taskpushnotificationconfig-object)
|
863
|
+
- **Response**: [`TaskPushNotificationConfig`](#610-taskpushnotificationconfig-object)
|
864
|
+
|
865
|
+
=== "gRPC"
|
866
|
+
- **URL:** `CreateTaskPushNotification`
|
867
|
+
- **HTTP Method:** `POST`
|
868
|
+
- **Payload:**
|
869
|
+
```proto
|
870
|
+
message SetTaskPushNotificationRequest {
|
871
|
+
TaskPushNotificationConfig config = 1;
|
872
|
+
}
|
873
|
+
```
|
874
|
+
- **Response**: `TaskPushNotificationConfig`
|
875
|
+
|
876
|
+
=== "REST"
|
877
|
+
- **URL:** `/v1/tasks/{id}/pushNotificationConfigs`
|
878
|
+
- **HTTP Method:** `POST`
|
879
|
+
- **Payload:**
|
880
|
+
```typescript
|
881
|
+
{
|
882
|
+
config: TaskPushNotificationConfig
|
883
|
+
}
|
884
|
+
```
|
885
|
+
- **Response**: `TaskPushNotificationConfig`
|
886
|
+
|
887
|
+
</div>
|
888
|
+
|
889
|
+
### 7.6. `tasks/pushNotificationConfig/get`
|
890
|
+
|
891
|
+
Retrieves the current push notification configuration for a specified task. Requires the server to have `AgentCard.capabilities.pushNotifications: true`.
|
892
|
+
|
893
|
+
<div class="grid cards" markdown>
|
894
|
+
|
895
|
+
=== "JSON-RPC"
|
896
|
+
- **URL:** `tasks/pushNotificationConfig/get`
|
897
|
+
- **HTTP Method:** `POST`
|
898
|
+
- **Payload**: [`GetTaskPushNotificationConfigParams`](#761-gettaskpushnotificationconfigparams-object-taskspushnotificationconfigget)
|
899
|
+
- **Response**: [`TaskPushNotificationConfig`](#610-taskpushnotificationconfig-object)
|
900
|
+
|
901
|
+
=== "gRPC"
|
902
|
+
- **URL:** `GetTaskPushNotification`
|
903
|
+
- **HTTP Method:** `POST`
|
904
|
+
- **Payload:**
|
905
|
+
```proto
|
906
|
+
message TaskSubscriptionRequest {
|
907
|
+
// name=tasks/{id}/pushNotification/{id}
|
908
|
+
string name;
|
909
|
+
}
|
910
|
+
```
|
911
|
+
- **Response**: `TaskPushNotificationConfig`
|
912
|
+
|
913
|
+
=== "REST"
|
914
|
+
- **URL:** `/v1/tasks/{taskId}/pushNotificationConfigs/{configId}`
|
915
|
+
- **HTTP Method:** `GET`
|
916
|
+
- **Payload:** None
|
917
|
+
- **Response**: `TaskPushNotificationConfig`
|
918
|
+
|
919
|
+
</div>
|
920
|
+
|
921
|
+
**Response `error` type (on failure)**: [`JSONRPCError`](#612-jsonrpcerror-object) (e.g., [`PushNotificationNotSupportedError`](#82-a2a-specific-errors), [`TaskNotFoundError`](#82-a2a-specific-errors)).
|
922
|
+
|
923
|
+
#### 7.6.1. `GetTaskPushNotificationConfigParams` Object (`tasks/pushNotificationConfig/get`)
|
924
|
+
|
925
|
+
A object for fetching the push notification configuration for a task.
|
926
|
+
|
927
|
+
{{ render_spec_tabs('GetTaskPushNotificationConfigParams') }}
|
928
|
+
|
929
|
+
### 7.7. `tasks/pushNotificationConfig/list`
|
930
|
+
|
931
|
+
Retrieves the associated push notification configurations for a specified task. Requires the server to have `AgentCard.capabilities.pushNotifications: true`.
|
932
|
+
|
933
|
+
<div class="grid cards" markdown>
|
934
|
+
|
935
|
+
=== "JSON-RPC"
|
936
|
+
- **URL:** `tasks/pushNotificationConfig/list`
|
937
|
+
- **HTTP Method:** `POST`
|
938
|
+
- **Payload:** [`ListTaskPushNotificationConfigParams`](#771-listtaskpushnotificationconfigparams-object-taskspushnotificationconfiglist)
|
939
|
+
- **Response**: `TaskPushNotificationConfig[]`
|
940
|
+
|
941
|
+
=== "gRPC"
|
942
|
+
- **URL:** `ListTaskPushNotification`
|
943
|
+
- **HTTP Method:** `POST`
|
944
|
+
- **Payload:**
|
945
|
+
```proto
|
946
|
+
message ListTaskPushNotificationRequest {
|
947
|
+
// parent=tasks/{id}
|
948
|
+
string parent = 1;
|
949
|
+
}
|
950
|
+
```
|
951
|
+
- **Response**: `repeated TaskPushNotificationConfig`
|
952
|
+
|
953
|
+
=== "REST"
|
954
|
+
- **URL:** `/v1/tasks/{id}/pushNotificationConfigs`
|
955
|
+
- **HTTP Method:** `GET`
|
956
|
+
- **Payload:**: None
|
957
|
+
- **Response**: `[TaskPushNotificationConfig]`
|
958
|
+
|
959
|
+
</div>
|
960
|
+
|
961
|
+
#### 7.7.1. `ListTaskPushNotificationConfigParams` Object (`tasks/pushNotificationConfig/list`)
|
962
|
+
|
963
|
+
A object for fetching the push notification configurations for a task.
|
964
|
+
|
965
|
+
{{ render_spec_tabs('ListTaskPushNotificationConfigParams') }}
|
966
|
+
|
967
|
+
### 7.8. `tasks/pushNotificationConfig/delete`
|
968
|
+
|
969
|
+
Deletes an associated push notification configuration for a task. Requires the server to have `AgentCard.capabilities.pushNotifications: true`.
|
970
|
+
|
971
|
+
- **Request `params` type**: [`DeleteTaskPushNotificationConfigParams`](#781-deletetaskpushnotificationconfigparams-object-taskspushnotificationconfigdelete)
|
972
|
+
- **Response `result` type (on success)**: [`null`]
|
973
|
+
- **Response `error` type (on failure)**: [`JSONRPCError`](#612-jsonrpcerror-object) (e.g., [`PushNotificationNotSupportedError`](#82-a2a-specific-errors), [`TaskNotFoundError`](#82-a2a-specific-errors)).
|
974
|
+
|
975
|
+
#### 7.8.1. `DeleteTaskPushNotificationConfigParams` Object (`tasks/pushNotificationConfig/delete`)
|
976
|
+
|
977
|
+
A object for deleting an associated push notification configuration for a task.
|
978
|
+
|
979
|
+
{{ render_spec_tabs('DeleteTaskPushNotificationConfigParams') }}
|
980
|
+
|
981
|
+
### 7.9. `tasks/resubscribe`
|
982
|
+
|
983
|
+
Allows a client to reconnect to an SSE stream for an ongoing task after a previous connection (from `message/stream` or an earlier `tasks/resubscribe`) was interrupted. Requires the server to have `AgentCard.capabilities.streaming: true`.
|
984
|
+
|
985
|
+
The purpose is to resume receiving _subsequent_ updates. The server's behavior regarding events missed during the disconnection period (e.g., whether it attempts to backfill some missed events or only sends new ones from the point of resubscription) is implementation-dependent and not strictly defined by this specification.
|
986
|
+
|
987
|
+
<div class="grid cards" markdown>
|
988
|
+
|
989
|
+
=== "JSON-RPC"
|
990
|
+
- **URL:** `tasks/resubscribe`
|
991
|
+
- **HTTP Method:** `POST`
|
992
|
+
- **Payload**: [`TaskIdParams`](#741-taskidparams-object-for-taskscancel-and-taskspushnotificationconfigget)
|
993
|
+
- **Response**: A stream of Server-Sent Events. Each SSE `data` field contains a [`SendStreamingMessageResponse`](#721-sendstreamingmessageresponse-object)
|
994
|
+
|
995
|
+
=== "gRPC"
|
996
|
+
- **URL:** `TaskSubscription`
|
997
|
+
- **HTTP Method:** `POST`
|
998
|
+
- **Payload:**
|
999
|
+
```proto
|
1000
|
+
message TaskSubscriptionRequest{
|
1001
|
+
// name=tasks/{id}
|
1002
|
+
string name;
|
1003
|
+
}
|
1004
|
+
```
|
1005
|
+
- **Response:**
|
1006
|
+
```proto
|
1007
|
+
message StreamResponse {
|
1008
|
+
oneof payload {
|
1009
|
+
Task task;
|
1010
|
+
Message msg;
|
1011
|
+
TaskStatusUpdateEvent status_update;
|
1012
|
+
TaskArtifactUpdateEvent artifact_update;
|
1013
|
+
}
|
1014
|
+
}
|
1015
|
+
```
|
1016
|
+
|
1017
|
+
=== "REST"
|
1018
|
+
- **URL:** `/v1/tasks/{id}:subscribe`
|
1019
|
+
- **HTTP Method:** `POST`
|
1020
|
+
- **Payload:**
|
1021
|
+
```typescript
|
1022
|
+
{
|
1023
|
+
name: string
|
1024
|
+
}
|
1025
|
+
```
|
1026
|
+
- **Response:**
|
1027
|
+
```typescript
|
1028
|
+
{
|
1029
|
+
message?: Message
|
1030
|
+
task?: Task
|
1031
|
+
statusUpdate?: TaskStatusUpdateEvent
|
1032
|
+
artifactUpdate?: TaskArtifactUpdateEvent
|
1033
|
+
}
|
1034
|
+
```
|
1035
|
+
|
1036
|
+
</div>
|
1037
|
+
|
1038
|
+
### 7.10. `agent/getAuthenticatedExtendedCard`
|
1039
|
+
|
1040
|
+
Retrieves a potentially more detailed version of the Agent Card after the client has authenticated. This endpoint is available only if `AgentCard.supportsAuthenticatedExtendedCard` is `true`.
|
1041
|
+
|
1042
|
+
- **Authentication**: The client **MUST** authenticate the request using one of the schemes declared in the public `AgentCard.securitySchemes` and `AgentCard.security` fields.
|
1043
|
+
- **Response `result` type (on success)**: `AgentCard` (A complete Agent Card object, which may contain additional details or skills not present in the public card).
|
1044
|
+
- **Response `error` type (on failure)**: Standard HTTP error codes.
|
1045
|
+
- `401 Unauthorized`: Authentication failed (missing or invalid credentials). The server **SHOULD** include a `WWW-Authenticate` header.
|
1046
|
+
|
1047
|
+
<div class="grid cards" markdown>
|
1048
|
+
|
1049
|
+
=== "JSON-RPC"
|
1050
|
+
- **URL:** `agent/getAuthenticatedExtendedCard`
|
1051
|
+
- **HTTP Method:** `POST`
|
1052
|
+
- **Payload:** None
|
1053
|
+
- **Response:** `AgentCard`
|
1054
|
+
|
1055
|
+
=== "gRPC"
|
1056
|
+
- **URL:** `GetAgentCard`
|
1057
|
+
- **HTTP Method:** `POST`
|
1058
|
+
- **Payload:** None
|
1059
|
+
- **Response:** `AgentCard`
|
1060
|
+
|
1061
|
+
=== "REST"
|
1062
|
+
- **URL:** `/v1/card`
|
1063
|
+
- **HTTP Method:** `GET`
|
1064
|
+
- **Payload:** None
|
1065
|
+
- **Response:** `AgentCard`
|
1066
|
+
|
1067
|
+
</div>
|
1068
|
+
|
1069
|
+
Clients retrieving this authenticated card **SHOULD** replace their cached public Agent Card with the content received from this endpoint for the duration of their authenticated session or until the card's version changes.
|
1070
|
+
|
1071
|
+
```ts { .no-copy }
|
1072
|
+
--8<-- "types/src/types.ts:GetAuthenticatedExtendedCardSuccessResponse"
|
1073
|
+
```
|
1074
|
+
|
1075
|
+
## 8. Error Handling
|
1076
|
+
|
1077
|
+
A2A uses standard [JSON-RPC 2.0 error codes and structure](https://www.jsonrpc.org/specification#error_object) for reporting errors. Errors are returned in the `error` member of the `JSONRPCErrorResponse` object. See [`JSONRPCError` Object definition](#612-jsonrpcerror-object).
|
1078
|
+
|
1079
|
+
### 8.1. Standard JSON-RPC Errors
|
1080
|
+
|
1081
|
+
These are standard codes defined by the JSON-RPC 2.0 specification.
|
1082
|
+
|
1083
|
+
| Code | JSON-RPC Spec Meaning | Typical A2A `message` | Description |
|
1084
|
+
| :------------------- | :-------------------- | :------------------------ | :------------------------------------------------------------------------------------------- |
|
1085
|
+
| `-32700` | Parse error | Invalid JSON payload | Server received JSON that was not well-formed. |
|
1086
|
+
| `-32600` | Invalid Request | Invalid JSON-RPC Request | The JSON payload was valid JSON, but not a valid JSON-RPC Request object. |
|
1087
|
+
| `-32601` | Method not found | Method not found | The requested A2A RPC `method` (e.g., `"tasks/foo"`) does not exist or is not supported. |
|
1088
|
+
| `-32602` | Invalid params | Invalid method parameters | The `params` provided for the method are invalid (e.g., wrong type, missing required field). |
|
1089
|
+
| `-32603` | Internal error | Internal server error | An unexpected error occurred on the server during processing. |
|
1090
|
+
| `-32000` to `-32099` | Server error | _(Server-defined)_ | Reserved for implementation-defined server-errors. A2A-specific errors use this range. |
|
1091
|
+
|
1092
|
+
### 8.2. A2A-Specific Errors
|
1093
|
+
|
1094
|
+
These are custom error codes defined within the JSON-RPC server error range (`-32000` to `-32099`) to provide more specific feedback about A2A-related issues. Servers **SHOULD** use these codes where applicable.
|
1095
|
+
|
1096
|
+
| Code | Error Name (Conceptual) | Typical `message` string | Description |
|
1097
|
+
| :------- | :---------------------------------- | :--------------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
1098
|
+
| `-32001` | `TaskNotFoundError` | Task not found | The specified task `id` does not correspond to an existing or active task. It might be invalid, expired, or already completed and purged. |
|
1099
|
+
| `-32002` | `TaskNotCancelableError` | Task cannot be canceled | An attempt was made to cancel a task that is not in a cancelable state (e.g., it has already reached a terminal state like `completed`, `failed`, or `canceled`). |
|
1100
|
+
| `-32003` | `PushNotificationNotSupportedError` | Push Notification is not supported | Client attempted to use push notification features (e.g., `tasks/pushNotificationConfig/set`) but the server agent does not support them (i.e., `AgentCard.capabilities.pushNotifications` is `false`). |
|
1101
|
+
| `-32004` | `UnsupportedOperationError` | This operation is not supported | The requested operation or a specific aspect of it (perhaps implied by parameters) is not supported by this server agent implementation. Broader than just method not found. |
|
1102
|
+
| `-32005` | `ContentTypeNotSupportedError` | Incompatible content types | A [Media Type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) provided in the request's `message.parts` (or implied for an artifact) is not supported by the agent or the specific skill being invoked. |
|
1103
|
+
| `-32006` | `InvalidAgentResponseError` | Invalid agent response type | Agent generated an invalid response for the requested method |
|
1104
|
+
| `-32007` | `AuthenticatedExtendedCardNotConfiguredError` | Authenticated Extended Card not configured | The agent does not have an Authenticated Extended Card configured.|
|
1105
|
+
|
1106
|
+
Servers MAY define additional error codes within the `-32000` to `-32099` range for more specific scenarios not covered above, but they **SHOULD** document these clearly. The `data` field of the `JSONRPCError` object can be used to provide more structured details for any error.
|
1107
|
+
|
1108
|
+
## 9. Common Workflows & Examples
|
1109
|
+
|
1110
|
+
This section provides illustrative JSON examples of common A2A interactions. Timestamps, context IDs, and request/response IDs are for demonstration purposes. For brevity, some optional fields might be omitted if not central to the example.
|
1111
|
+
|
1112
|
+
### 9.1. Fetching Authenticated Extended Agent Card
|
1113
|
+
|
1114
|
+
**Scenario:** A client discovers a public Agent Card indicating support for an authenticated extended card and wants to retrieve the full details.
|
1115
|
+
|
1116
|
+
1. **Client fetches the public Agent Card:**
|
1117
|
+
|
1118
|
+
```none
|
1119
|
+
GET https://example.com/.well-known/agent-card.json
|
1120
|
+
```
|
1121
|
+
|
1122
|
+
_Server responds with the public Agent Card (like the example in Section 5.6), including `supportsAuthenticatedExtendedCard: true` (at the root level) and `securitySchemes`._
|
1123
|
+
|
1124
|
+
2. **Client identifies required authentication from the public card.**
|
1125
|
+
|
1126
|
+
3. **Client obtains necessary credentials out-of-band (e.g., performs OAuth 2.0 flow with Google, resulting in an access token).**
|
1127
|
+
|
1128
|
+
4. **Client fetches the authenticated extended Agent Card using `agent/getAuthenticatedExtendedCard` request:**
|
1129
|
+
|
1130
|
+
```json
|
1131
|
+
{
|
1132
|
+
"jsonrpc": "2.0",
|
1133
|
+
"id": 1,
|
1134
|
+
"method": "agent/getAuthenticatedExtendedCard"
|
1135
|
+
}
|
1136
|
+
```
|
1137
|
+
|
1138
|
+
5. **Server authenticates and authorizes the request.**
|
1139
|
+
|
1140
|
+
6. **Server responds with the full Agent Card as the JSON-RPC result:**
|
1141
|
+
|
1142
|
+
### 9.2. Basic Execution (Synchronous / Polling Style)
|
1143
|
+
|
1144
|
+
**Scenario:** Client asks a simple question, and the agent responds quickly with a task
|
1145
|
+
|
1146
|
+
1. **Client sends a message using `message/send`:**
|
1147
|
+
|
1148
|
+
```json
|
1149
|
+
{
|
1150
|
+
"jsonrpc": "2.0",
|
1151
|
+
"id": 1,
|
1152
|
+
"method": "message/send",
|
1153
|
+
"params": {
|
1154
|
+
"message": {
|
1155
|
+
"role": "user",
|
1156
|
+
"parts": [
|
1157
|
+
{
|
1158
|
+
"kind": "text",
|
1159
|
+
"text": "tell me a joke"
|
1160
|
+
}
|
1161
|
+
],
|
1162
|
+
"messageId": "9229e770-767c-417b-a0b0-f0741243c589"
|
1163
|
+
},
|
1164
|
+
"metadata": {}
|
1165
|
+
}
|
1166
|
+
}
|
1167
|
+
```
|
1168
|
+
|
1169
|
+
2. **Server processes the request, creates a task and responds (task completes quickly)**
|
1170
|
+
|
1171
|
+
```json
|
1172
|
+
{
|
1173
|
+
"jsonrpc": "2.0",
|
1174
|
+
"id": 1,
|
1175
|
+
"result": {
|
1176
|
+
"id": "363422be-b0f9-4692-a24d-278670e7c7f1",
|
1177
|
+
"contextId": "c295ea44-7543-4f78-b524-7a38915ad6e4",
|
1178
|
+
"status": {
|
1179
|
+
"state": "completed"
|
1180
|
+
},
|
1181
|
+
"artifacts": [
|
1182
|
+
{
|
1183
|
+
"artifactId": "9b6934dd-37e3-4eb1-8766-962efaab63a1",
|
1184
|
+
"name": "joke",
|
1185
|
+
"parts": [
|
1186
|
+
{
|
1187
|
+
"kind": "text",
|
1188
|
+
"text": "Why did the chicken cross the road? To get to the other side!"
|
1189
|
+
}
|
1190
|
+
]
|
1191
|
+
}
|
1192
|
+
],
|
1193
|
+
"history": [
|
1194
|
+
{
|
1195
|
+
"role": "user",
|
1196
|
+
"parts": [
|
1197
|
+
{
|
1198
|
+
"kind": "text",
|
1199
|
+
"text": "tell me a joke"
|
1200
|
+
}
|
1201
|
+
],
|
1202
|
+
"messageId": "9229e770-767c-417b-a0b0-f0741243c589",
|
1203
|
+
"taskId": "363422be-b0f9-4692-a24d-278670e7c7f1",
|
1204
|
+
"contextId": "c295ea44-7543-4f78-b524-7a38915ad6e4"
|
1205
|
+
}
|
1206
|
+
],
|
1207
|
+
"kind": "task",
|
1208
|
+
"metadata": {}
|
1209
|
+
}
|
1210
|
+
}
|
1211
|
+
```
|
1212
|
+
|
1213
|
+
_If the task were longer-running, the server might initially respond with `status.state: "working"`. The client would then periodically call `tasks/get` with params: `{"id": "363422be-b0f9-4692-a24d-278670e7c7f1"}` until the task reaches a terminal state._
|
1214
|
+
|
1215
|
+
**Scenario:** Client asks a simple question, and the agent responds quickly without a task
|
1216
|
+
|
1217
|
+
1. **Client sends a message using `message/send`:**
|
1218
|
+
|
1219
|
+
```json
|
1220
|
+
{
|
1221
|
+
"jsonrpc": "2.0",
|
1222
|
+
"id": 1,
|
1223
|
+
"method": "message/send",
|
1224
|
+
"params": {
|
1225
|
+
"message": {
|
1226
|
+
"role": "user",
|
1227
|
+
"parts": [
|
1228
|
+
{
|
1229
|
+
"kind": "text",
|
1230
|
+
"text": "tell me a joke"
|
1231
|
+
}
|
1232
|
+
],
|
1233
|
+
"messageId": "9229e770-767c-417b-a0b0-f0741243c589"
|
1234
|
+
},
|
1235
|
+
"metadata": {}
|
1236
|
+
}
|
1237
|
+
}
|
1238
|
+
```
|
1239
|
+
|
1240
|
+
2. **Server processes the request, responds quickly without a task**
|
1241
|
+
|
1242
|
+
```json
|
1243
|
+
{
|
1244
|
+
"jsonrpc": "2.0",
|
1245
|
+
"id": 1,
|
1246
|
+
"result": {
|
1247
|
+
"messageId": "363422be-b0f9-4692-a24d-278670e7c7f1",
|
1248
|
+
"contextId": "c295ea44-7543-4f78-b524-7a38915ad6e4",
|
1249
|
+
"parts": [
|
1250
|
+
{
|
1251
|
+
"kind": "text",
|
1252
|
+
"text": "Why did the chicken cross the road? To get to the other side!"
|
1253
|
+
}
|
1254
|
+
],
|
1255
|
+
"kind": "message",
|
1256
|
+
"metadata": {}
|
1257
|
+
}
|
1258
|
+
}
|
1259
|
+
```
|
1260
|
+
|
1261
|
+
### 9.3. Streaming Task Execution (SSE)
|
1262
|
+
|
1263
|
+
**Scenario:** Client asks the agent to write a long paper describing an attached picture.
|
1264
|
+
|
1265
|
+
1. **Client sends a message and subscribes using `message/stream`:**
|
1266
|
+
|
1267
|
+
```json
|
1268
|
+
{
|
1269
|
+
"jsonrpc": "2.0",
|
1270
|
+
"id": 1,
|
1271
|
+
"method": "message/stream",
|
1272
|
+
"params": {
|
1273
|
+
"message": {
|
1274
|
+
"role": "user",
|
1275
|
+
"parts": [
|
1276
|
+
{
|
1277
|
+
"kind": "text",
|
1278
|
+
"text": "write a long paper describing the attached pictures"
|
1279
|
+
},
|
1280
|
+
{
|
1281
|
+
"kind": "file",
|
1282
|
+
"file": {
|
1283
|
+
"mimeType": "image/png",
|
1284
|
+
"data": "<base64-encoded-content>"
|
1285
|
+
}
|
1286
|
+
}
|
1287
|
+
],
|
1288
|
+
"messageId": "bbb7dee1-cf5c-4683-8a6f-4114529da5eb"
|
1289
|
+
},
|
1290
|
+
"metadata": {}
|
1291
|
+
}
|
1292
|
+
}
|
1293
|
+
```
|
1294
|
+
|
1295
|
+
2. **Server responds with HTTP 200 OK, `Content-Type: text/event-stream`, and starts sending SSE events:**
|
1296
|
+
|
1297
|
+
_Event 1: Task status update - working_
|
1298
|
+
|
1299
|
+
```json
|
1300
|
+
data: {
|
1301
|
+
"jsonrpc": "2.0",
|
1302
|
+
"id": 1,
|
1303
|
+
"result": {
|
1304
|
+
"id": "225d6247-06ba-4cda-a08b-33ae35c8dcfa",
|
1305
|
+
"contextId": "05217e44-7e9f-473e-ab4f-2c2dde50a2b1",
|
1306
|
+
"status": {
|
1307
|
+
"state": "submitted",
|
1308
|
+
"timestamp":"2025-04-02T16:59:25.331844"
|
1309
|
+
},
|
1310
|
+
"history": [
|
1311
|
+
{
|
1312
|
+
"role": "user",
|
1313
|
+
"parts": [
|
1314
|
+
{
|
1315
|
+
"kind": "text",
|
1316
|
+
"text": "write a long paper describing the attached pictures"
|
1317
|
+
},
|
1318
|
+
{
|
1319
|
+
"kind": "file",
|
1320
|
+
"file": {
|
1321
|
+
"mimeType": "image/png",
|
1322
|
+
"data": "<base64-encoded-content>"
|
1323
|
+
}
|
1324
|
+
}
|
1325
|
+
],
|
1326
|
+
"messageId": "bbb7dee1-cf5c-4683-8a6f-4114529da5eb",
|
1327
|
+
"taskId": "225d6247-06ba-4cda-a08b-33ae35c8dcfa",
|
1328
|
+
"contextId": "05217e44-7e9f-473e-ab4f-2c2dde50a2b1"
|
1329
|
+
}
|
1330
|
+
],
|
1331
|
+
"kind": "task",
|
1332
|
+
"metadata": {}
|
1333
|
+
}
|
1334
|
+
}
|
1335
|
+
|
1336
|
+
data: {
|
1337
|
+
"jsonrpc": "2.0",
|
1338
|
+
"id": 1,
|
1339
|
+
"result": {
|
1340
|
+
"taskId": "225d6247-06ba-4cda-a08b-33ae35c8dcfa",
|
1341
|
+
"contextId": "05217e44-7e9f-473e-ab4f-2c2dde50a2b1",
|
1342
|
+
"artifact": {
|
1343
|
+
"artifactId": "9b6934dd-37e3-4eb1-8766-962efaab63a1",
|
1344
|
+
"parts": [
|
1345
|
+
{"kind":"text", "text": "<section 1...>"}
|
1346
|
+
]
|
1347
|
+
},
|
1348
|
+
"append": false,
|
1349
|
+
"lastChunk": false,
|
1350
|
+
"kind":"artifact-update"
|
1351
|
+
}
|
1352
|
+
}
|
1353
|
+
|
1354
|
+
data: {
|
1355
|
+
"jsonrpc": "2.0",
|
1356
|
+
"id": 1,
|
1357
|
+
"result": {
|
1358
|
+
"taskId": "225d6247-06ba-4cda-a08b-33ae35c8dcfa",
|
1359
|
+
"contextId": "05217e44-7e9f-473e-ab4f-2c2dde50a2b1",
|
1360
|
+
"artifact": {
|
1361
|
+
"artifactId": "9b6934dd-37e3-4eb1-8766-962efaab63a1",
|
1362
|
+
"parts": [
|
1363
|
+
{"kind":"text", "text": "<section 2...>"}
|
1364
|
+
],
|
1365
|
+
},
|
1366
|
+
"append": true,
|
1367
|
+
"lastChunk": false,
|
1368
|
+
"kind":"artifact-update"
|
1369
|
+
}
|
1370
|
+
}
|
1371
|
+
|
1372
|
+
|
1373
|
+
data: {
|
1374
|
+
"jsonrpc": "2.0",
|
1375
|
+
"id": 1,
|
1376
|
+
"result": {
|
1377
|
+
"taskId": "225d6247-06ba-4cda-a08b-33ae35c8dcfa",
|
1378
|
+
"contextId": "05217e44-7e9f-473e-ab4f-2c2dde50a2b1",
|
1379
|
+
"artifact": {
|
1380
|
+
"artifactId": "9b6934dd-37e3-4eb1-8766-962efaab63a1",
|
1381
|
+
"parts": [
|
1382
|
+
{"kind":"text", "text": "<section 3...>"}
|
1383
|
+
]
|
1384
|
+
},
|
1385
|
+
"append": true,
|
1386
|
+
"lastChunk": true,
|
1387
|
+
"kind":"artifact-update"
|
1388
|
+
}
|
1389
|
+
}
|
1390
|
+
|
1391
|
+
data: {
|
1392
|
+
"jsonrpc": "2.0",
|
1393
|
+
"id": 1,
|
1394
|
+
"result": {
|
1395
|
+
"taskId": "225d6247-06ba-4cda-a08b-33ae35c8dcfa",
|
1396
|
+
"contextId": "05217e44-7e9f-473e-ab4f-2c2dde50a2b1",
|
1397
|
+
"status": {
|
1398
|
+
"state": "completed",
|
1399
|
+
"timestamp":"2025-04-02T16:59:35.331844"
|
1400
|
+
},
|
1401
|
+
"final": true,
|
1402
|
+
"kind":"status-update"
|
1403
|
+
}
|
1404
|
+
}
|
1405
|
+
```
|
1406
|
+
|
1407
|
+
_(Server closes the SSE connection after the `final:true` event)._
|
1408
|
+
|
1409
|
+
### 9.4. Multi-Turn Interaction (Input Required)
|
1410
|
+
|
1411
|
+
**Scenario:** Client wants to book a flight, and the agent needs more information.
|
1412
|
+
|
1413
|
+
1. **Client sends a message using `message/send`:**
|
1414
|
+
|
1415
|
+
```json
|
1416
|
+
{
|
1417
|
+
"jsonrpc": "2.0",
|
1418
|
+
"id": "req-003",
|
1419
|
+
"method": "message/send",
|
1420
|
+
"params": {
|
1421
|
+
"message": {
|
1422
|
+
"role": "user",
|
1423
|
+
"parts": [{ "kind": "text", "text": "I'd like to book a flight." }]
|
1424
|
+
},
|
1425
|
+
"messageId": "c53ba666-3f97-433c-a87b-6084276babe2"
|
1426
|
+
}
|
1427
|
+
}
|
1428
|
+
```
|
1429
|
+
|
1430
|
+
2. **Server responds, task state is `input-required`:**
|
1431
|
+
|
1432
|
+
```json
|
1433
|
+
{
|
1434
|
+
"jsonrpc": "2.0",
|
1435
|
+
"id": "req-003",
|
1436
|
+
"result": {
|
1437
|
+
"id": "3f36680c-7f37-4a5f-945e-d78981fafd36",
|
1438
|
+
"contextId": "c295ea44-7543-4f78-b524-7a38915ad6e4",
|
1439
|
+
"status": {
|
1440
|
+
"state": "input-required",
|
1441
|
+
"message": {
|
1442
|
+
"role": "agent",
|
1443
|
+
"parts": [
|
1444
|
+
{
|
1445
|
+
"kind": "text",
|
1446
|
+
"text": "Sure, I can help with that! Where would you like to fly to, and from where? Also, what are your preferred travel dates?"
|
1447
|
+
}
|
1448
|
+
],
|
1449
|
+
"messageId": "c2e1b2dd-f200-4b04-bc22-1b0c65a1aad2",
|
1450
|
+
"taskId": "3f36680c-7f37-4a5f-945e-d78981fafd36",
|
1451
|
+
"contextId": "c295ea44-7543-4f78-b524-7a38915ad6e4"
|
1452
|
+
},
|
1453
|
+
"timestamp": "2024-03-15T10:10:00Z"
|
1454
|
+
},
|
1455
|
+
"history": [
|
1456
|
+
{
|
1457
|
+
"role": "user",
|
1458
|
+
"parts": [
|
1459
|
+
{
|
1460
|
+
"kind": "text",
|
1461
|
+
"text": "I'd like to book a flight."
|
1462
|
+
}
|
1463
|
+
],
|
1464
|
+
"messageId": "c53ba666-3f97-433c-a87b-6084276babe2",
|
1465
|
+
"taskId": "3f36680c-7f37-4a5f-945e-d78981fafd36",
|
1466
|
+
"contextId": "c295ea44-7543-4f78-b524-7a38915ad6e4"
|
1467
|
+
}
|
1468
|
+
],
|
1469
|
+
"kind": "task"
|
1470
|
+
}
|
1471
|
+
}
|
1472
|
+
```
|
1473
|
+
|
1474
|
+
3. **Client `message/send` (providing the requested input, using the _same_ task ID):**
|
1475
|
+
|
1476
|
+
```json
|
1477
|
+
{
|
1478
|
+
"jsonrpc": "2.0",
|
1479
|
+
"id": "req-004",
|
1480
|
+
"method": "message/send",
|
1481
|
+
"params": {
|
1482
|
+
"message": {
|
1483
|
+
"role": "user",
|
1484
|
+
"parts": [
|
1485
|
+
{
|
1486
|
+
"kind": "text",
|
1487
|
+
"text": "I want to fly from New York (JFK) to London (LHR) around October 10th, returning October 17th."
|
1488
|
+
}
|
1489
|
+
],
|
1490
|
+
"contextId": "c295ea44-7543-4f78-b524-7a38915ad6e4",
|
1491
|
+
"taskId": "3f36680c-7f37-4a5f-945e-d78981fafd36",
|
1492
|
+
"messageId": "0db1d6c4-3976-40ed-b9b8-0043ea7a03d3"
|
1493
|
+
},
|
1494
|
+
"configuration": {
|
1495
|
+
"blocking": true
|
1496
|
+
}
|
1497
|
+
}
|
1498
|
+
}
|
1499
|
+
```
|
1500
|
+
|
1501
|
+
4. **Server processes the new input and responds (e.g., task completed or more input needed):**
|
1502
|
+
|
1503
|
+
```json
|
1504
|
+
{
|
1505
|
+
"jsonrpc": "2.0",
|
1506
|
+
"id": "req-004",
|
1507
|
+
"result": {
|
1508
|
+
"id": "3f36680c-7f37-4a5f-945e-d78981fafd36",
|
1509
|
+
"contextId": "c295ea44-7543-4f78-b524-7a38915ad6e4",
|
1510
|
+
"status": {
|
1511
|
+
"state": "completed",
|
1512
|
+
"message": {
|
1513
|
+
"role": "agent",
|
1514
|
+
"parts": [
|
1515
|
+
{
|
1516
|
+
"kind": "text",
|
1517
|
+
"text": "Okay, I've found a flight for you. Confirmation XYZ123. Details are in the artifact."
|
1518
|
+
}
|
1519
|
+
]
|
1520
|
+
}
|
1521
|
+
},
|
1522
|
+
"artifacts": [
|
1523
|
+
{
|
1524
|
+
"artifactId": "9b6934dd-37e3-4eb1-8766-962efaab63a1",
|
1525
|
+
"name": "FlightItinerary.json",
|
1526
|
+
"parts": [
|
1527
|
+
{
|
1528
|
+
"kind": "data",
|
1529
|
+
"data": {
|
1530
|
+
"confirmationId": "XYZ123",
|
1531
|
+
"from": "JFK",
|
1532
|
+
"to": "LHR",
|
1533
|
+
"departure": "2024-10-10T18:00:00Z",
|
1534
|
+
"arrival": "2024-10-11T06:00:00Z",
|
1535
|
+
"returnDeparture": "..."
|
1536
|
+
}
|
1537
|
+
}
|
1538
|
+
]
|
1539
|
+
}
|
1540
|
+
],
|
1541
|
+
"history": [
|
1542
|
+
{
|
1543
|
+
"role": "user",
|
1544
|
+
"parts": [
|
1545
|
+
{
|
1546
|
+
"kind": "text",
|
1547
|
+
"text": "I'd like to book a flight."
|
1548
|
+
}
|
1549
|
+
],
|
1550
|
+
"messageId": "c53ba666-3f97-433c-a87b-6084276babe2",
|
1551
|
+
"taskId": "3f36680c-7f37-4a5f-945e-d78981fafd36",
|
1552
|
+
"contextId": "c295ea44-7543-4f78-b524-7a38915ad6e4"
|
1553
|
+
},
|
1554
|
+
{
|
1555
|
+
"role": "agent",
|
1556
|
+
"parts": [
|
1557
|
+
{
|
1558
|
+
"kind": "text",
|
1559
|
+
"text": "Sure, I can help with that! Where would you like to fly to, and from where? Also, what are your preferred travel dates?"
|
1560
|
+
}
|
1561
|
+
],
|
1562
|
+
"messageId": "c2e1b2dd-f200-4b04-bc22-1b0c65a1aad2",
|
1563
|
+
"taskId": "3f36680c-7f37-4a5f-945e-d78981fafd36",
|
1564
|
+
"contextId": "c295ea44-7543-4f78-b524-7a38915ad6e4"
|
1565
|
+
},
|
1566
|
+
{
|
1567
|
+
"role": "user",
|
1568
|
+
"parts": [
|
1569
|
+
{
|
1570
|
+
"kind": "text",
|
1571
|
+
"text": "I want to fly from New York (JFK) to London (LHR) around October 10th, returning October 17th."
|
1572
|
+
}
|
1573
|
+
],
|
1574
|
+
"contextId": "c295ea44-7543-4f78-b524-7a38915ad6e4",
|
1575
|
+
"taskId": "3f36680c-7f37-4a5f-945e-d78981fafd36",
|
1576
|
+
"messageId": "0db1d6c4-3976-40ed-b9b8-0043ea7a03d3"
|
1577
|
+
}
|
1578
|
+
],
|
1579
|
+
"kind": "task",
|
1580
|
+
"metadata": {}
|
1581
|
+
}
|
1582
|
+
}
|
1583
|
+
```
|
1584
|
+
|
1585
|
+
### 9.5. Push Notification Setup and Usage
|
1586
|
+
|
1587
|
+
**Scenario:** Client requests a long-running report generation and wants to be notified via webhook when it's done.
|
1588
|
+
|
1589
|
+
1. **Client `message/send` with `pushNotification` config:**
|
1590
|
+
|
1591
|
+
```json
|
1592
|
+
{
|
1593
|
+
"jsonrpc": "2.0",
|
1594
|
+
"id": "req-005",
|
1595
|
+
"method": "message/send",
|
1596
|
+
"params": {
|
1597
|
+
"message": {
|
1598
|
+
"role": "user",
|
1599
|
+
"parts": [
|
1600
|
+
{
|
1601
|
+
"kind": "text",
|
1602
|
+
"text": "Generate the Q1 sales report. This usually takes a while. Notify me when it's ready."
|
1603
|
+
}
|
1604
|
+
],
|
1605
|
+
"messageId": "6dbc13b5-bd57-4c2b-b503-24e381b6c8d6"
|
1606
|
+
},
|
1607
|
+
"configuration": {
|
1608
|
+
"pushNotificationConfig": {
|
1609
|
+
"url": "https://client.example.com/webhook/a2a-notifications",
|
1610
|
+
"token": "secure-client-token-for-task-aaa",
|
1611
|
+
"authentication": {
|
1612
|
+
"schemes": ["Bearer"]
|
1613
|
+
// Assuming server knows how to get a Bearer token for this webhook audience,
|
1614
|
+
// or this implies the webhook is public/uses the 'token' for auth.
|
1615
|
+
// 'credentials' could provide more specifics if needed by the server.
|
1616
|
+
}
|
1617
|
+
}
|
1618
|
+
}
|
1619
|
+
}
|
1620
|
+
}
|
1621
|
+
```
|
1622
|
+
|
1623
|
+
2. **Server acknowledges the task (e.g., status `submitted` or `working`):**
|
1624
|
+
|
1625
|
+
```json
|
1626
|
+
{
|
1627
|
+
"jsonrpc": "2.0",
|
1628
|
+
"id": "req-005",
|
1629
|
+
"result": {
|
1630
|
+
"id": "43667960-d455-4453-b0cf-1bae4955270d",
|
1631
|
+
"contextId": "c295ea44-7543-4f78-b524-7a38915ad6e4",
|
1632
|
+
"status": { "state": "submitted", "timestamp": "2024-03-15T11:00:00Z" }
|
1633
|
+
// ... other fields ...
|
1634
|
+
}
|
1635
|
+
}
|
1636
|
+
```
|
1637
|
+
|
1638
|
+
3. **(Later) A2A Server completes the task and POSTs a notification to `https://client.example.com/webhook/a2a-notifications`:**
|
1639
|
+
|
1640
|
+
- **HTTP Headers might include:**
|
1641
|
+
- `Authorization: Bearer <server_jwt_for_webhook_audience>` (if server authenticates to webhook)
|
1642
|
+
- `Content-Type: application/json`
|
1643
|
+
- `X-A2A-Notification-Token: secure-client-token-for-task-aaa`
|
1644
|
+
- **HTTP Body (Task object is sent as JSON payload):**
|
1645
|
+
|
1646
|
+
```json
|
1647
|
+
{
|
1648
|
+
"id": "43667960-d455-4453-b0cf-1bae4955270d",
|
1649
|
+
"contextId": "c295ea44-7543-4f78-b524-7a38915ad6e4",
|
1650
|
+
"status": { "state": "completed", "timestamp": "2024-03-15T18:30:00Z" },
|
1651
|
+
"kind": "task"
|
1652
|
+
// ... other fields ...
|
1653
|
+
}
|
1654
|
+
```
|
1655
|
+
|
1656
|
+
4. **Client's Webhook Service:**
|
1657
|
+
|
1658
|
+
- Receives the POST.
|
1659
|
+
- Validates the `Authorization` header (if applicable).
|
1660
|
+
- Validates the `X-A2A-Notification-Token`.
|
1661
|
+
- Internally processes the notification (e.g., updates application state, notifies end user).
|
1662
|
+
|
1663
|
+
### 9.6. File Exchange (Upload and Download)
|
1664
|
+
|
1665
|
+
**Scenario:** Client sends an image for analysis, and the agent returns a modified image.
|
1666
|
+
|
1667
|
+
1. **Client `message/send` with a `FilePart` (uploading image bytes):**
|
1668
|
+
|
1669
|
+
```json
|
1670
|
+
{
|
1671
|
+
"jsonrpc": "2.0",
|
1672
|
+
"id": "req-007",
|
1673
|
+
"method": "message/send",
|
1674
|
+
"params": {
|
1675
|
+
"message": {
|
1676
|
+
"role": "user",
|
1677
|
+
"parts": [
|
1678
|
+
{
|
1679
|
+
"kind": "text",
|
1680
|
+
"text": "Analyze this image and highlight any faces."
|
1681
|
+
},
|
1682
|
+
{
|
1683
|
+
"kind": "file",
|
1684
|
+
"file": {
|
1685
|
+
"name": "input_image.png",
|
1686
|
+
"mimeType": "image/png",
|
1687
|
+
"bytes": "iVBORw0KGgoAAAANSUhEUgAAAAUA..." // Base64 encoded image data
|
1688
|
+
}
|
1689
|
+
}
|
1690
|
+
],
|
1691
|
+
"messageId": "6dbc13b5-bd57-4c2b-b503-24e381b6c8d6"
|
1692
|
+
}
|
1693
|
+
}
|
1694
|
+
}
|
1695
|
+
```
|
1696
|
+
|
1697
|
+
2. **Server processes the image and responds with a `FilePart` in an artifact (e.g., providing a URI to the modified image):**
|
1698
|
+
|
1699
|
+
```json
|
1700
|
+
{
|
1701
|
+
"jsonrpc": "2.0",
|
1702
|
+
"id": "req-007",
|
1703
|
+
"result": {
|
1704
|
+
"id": "43667960-d455-4453-b0cf-1bae4955270d",
|
1705
|
+
"contextId": "c295ea44-7543-4f78-b524-7a38915ad6e4",
|
1706
|
+
"status": { "state": "completed", "timestamp": "2024-03-15T12:05:00Z" },
|
1707
|
+
"artifacts": [
|
1708
|
+
{
|
1709
|
+
"artifactId": "9b6934dd-37e3-4eb1-8766-962efaab63a1",
|
1710
|
+
"name": "processed_image_with_faces.png",
|
1711
|
+
"parts": [
|
1712
|
+
{
|
1713
|
+
"kind": "file",
|
1714
|
+
"file": {
|
1715
|
+
"name": "output.png",
|
1716
|
+
"mimeType": "image/png",
|
1717
|
+
// Server might provide a URI to a temporary storage location
|
1718
|
+
"uri": "https://storage.example.com/processed/task-bbb/output.png?token=xyz"
|
1719
|
+
// Or, alternatively, it could return bytes directly:
|
1720
|
+
// "bytes": "ASEDGhw0KGgoAAAANSUhEUgAA..."
|
1721
|
+
}
|
1722
|
+
}
|
1723
|
+
]
|
1724
|
+
}
|
1725
|
+
],
|
1726
|
+
"kind": "task"
|
1727
|
+
}
|
1728
|
+
}
|
1729
|
+
```
|
1730
|
+
|
1731
|
+
### 9.7. Structured Data Exchange (Requesting and Providing JSON)
|
1732
|
+
|
1733
|
+
**Scenario:** Client asks for a list of open support tickets in a specific JSON format.
|
1734
|
+
|
1735
|
+
1. **Client `message/send`, `Part.metadata` hints at desired output schema/Media Type:**
|
1736
|
+
_(Note: A2A doesn't formally standardize schema negotiation in v0.2.0, but `metadata` can be used for such hints by convention between client/server)._
|
1737
|
+
|
1738
|
+
```json
|
1739
|
+
{
|
1740
|
+
"jsonrpc": "2.0",
|
1741
|
+
"id": 9,
|
1742
|
+
"method": "message/send",
|
1743
|
+
"params": {
|
1744
|
+
"message": {
|
1745
|
+
"role": "user",
|
1746
|
+
"parts": [
|
1747
|
+
{
|
1748
|
+
"kind": "text",
|
1749
|
+
"text": "Show me a list of my open IT tickets",
|
1750
|
+
"metadata": {
|
1751
|
+
"mimeType": "application/json",
|
1752
|
+
"schema": {
|
1753
|
+
"type": "array",
|
1754
|
+
"items": {
|
1755
|
+
"type": "object",
|
1756
|
+
"properties": {
|
1757
|
+
"ticketNumber": { "type": "string" },
|
1758
|
+
"description": { "type": "string" }
|
1759
|
+
}
|
1760
|
+
}
|
1761
|
+
}
|
1762
|
+
}
|
1763
|
+
}
|
1764
|
+
],
|
1765
|
+
"messageId": "85b26db5-ffbb-4278-a5da-a7b09dea1b47"
|
1766
|
+
},
|
1767
|
+
"metadata": {}
|
1768
|
+
}
|
1769
|
+
}
|
1770
|
+
```
|
1771
|
+
|
1772
|
+
2. **Server responds with structured JSON data:**
|
1773
|
+
|
1774
|
+
```json
|
1775
|
+
{
|
1776
|
+
"jsonrpc": "2.0",
|
1777
|
+
"id": 9,
|
1778
|
+
"result": {
|
1779
|
+
"id": "d8c6243f-5f7a-4f6f-821d-957ce51e856c",
|
1780
|
+
"contextId": "c295ea44-7543-4f78-b524-7a38915ad6e4",
|
1781
|
+
"status": {
|
1782
|
+
"state": "completed",
|
1783
|
+
"timestamp": "2025-04-17T17:47:09.680794"
|
1784
|
+
},
|
1785
|
+
"artifacts": [
|
1786
|
+
{
|
1787
|
+
"artifactId": "c5e0382f-b57f-4da7-87d8-b85171fad17c",
|
1788
|
+
"parts": [
|
1789
|
+
{
|
1790
|
+
"kind": "text",
|
1791
|
+
"text": "[{\"ticketNumber\":\"REQ12312\",\"description\":\"request for VPN access\"},{\"ticketNumber\":\"REQ23422\",\"description\":\"Add to DL - team-gcp-onboarding\"}]"
|
1792
|
+
}
|
1793
|
+
]
|
1794
|
+
}
|
1795
|
+
],
|
1796
|
+
"kind": "task"
|
1797
|
+
}
|
1798
|
+
}
|
1799
|
+
```
|
1800
|
+
|
1801
|
+
These examples illustrate the flexibility of A2A in handling various interaction patterns and data types. Implementers should refer to the detailed object definitions for all fields and constraints.
|
1802
|
+
|
1803
|
+
## 10. Appendices
|
1804
|
+
|
1805
|
+
### 10.1. Relationship to MCP (Model Context Protocol)
|
1806
|
+
|
1807
|
+
A2A and MCP are complementary protocols designed for different aspects of agentic systems:
|
1808
|
+
|
1809
|
+
- **[Model Context Protocol (MCP)](https://modelcontextprotocol.io/):** Focuses on standardizing how AI models and agents connect to and interact with **tools, APIs, data sources, and other external resources.** It defines structured ways to describe tool capabilities (like function calling in LLMs), pass inputs, and receive structured outputs. Think of MCP as the "how-to" for an agent to _use_ a specific capability or access a resource.
|
1810
|
+
- **Agent2Agent Protocol (A2A):** Focuses on standardizing how independent, often opaque, **AI agents communicate and collaborate with each other as peers.** A2A provides an application-level protocol for agents to discover each other, negotiate interaction modalities, manage shared tasks, and exchange conversational context or complex results. It's about how agents _partner_ or _delegate_ work.
|
1811
|
+
|
1812
|
+
**How they work together:**
|
1813
|
+
An A2A Client agent might request an A2A Server agent to perform a complex task. The Server agent, in turn, might use MCP to interact with several underlying tools, APIs, or data sources to gather information or perform actions necessary to fulfill the A2A task.
|
1814
|
+
|
1815
|
+
For a more detailed comparison, see the [A2A and MCP guide](./topics/a2a-and-mcp.md).
|
1816
|
+
|
1817
|
+
### 10.2. Security Considerations Summary
|
1818
|
+
|
1819
|
+
Security is a paramount concern in A2A. Key considerations include:
|
1820
|
+
|
1821
|
+
- **Transport Security:** Always use HTTPS with strong TLS configurations in production environments.
|
1822
|
+
- **Authentication:**
|
1823
|
+
- Handled via standard HTTP mechanisms (e.g., `Authorization` header with Bearer tokens, API keys).
|
1824
|
+
- Requirements are declared in the `AgentCard`.
|
1825
|
+
- Credentials MUST be obtained out-of-band by the client.
|
1826
|
+
- A2A Servers MUST authenticate every request.
|
1827
|
+
- **Authorization:**
|
1828
|
+
- A server-side responsibility based on the authenticated identity.
|
1829
|
+
- Implement the principle of least privilege.
|
1830
|
+
- Can be granular, based on skills, actions, or data.
|
1831
|
+
- **Push Notification Security:**
|
1832
|
+
- Webhook URL validation (by the A2A Server sending notifications) is crucial to prevent SSRF.
|
1833
|
+
- Authentication of the A2A Server to the client's webhook is essential.
|
1834
|
+
- Authentication of the notification by the client's webhook receiver (verifying it came from the legitimate A2A Server and is relevant) is critical.
|
1835
|
+
- See the [Streaming & Asynchronous Operations guide](./topics/streaming-and-async.md#security-considerations-for-push-notifications) for detailed push notification security.
|
1836
|
+
- **Input Validation:** Servers MUST rigorously validate all RPC parameters and the content/structure of data in `Message` and `Artifact` parts to prevent injection attacks or processing errors.
|
1837
|
+
- **Resource Management:** Implement rate limiting, concurrency controls, and resource limits to protect agents from abuse or overload.
|
1838
|
+
- **Data Privacy:** Adhere to all applicable privacy regulations for data exchanged in `Message` and `Artifact` parts. Minimize sensitive data transfer.
|
1839
|
+
|
1840
|
+
For a comprehensive discussion, refer to the [Enterprise-Ready Features guide](./topics/enterprise-ready.md).
|
1841
|
+
|
1842
|
+
## 11. A2A Compliance Requirements
|
1843
|
+
|
1844
|
+
This section defines the normative requirements for A2A-compliant implementations.
|
1845
|
+
|
1846
|
+
### 11.1. Agent Compliance
|
1847
|
+
|
1848
|
+
For an agent to be considered **A2A-compliant**, it **MUST**:
|
1849
|
+
|
1850
|
+
#### 11.1.1. Transport Support Requirements
|
1851
|
+
|
1852
|
+
- **Support at least one transport**: Agents **MUST** implement at least one transport protocols as defined in [Section 3.2](#32-supported-transport-protocols).
|
1853
|
+
- **Expose Agent Card**: **MUST** provide a valid `AgentCard` document as defined in [Section 5](#5-agent-discovery-the-agent-card).
|
1854
|
+
- **Declare transport capabilities**: **MUST** accurately declare all supported transports in the `AgentCard` using `preferredTransport` and `additionalInterfaces` fields following the requirements in [Section 5.6](#56-transport-declaration-and-url-relationships).
|
1855
|
+
|
1856
|
+
#### 11.1.2. Core Method Implementation
|
1857
|
+
|
1858
|
+
**MUST** implement all of the following core methods via at least one supported transport:
|
1859
|
+
|
1860
|
+
- `message/send` - Send messages and initiate tasks
|
1861
|
+
- `tasks/get` - Retrieve task status and results
|
1862
|
+
- `tasks/cancel` - Request task cancellation
|
1863
|
+
|
1864
|
+
#### 11.1.3. Optional Method Implementation
|
1865
|
+
|
1866
|
+
**MAY** implement the following optional methods:
|
1867
|
+
|
1868
|
+
- `message/stream` - Streaming message interaction (requires `capabilities.streaming: true`)
|
1869
|
+
- `tasks/resubscribe` - Resume streaming for existing tasks (requires `capabilities.streaming: true`)
|
1870
|
+
- `tasks/pushNotificationConfig/set` - Configure push notifications (requires `capabilities.pushNotifications: true`)
|
1871
|
+
- `tasks/pushNotificationConfig/get` - Retrieve push notification config (requires `capabilities.pushNotifications: true`)
|
1872
|
+
- `tasks/pushNotificationConfig/list` - List push notification configs (requires `capabilities.pushNotifications: true`)
|
1873
|
+
- `tasks/pushNotificationConfig/delete` - Delete push notification config (requires `capabilities.pushNotifications: true`)
|
1874
|
+
- `agent/authenticatedExtendedCard` - Retrieve authenticated agent card (requires `supportsAuthenticatedExtendedCard: true`)
|
1875
|
+
|
1876
|
+
#### 11.1.4. Multi-Transport Compliance
|
1877
|
+
|
1878
|
+
If an agent supports additional transports (gRPC, HTTP+JSON), it **MUST**:
|
1879
|
+
|
1880
|
+
- **Functional equivalence**: Provide identical functionality across all supported transports.
|
1881
|
+
- **Consistent behavior**: Return semantically equivalent results for the same operations.
|
1882
|
+
- **Transport-specific requirements**: Conform to all requirements defined in [Section 3.2](#32-supported-transport-protocols) for each supported transport.
|
1883
|
+
- **Method mapping compliance**: Use the standard method mappings defined in [Section 3.5](#35-method-mapping-and-naming-conventions) for all supported transports.
|
1884
|
+
|
1885
|
+
#### 11.1.5. Data Format Compliance
|
1886
|
+
|
1887
|
+
- **JSON-RPC structure**: **MUST** use valid JSON-RPC 2.0 request/response objects as defined in [Section 6.11](#611-json-rpc-structures).
|
1888
|
+
- **A2A data objects**: **MUST** use the data structures defined in [Section 6](#6-protocol-data-objects) for all protocol entities.
|
1889
|
+
- **Error handling**: **MUST** use the error codes defined in [Section 8](#8-error-handling).
|
1890
|
+
|
1891
|
+
### 11.2. Client Compliance
|
1892
|
+
|
1893
|
+
For a client to be considered **A2A-compliant**, it **MUST**:
|
1894
|
+
|
1895
|
+
#### 11.2.1. Transport Support
|
1896
|
+
|
1897
|
+
- **Multi-transport capability**: **MUST** be able to communicate with agents using at least one transport protocols.
|
1898
|
+
- **Agent Card processing**: **MUST** be able to parse and interpret `AgentCard` documents.
|
1899
|
+
- **Transport selection**: **MUST** be able to select an appropriate transport from the agent's declared capabilities following the rules defined in [Section 5.6.3](#563-client-transport-selection-rules).
|
1900
|
+
|
1901
|
+
#### 11.2.2. Protocol Implementation
|
1902
|
+
|
1903
|
+
- **Core method usage**: **MUST** properly construct requests for at least `message/send` and `tasks/get` methods.
|
1904
|
+
- **Error handling**: **MUST** properly handle all A2A error codes defined in [Section 8.2](#82-a2a-specific-errors).
|
1905
|
+
- **Authentication**: **MUST** support at least one authentication method when interacting with agents that require authentication.
|
1906
|
+
|
1907
|
+
#### 11.2.3. Optional Client Features
|
1908
|
+
|
1909
|
+
Clients **MAY** implement:
|
1910
|
+
|
1911
|
+
- **Multi-transport support**: Support for gRPC and/or HTTP+JSON transports.
|
1912
|
+
- **Streaming support**: Handle streaming methods and Server-Sent Events.
|
1913
|
+
- **Push notification handling**: Serve as webhook endpoints for push notifications.
|
1914
|
+
- **Extended Agent Cards**: Retrieve and use authenticated extended agent cards.
|
1915
|
+
|
1916
|
+
### 11.3. Compliance Testing
|
1917
|
+
|
1918
|
+
Implementations **SHOULD** validate compliance through:
|
1919
|
+
|
1920
|
+
- **Transport interoperability**: Test communication with agents using different transport implementations.
|
1921
|
+
- **Method mapping verification**: Verify that all supported transports use the correct method names and URL patterns as defined in [Section 3.5](#35-method-mapping-and-naming-conventions).
|
1922
|
+
- **Error handling**: Verify proper handling of all defined error conditions.
|
1923
|
+
- **Data format validation**: Ensure JSON schemas match the TypeScript type definitions in [`types/src/types.ts`](https://github.com/a2aproject/A2A/blob/main/types/src/types.ts).
|
1924
|
+
- **Multi-transport consistency**: For multi-transport agents, verify functional equivalence across all supported transports.
|