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
Copy file name to clipboardExpand all lines: docs/migrations/v1_0/README.md
+26-6Lines changed: 26 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -57,12 +57,12 @@ pip install --upgrade a2a-sdk
57
57
58
58
## 2. Types
59
59
60
-
[Types](https://github.com/a2aproject/a2a-python/blob/main/src/a2a/types/a2a_pb2.pyi) have migrated from Pydantic models to Protobuf-based classes to align with the A2A spec's proto-first design and adopt ProtoJSON as the canonical JSON serialization standard, ensuring consistent cross-implementation interoperability.
60
+
[Types](https://github.com/a2aproject/a2a-python/blob/main/src/a2a/types/a2a_pb2.pyi) have migrated from Pydantic models to Protobuf-based classes to align with the A2A spec's proto-first design and to adopt ProtoJSON as the canonical JSON serialization standard, ensuring consistent cross-implementation interoperability.
All the enum values are now [standardized](https://a2a-protocol.org/v1.0.0/specification/#55-json-field-naming-convention) to use `SCREAMING_SNAKE_CASE` format.
65
+
All enum values are now [standardized](https://a2a-protocol.org/v1.0.0/specification/#55-json-field-naming-convention) to use `SCREAMING_SNAKE_CASE` format.
66
66
67
67
This affects every enum in the SDK: `TaskState`, `Role`.
68
68
@@ -95,9 +95,9 @@ Constructing messages is simplified in v1.0. The old API required wrapping conte
| Structured data |`Part(DataPart(data=..., ...))`|`Part(data=..., ...)`|
97
97
98
-
> **Note on file bytes**: In v0.3 `FileWithBytes.bytes` was a **base64-encoded string**. In v1.0 `Part.raw` is raw **`bytes`** — no base64 encoding needed.
99
-
100
-
> **Note on structured data**: In v0.3 `DataPart.data`was a plain `dict`. In v1.0 `Part.data` is a `google.protobuf.Value`, so use `ParseDict` to convert from a Python dict.
98
+
**Note**:
99
+
* When using `File (bytes)` in v1.0, the data serialisatinon (via base64 encoding) is not required as A2A now uses Protobuf that automatically does it for you.
100
+
*In v1.0, `Part.DataPart.data`is renamed to `Part.data`and is of type `google.protobuf.Value`. Use `ParseDict` to convert a Python dict into a suitable value. Check the examples below for better understanding.
101
101
102
102
**Before (v0.3):**
103
103
```python
@@ -189,7 +189,7 @@ message = new_text_message(text="What's the weather in Warsaw?", role=Role.ROLE_
189
189
### AgentCard Structure
190
190
191
191
Key changes:
192
-
- Added `AgentInterface` class to support multiple transport bindings via the newly added `supported_interfaces` field in AgentCard.
192
+
- Added an `AgentInterface` class to support multiple transport bindings via the newly added `supported_interfaces` field in AgentCard.
193
193
- The `url` parameter in `AgentCard` is removed and is now part of `AgentInterface`.
194
194
- Accepted values for `AgentInterface.protocol_binding`: `'JSONRPC'`, `'HTTP+JSON'`, `'GRPC'`
195
195
- The `AgentCard.supports_authenticated_extended_card` field is renamed to `AgentCapabilities.extended_agent_card`.
@@ -200,6 +200,16 @@ Key changes:
200
200
```python
201
201
from a2a.types import AgentCard, AgentCapabilities, AgentSkill
202
202
203
+
skill = AgentSkill(
204
+
id='hello_world',
205
+
name='Hello World',
206
+
description='Returns a Hello World message.',
207
+
tags=['hello', 'world'],
208
+
input_modes=['text/plain'],
209
+
output_modes=['text/plain'],
210
+
examples=['hello world'],
211
+
)
212
+
203
213
agent_card = AgentCard(
204
214
name='Hello World Agent',
205
215
description='Returns Hello, World!',
@@ -222,6 +232,16 @@ agent_card = AgentCard(
222
232
```python
223
233
from a2a.types import AgentCard, AgentCapabilities, AgentInterface, AgentSkill
224
234
235
+
skill = AgentSkill(
236
+
id='hello_world',
237
+
name='Hello World',
238
+
description='Returns a Hello World message.',
239
+
tags=['hello', 'world'],
240
+
input_modes=['text/plain'],
241
+
output_modes=['text/plain'],
242
+
examples=['hello world', 'Hello, World!'], # moved from AgentCard.examples
0 commit comments