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
@@ -97,7 +97,7 @@ Constructing messages is simplified in v1.0. The old API required wrapping conte
97
97
98
98
**Note**:
99
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.
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. See the examples below for more details.
The application wrapper classes (`A2AStarletteApplication`, `A2AFastApiApplication` and `A2ARESTFastApiApplication`) are now removed. The Server setup now uses Starlette route factory functions directly, giving you better control over the routing, middleware, authentication, logging and other aspects of the server.
304
+
The application wrapper classes (`A2AStarletteApplication`, `A2AFastApiApplication` and `A2ARESTFastApiApplication`) have been removed. The server setup now uses Starlette route factory functions directly, giving you better control over the routing, middleware, authentication, logging, and other aspects of the server.
The `BaseClient.send_message()` return type is standardized from `AsyncIterator[ClientEvent | Message]` to `AsyncIterator[StreamResponse]`.
429
429
430
-
Each `StreamResponse`yields exactly one of: (`task`, `message`, `status_update`, or `artifact_update`). Use `HasField()` to check which field is set.
430
+
Each `StreamResponse`contains exactly one of: `task`, `message`, `status_update`, or `artifact_update`. Use `HasField()` to check which field is set.
431
431
432
432
433
433
**Before (v0.3):**
@@ -498,9 +498,9 @@ To improve the developer experience, we have consolidated helper functions into
498
498
|`new_text_message`| Creates a `Message` with a single text `Part`; role defaults to `ROLE_AGENT`. |
499
499
|`new_text_status_update_event`| Creates a `TaskStatusUpdateEvent` with a text message. |
500
500
501
-
Example Usage:
501
+
**Example usage:**
502
502
503
-
**1. Create text based message**
503
+
**1. Create a text-based message**
504
504
505
505
```python
506
506
from a2a.helpers import new_text_message
@@ -513,7 +513,7 @@ user_message = new_text_message("What's the weather?", role=Role.ROLE_USER)
513
513
response_message = new_text_message("It is sunny today!")
514
514
```
515
515
516
-
**2. Extract the text out of a message**
516
+
**2. Extract text from a message**
517
517
518
518
```python
519
519
from a2a.helpers import get_message_text
@@ -530,9 +530,9 @@ print(text)
530
530
-**Migration to Protobuf** — Core types have migrated from Pydantic models to Protobuf-based classes. Protobuf objects do not support arbitrary attribute assignment. Use `MessageToDict` from `google.protobuf.json_format` to convert objects to dictionaries, and `HasField('field_name')` to check for optional fields.
531
531
-**Standardization to `SCREAMING_SNAKE_CASE`** — All enum values have been renamed from `snake_case` strings to `SCREAMING_SNAKE_CASE` for compliance with the ProtoJSON specification.
532
532
-**`AgentCard`** — Significantly restructured to support multiple transport interfaces.
533
-
-**`AgentInterface`** — The top-level `url` field is replaced by `supported_interfaces`, a list of `AgentInterface` objects. Each entry describes a single transport endpoint carrying`protocol_binding`, `protocol_version`, and `url`.
533
+
-**`AgentInterface`** — The top-level `url` field is replaced by `supported_interfaces`, a list of `AgentInterface` objects. Each entry describes a single transport endpoint with fields for`protocol_binding`, `protocol_version`, and `url`.
534
534
-**Input and output modes** — `AgentCapabilities.input_modes` and `AgentCapabilities.output_modes` are removed and now live directly on `AgentCard` as `default_input_modes` and `default_output_modes`. Individual skills can override these with their own `input_modes` and `output_modes`.
535
-
-**Application setup** — The wrapper classes (`A2AStarletteApplication`, `A2AFastApiApplication` and `A2ARESTFastApiApplication`) are now removed. Server setup now uses route factory functions `create_jsonrpc_routes()`, `create_rest_routes()`, `create_agent_card_routes()` composed directly into a Starlette or FastAPI app.
535
+
-**Application setup** — The wrapper classes (`A2AStarletteApplication`, `A2AFastApiApplication` and `A2ARESTFastApiApplication`) have been removed. Server setup now uses route factory functions — `create_jsonrpc_routes()`, `create_rest_routes()`, and `create_agent_card_routes()` — composed directly into a Starlette or FastAPI app.
536
536
-**Helper utilities** — A new `a2a.helpers` module consolidates all helper functions under a single import, replacing the scattered `a2a.utils.*` modules and adding new helpers for constructing and reading v1.0 proto types.
0 commit comments