Skip to content

Conversation

@Tehsmash
Copy link

@Tehsmash Tehsmash commented Nov 20, 2025

Description

This updates the SDK to be A2A v1.0 compliant, all types are generated from the v1.0 a2a.proto. JSONRPC/HTTP+JSON transports are converted to use the a2a types encoded using ProtoJSON directly from the generated types.

Thank you for opening a Pull Request!
Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

  • Follow the CONTRIBUTING Guide.
  • Make your Pull Request title in the https://www.conventionalcommits.org/ specification.
    • Important Prefixes for release-please:
      • fix: which represents bug fixes, and correlates to a SemVer patch.
      • feat: represents a new feature, and correlates to a SemVer minor.
      • feat!:, or fix!:, refactor!:, etc., which represent a breaking change (indicated by the !) and will result in a SemVer major.
  • Ensure the tests and linter pass (Run bash scripts/format.sh from the repository root to format)
  • Appropriate docs were updated (if necessary)

Fixes #559

@holtskinner
Copy link
Member

This is a pretty good start on converting the types generation from the a2a.json to the a2a.proto. My main concern is that this is going to be a breaking change because the existing typing are based on Pydantic models, not Protobuf. This would need to be handled carefully to prevent breaking changes.

This updates the SDK to be A2A v1.0 compliant, all types are generated
from the v1.0 a2a.proto. JSONRPC/HTTP+JSON transports are converted to
use the a2a types encoded using ProtoJSON directly from the generated
types.
@muscariello
Copy link
Member

@holtskinner if we assume this is going to be done from 1.0 only, spec which is not released yet, where we acknowledge breaking changes are acceptable, would this be acceptable for the python SDK ?

BREAKING CHANGE: Replace Pydantic-based type system with protobuf types

- Update all source files to use proto types directly from a2a_pb2
- Replace model_dump() with MessageToDict() for JSON serialization
- Replace model_copy(deep=True) with CopyFrom() for proto cloning
- Update Part usage from Part(root=TextPart(...)) to Part(text=...)
- Update Role enum from Role.user to Role.ROLE_USER
- Update TaskState enum to use TASK_STATE_* prefix
- Add new types module with proto imports and SDK-specific extras
- Add proto_utils module with identity conversion utilities
- Fix REST handler resource name formats for push notification configs
- Fix gRPC handler to use SubscribeToTask instead of TaskSubscription
- Fix database task store to handle proto objects from ORM
- Update all test files for proto patterns and assertions

Tested: 601 tests passing, 23 skipped (expected - DB/crypto deps)
Signed-off-by: Luca Muscariello <[email protected]>
- Fix agent_app.py Part access pattern for proto (HasField/direct access)
- Fix ClientEvent handling in E2E tests (StreamResponse, not Task)
- Fix notifications_app.py to serialize proto Task to dict
- Update SetTaskPushNotificationConfigRequest interface in handlers
- Update default_request_handler to use request.parent instead of name
- Update jsonrpc_handler to pass full request to handler
- Update unit tests to use SetTaskPushNotificationConfigRequest

Signed-off-by: Luca Muscariello <[email protected]>
@muscariello
Copy link
Member

superseded by #572

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feat]: Upgrade A2A to v1.0

3 participants