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
{{ message }}
Repository navigation
Commit eae0a18
Browse filesBrowse the repository at this point in the historyBrowse files
- Dedicated v0.3 client (`Client_v0_3`) exposing only features available in v0.3
19
+
- Unified v1.0 client compatibility adapters that allow the normal `Client` API to communicate with v0.3 agents
20
+
- Legacy v0.3 client (`Client_v0_3`) exposing only features available in v0.3
20
21
- Server-side conversion layer (`Convert_v0_3_To10RequestHandler`) that accepts v0.3 requests and delegates to v1.0 server-common
21
22
- Server-side transport handlers for v0.3 (JSON-RPC, gRPC, REST)
22
23
- Bidirectional mapping layer between v0.3 and v1.0 domain objects
@@ -30,7 +31,7 @@ The A2A protocol evolved from v0.3 to v1.0 with significant breaking changes. Ex
30
31
### Out of Scope
31
32
32
33
- Changes to existing v1.0 modules (no regressions, no API changes)
33
-
-Automatic protocol version detection (client must explicitly choose API version)
34
+
-Implicit protocol downgrade or automatic version selection (the unified client requires the caller to explicitly request supported protocol versions during agent-card discovery)
34
35
- Extras modules (OpenTelemetry, JPA stores, etc.) for v0.3
35
36
- Serving a separate v0.3-format agent card (the v1.0 card is served, with optional v0.3-compatible fields added by the user)
36
37
@@ -107,13 +108,21 @@ All compat-0.3 classes use a `_v0_3` suffix to avoid naming conflicts with v1.0
107
108
108
109
### Dedicated v0.3 Client
109
110
110
-
The compat layer exposes a **dedicated `Client_v0_3`** that only provides features available in v0.3:
111
+
The compat layer retains a **dedicated `Client_v0_3`**for applications that already use the v0.3 API directly. It only provides features available in v0.3:
111
112
112
113
- No `listTasks()` method (absent in v0.3)
113
114
- Method names reflect v0.3 semantics where they differ
114
115
- The client is a standalone API, not a wrapper around the v1.0 `Client`
115
116
116
-
Users must explicitly check the `protocolVersion` field from the agent card and instantiate the correct client accordingly. No automatic version detection.
117
+
This is the legacy path. New applications should use the unified v1.0 `Client` path below instead.
118
+
119
+
### Unified v1.0 Client with v0.3 Compatibility
120
+
121
+
The recommended path for new applications is the normal v1.0 `Client` API with optional v0.3 compatibility artifacts. Applications continue to use v1.0 `AgentCard`, request, response, event, configuration, context, and interceptor types; they do not need to import `Client_v0_3` or v0.3 domain types.
122
+
123
+
The caller explicitly requests the protocol versions it is willing to use during agent-card discovery. If a v0.3 interface is selected, the compatibility parser projects its card into a v1.0 `AgentCard`, and a version-aware transport adapter converts calls between v1.0 and v0.3. The unified client does not silently downgrade when v0.3 was not requested.
124
+
125
+
The compatibility parser and the adapter for the selected binding are optional dependencies. The adapter rejects v1.0 operations that have no v0.3 equivalent, such as `listTasks`, before sending a request. If the requested compatibility parser or binding adapter is absent, discovery or client construction reports the missing artifact.
The returned card contains a v1.0 `AgentInterface` marked with protocol version `"0.3"`. The ordinary builder selects the matching compatibility adapter, while a native v1.0 interface continues to use the normal transport.
470
+
471
+
Existing applications that use v0.3 domain types directly can continue using the legacy API:
472
+
473
+
**1. Add the legacy compat client dependency:**
431
474
432
475
```xml
433
476
<dependency>
@@ -441,7 +484,7 @@ The `server-conversion` module produces a test-jar containing shared test infras
441
484
</dependency>
442
485
```
443
486
444
-
**2. Find the v0.3 interface and create the client:**
487
+
**2. Find the v0.3 interface and create the legacy client:**
445
488
446
489
```java
447
490
AgentCard card =// ... fetch agent card from /.well-known/agent-card.json
`Client_v0_3` exposes only operations available in v0.3. Return types are v0.3 `org.a2aproject.sdk.compat03.spec` domain objects.
504
+
`Client_v0_3` exposes only operations available in v0.3, and its return types are v0.3 `org.a2aproject.sdk.compat03.spec` domain objects. This path is useful for existing integrations but requires applications to use the legacy API and types directly.
462
505
463
506
### Server: Serving v0.3 Clients
464
507
@@ -540,7 +583,8 @@ For JSON-RPC and REST, multi-version convenience modules are also available that
540
583
|`Convert_v0_3_To10RequestHandler`| Integration tests | Via transport handler tests using real v1.0 backend |
541
584
| Transport handlers | Unit + Integration | Handler-level tests + end-to-end via reference servers |
0 commit comments