You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Browse filesBrowse the repository at this point in the historyBrowse files
authored
fix(spec): Clarify versioning strategy and client responsibilities in protocol specification (#1259)
Fixes#1258
### High level summary of changes:
- protocolVersion in AgentCard is now an array called protocolVersions
- Servers are expected to return UnsupportedVersionError if they get a
request with an A2A-Version header higher than they support.
- Clients are expected to fallback to a supported version if that is
acceptable to them. Tooling should help here.
- Not every minor version needs to be enumerated in the protocolVersions
array. 2.2 infers support for 2.1 and 2.0.
---------
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: Luca Muscariello <muscariello@ieee.org>
Co-authored-by: Sam Betts <1769706+Tehsmash@users.noreply.github.com>
Copy file name to clipboardExpand all lines: docs/specification.md
+49-26Lines changed: 49 additions & 26 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -704,11 +704,50 @@ Push notifications are delivered via HTTP POST to client-registered webhook endp
704
704
705
705
### 3.6 Versioning
706
706
707
-
The specific version of the A2A protocol in use is identified using the `Major.Minor` elements (e.g. `1.0`) of the corresponding A2A specification version. Patch version numbers do not affect protocol compatibility, SHOULD NOT be included in requestsand responses, and MUST not be considered when clients and servers negotiate protocol versions.
707
+
The specific version of the A2A protocol in use is identified using the `Major.Minor` elements (e.g. `1.0`) of the corresponding A2A specification version. Patch version numbers used by the specification, do not affect protocol compatibility. Patch version numbers SHOULD NOT be used in requests, responses and Agent Cards, and MUST not be considered when clients and servers negotiate protocol versions.
708
708
709
-
Agents declare support for latest supported protocol version in the `protocolVersion` field in the Agent Card. Agents MAY also support earlier protocol versions. Clients SHOULD specify the desired protocol version in requests using the `A2A-Version` header. If the requested version is not supported by the agent, the agent MUST return a `VersionNotSupportedError`.
709
+
#### 3.6.1 Client Responsibilities
710
710
711
-
It is RECOMMENDED that clients send the `A2A-Version` header with each request to reduce the chances of being broken if an agent upgrades to a new version of the protocol. Sending the `A2A-Version` header provides visibility to agents about version usage in the ecosystem, which can help inform the risks of inplace version upgrades.
711
+
It is RECOMMENDED that clients send the `A2A-Version` header with each request to maintain compatibility after an agent upgrades to a new version of the protocol. Sending the `A2A-Version` header also provides visibility to agents about version usage in the ecosystem, which can help inform the risks of inplace version upgrades.
712
+
713
+
**Example of HTTP GET Request with Version Header:**
Agents MUST process requests using the semantics of the requested `A2A-Version` (matching `Major.Minor`). If the version is not supported, agents MUST return a [`VersionNotSupportedError`](#332-error-handling).
726
+
727
+
Agents SHOULD declare their supported protocol versions in the `protocolVersions` field of their Agent Card:
728
+
729
+
-**For stable versions (1.x and above):** Backward compatibility within a major version is required. An agent supporting version `1.2` must also support `1.0` and `1.1`. Only the latest supported minor version per major version needs to be listed.
730
+
-**For legacy experimental versions (0.x):** These early versions introduced breaking changes between minor versions. Agents that still support any `0.x` versions MUST explicitly list each one they support.
731
+
732
+
**Example of Agent Card with Supported Protocol Versions:**
733
+
734
+
```json
735
+
{
736
+
"agentId": "agent-123",
737
+
"name": "Example Agent",
738
+
"protocolVersions": ["0.3", "1.1"]
739
+
}
740
+
```
741
+
742
+
The above example indicates that the agent supports A2A protocol versions `0.3`, `1.0` and `1.1`.
743
+
744
+
#### 3.6.3 Client Fallback
745
+
746
+
Clients that receive a `VersionNotSupportedError` can choose to retry the request with an earlier supported version, or fail the request. This explicit failure handling helps prevent unexpected behavior that could arise if an agent processes a request containing protocol features or fields it does not recognize.
747
+
748
+
#### 3.6.4 Tooling support
749
+
750
+
Tooling libraries and SDKs that implement the A2A protocol SHOULD provide mechanisms to help clients manage protocol versioning, such as providing configuration options to enable automatic fallback to earlier versions when a `VersionNotSupportedError` is encountered. Client Agents that require the latest features of the protocol should not enable automatic fallback, to avoid silently losing functionality.
712
751
713
752
## 4. Protocol Data Model
714
753
@@ -855,22 +894,6 @@ For detailed security guidance on push notifications, see [Section 13.2 Push Not
-**`protocolVersion`** (required, string): The version of the A2A protocol this agent supports (e.g., "1.0"). Defaults to "1.0".
859
-
-**`name`** (required, string): A human-readable name for the agent.
860
-
-**`description`** (required, string): A human-readable description of the agent, assisting users and other agents in understanding its purpose.
861
-
-**`supportedInterfaces`** (optional, array of [`AgentInterface`](#446-agentinterface)): An ordered list of supported interfaces (protocol binding and URL combinations). The first item in the list is the preferred interface that clients should use when possible. Clients can select any interface from this list based on their preferences, but SHOULD prefer earlier entries when multiple options are supported.
862
-
-**`provider`** (optional, [`AgentProvider`](#442-agentprovider)): The service provider of the agent.
863
-
-**`version`** (required, string): The version of the agent (e.g., "1.0.0").
864
-
-**`documentationUrl`** (optional, string): A URL to provide additional documentation about the agent.
865
-
-**`capabilities`** (required, [`AgentCapabilities`](#443-agentcapabilities)): A2A capability set supported by the agent.
866
-
-**`securitySchemes`** (optional, map of string to [`SecurityScheme`](#451-securityscheme)): The security scheme details used for authenticating with this agent.
867
-
-**`security`** (optional, array of Security): Security requirements for contacting the agent.
868
-
-**`defaultInputModes`** (required, array of strings): The set of interaction modes that the agent supports across all skills, defined as media types.
869
-
-**`defaultOutputModes`** (required, array of strings): The media types supported as outputs from this agent.
870
-
-**`skills`** (required, array of [`AgentSkill`](#445-agentskill)): Skills represent units of ability an agent can perform.
871
-
-**`supportsExtendedAgentCard`** (optional, boolean): Whether the agent supports providing an extended agent card when authenticated.
872
-
-**`signatures`** (optional, array of [`AgentCardSignature`](#447-agentcardsignature)): JSON Web Signatures computed for this AgentCard.
873
-
-**`iconUrl`** (optional, string): An optional URL to an icon for the agent.
874
897
<aid="AgentProvider"></a>
875
898
876
899
#### 4.4.2. AgentProvider
@@ -988,7 +1011,7 @@ Agents declare their supported extensions in the [`AgentCard`](#441-agentcard) u
988
1011
989
1012
```json
990
1013
{
991
-
"protocolVersion": "0.3.0",
1014
+
"protocolVersions": ["0.3"],
992
1015
"name": "Research Assistant Agent",
993
1016
"description": "AI agent for academic research and fact-checking",
994
1017
"supportedInterfaces": [
@@ -1187,7 +1210,7 @@ All JSON serializations of the A2A protocol data model **MUST** use **camelCase*
@@ -1246,7 +1269,7 @@ Fields marked with `[(google.api.field_behavior) = REQUIRED]` indicate that the
1246
1269
1247
1270
The Protocol Buffer `optional` keyword is used to distinguish between a field being explicitly set versus omitted. This distinction is critical for two scenarios:
1248
1271
1249
-
1.**Explicit Default Values:** Some fields in the specification define default values that differ from Protocol Buffer's implicit defaults (e.g., `protocolVersion` defaults to `"1.0"` rather than empty string). The `optional` keyword allows implementations to detect whether a value was explicitly provided or should use the specified default.
1272
+
1.**Explicit Default Values:** Some fields in the specification define default values that differ from Protocol Buffer's implicit defaults (e.g., `protocolVersions` defaults to `["1.0"]` rather than an empty array). Implementations should apply the default value when the field is not explicitly provided.
1250
1273
1251
1274
2.**Agent Card Canonicalization:** When creating cryptographic signatures of Agent Cards, it is required to produce a canonical JSON representation. The `optional` keyword enables implementations to distinguish between fields that were explicitly set (and should be included in the canonical form) versus fields that were omitted (and should be excluded from canonicalization). This ensures Agent Cards can be reconstructed to accurately match their signature.
1252
1275
@@ -1845,7 +1868,7 @@ HTTP/1.1 200 OK
1845
1868
Content-Type: application/a2a+json
1846
1869
1847
1870
{
1848
-
"protocolVersion": "0.3.0",
1871
+
"protocolVersions": ["1.0"],
1849
1872
"name": "Extended Agent with Additional Skills",
1850
1873
"skills": [
1851
1874
/* Extended skills available to authenticated users */
"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.",
2079
2102
"supportedInterfaces": [
@@ -3443,15 +3466,15 @@ For **Clients** upgrading from pre-0.3.x:
3443
3466
3444
3467
1. Update parsers to expect wrapper objects with member names as discriminators
3445
3468
2. When constructing requests, use the new wrapper format
3446
-
3. Implement version detection based on the agent's `protocolVersion` in the `AgentCard`
3469
+
3. Implement version detection based on the agent's `protocolVersions` in the `AgentCard`
3447
3470
4. Consider maintaining backward compatibility by detecting and handling both formats during a transition period
3448
3471
3449
3472
For **Servers** upgrading from pre-0.3.x:
3450
3473
3451
3474
1. Update serialization logic to emit wrapper objects
3452
3475
2.**Breaking:** The `kind` field is no longer part of the protocol and should not be emitted
3453
3476
3. Update deserialization to expect wrapper objects with member names
3454
-
4. Ensure the `AgentCard` declares the correct `protocolVersion` (1.0 or later)
3477
+
4. Ensure the `AgentCard` declares the correct `protocolVersions` (e.g., ["1.0"] or later)
0 commit comments