Skip to content

Commit 4803e35

Browse files
committed
grammar fix
1 parent 942c850 commit 4803e35

1 file changed

Lines changed: 12 additions & 12 deletions

File tree

docs/migrations/v1_0/README.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ This documentation details the technical upgrades and architectural modification
3131

3232
## 1. Update Dependencies
3333

34-
(UV users) To upgrade to the latest version of the `a2a-sdk`, update the dependencies section in your `pyproject.toml` file.
34+
For UV users: To upgrade to the latest version of the `a2a-sdk`, update the dependencies section in your `pyproject.toml` file.
3535

3636
| File | Before (`v0.3`) | After (`v1.0`) |
3737
|------------------|-----------------------------------|-----------------------------------|
@@ -97,7 +97,7 @@ Constructing messages is simplified in v1.0. The old API required wrapping conte
9797

9898
**Note**:
9999
* 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.
101101

102102
**Before (v0.3):**
103103
```python
@@ -301,7 +301,7 @@ request_handler = DefaultRequestHandler(
301301

302302
## 4. Server: Application Setup
303303

304-
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.
305305

306306
**Before (v0.3):**
307307
```python
@@ -320,12 +320,12 @@ uvicorn.run(server.build(), host=host, port=port)
320320

321321
**After (v1.0):**
322322

323-
Define routes for each supported transport as per AgentCard.
323+
Define routes for each supported transport as defined in the `AgentCard`.
324324

325325
```python
326326
from a2a.server.routes import create_agent_card_routes, create_jsonrpc_routes
327327

328-
# Define routes for transports as per AgentCard
328+
# Define routes for transports as defined in the AgentCard
329329
routes = []
330330
# A2A Agent Card routes
331331
routes.extend(create_agent_card_routes(agent_card))
@@ -391,7 +391,7 @@ create_rest_routes(request_handler, enable_v0_3_compat=True)
391391

392392
## 6. Client: Creating a Client
393393

394-
In `v1.0`, use `a2a.client.create_client()` helper function to create a `Client` for the agent.
394+
In `v1.0`, use the `a2a.client.create_client()` helper function to create a `Client` for the agent.
395395

396396

397397
**Before (v0.3):**
@@ -427,7 +427,7 @@ client = await create_client(agent_card)
427427

428428
The `BaseClient.send_message()` return type is standardized from `AsyncIterator[ClientEvent | Message]` to `AsyncIterator[StreamResponse]`.
429429

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.
431431

432432

433433
**Before (v0.3):**
@@ -498,9 +498,9 @@ To improve the developer experience, we have consolidated helper functions into
498498
| `new_text_message` | Creates a `Message` with a single text `Part`; role defaults to `ROLE_AGENT`. |
499499
| `new_text_status_update_event` | Creates a `TaskStatusUpdateEvent` with a text message. |
500500

501-
Example Usage:
501+
**Example usage:**
502502

503-
**1. Create text based message**
503+
**1. Create a text-based message**
504504

505505
```python
506506
from a2a.helpers import new_text_message
@@ -513,7 +513,7 @@ user_message = new_text_message("What's the weather?", role=Role.ROLE_USER)
513513
response_message = new_text_message("It is sunny today!")
514514
```
515515

516-
**2. Extract the text out of a message**
516+
**2. Extract text from a message**
517517

518518
```python
519519
from a2a.helpers import get_message_text
@@ -530,9 +530,9 @@ print(text)
530530
- **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.
531531
- **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.
532532
- **`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`.
534534
- **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.
536536
- **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.
537537

538538
---

0 commit comments

Comments
 (0)