Skip to content

feat: upgrade a2a-sdk dependency to v1.0.0-alpha.0 (A2A 1.0 spec)#5160

Open
Sravan1011 wants to merge 1 commit intogoogle:mainfrom
Sravan1011:feat/upgrade-a2a-sdk-v1.0
Open

feat: upgrade a2a-sdk dependency to v1.0.0-alpha.0 (A2A 1.0 spec)#5160
Sravan1011 wants to merge 1 commit intogoogle:mainfrom
Sravan1011:feat/upgrade-a2a-sdk-v1.0

Conversation

@Sravan1011
Copy link
Copy Markdown

Title: feat: upgrade a2a-sdk dependency to v1.0.0-alpha.0 (A2A 1.0 spec)

Description:

Summary
Closes #5056

Upgrades the a2a-sdk dependency from 0.3.x to >=1.0.0a0 to support the A2A 1.0 specification with proto-based types.

Changes
Dependency:

Bumped a2a-sdk from >=0.3.4,<0.4.0 to >=1.0.0a0 in both [a2a] and [test] extras
Proto Migration (18 source files):

Replaced TextPart/DataPart with unified Part proto (.text, .inline_data fields)
Updated all enums to proto naming (Role.ROLE_USER, TaskState.TASK_STATE_SUBMITTED, etc.)
Replaced deprecated AgentCard.url with supported_interfaces
Switched to MessageToDict from google.protobuf.json_format for proto serialization
Removed deprecated request_metadata parameter from send_message
Fixed (update, task) tuple unpacking for A2A 1.0 streaming responses
Updated ClientCallContext import from a2a.client (previously a2a.client.middleware)
Updated AgentRegistry to dynamically migrate legacy url fields to supported_interfaces
Tests (17 test files):

Updated all test mocks to use proto-based types instead of Pydantic models
Replaced Mock(spec=TextPart) with real Part() proto instances
Updated all enum references and tuple argument ordering in test assertions

- Bump a2a-sdk from 0.3.x to >=1.0.0a0
- Migrate from Pydantic models to Protocol Buffer messages
- Replace TextPart/DataPart with unified Part proto
- Update all enums to proto naming (Role.ROLE_USER, TaskState.TASK_STATE_SUBMITTED, etc.)
- Replace deprecated AgentCard.url with supported_interfaces
- Switch to MessageToDict for proto serialization
- Remove deprecated request_metadata from send_message
- Fix (update, task) tuple unpacking for streaming responses

All 426 tests pass (315 a2a + 94 remote agent + 17 agent registry).
@adk-bot adk-bot added the core [Component] This issue is related to the core interface and implementation label Apr 5, 2026
return {}


def _coerce_a2a_message(message: Message | Any) -> Message:
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

avoid using "any" dataype

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

Labels

core [Component] This issue is related to the core interface and implementation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Upgrade a2a-sdk dependency to support A2A 1.0 spec

3 participants