Skip to content

Conversation

@a2a-bot
Copy link
Collaborator

@a2a-bot a2a-bot commented Nov 25, 2025

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @a2a-bot, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request brings the A2A protocol specification and its Python implementation up to date with version v0.3.0. It introduces new capabilities, refines existing API endpoints and data structures, and updates the underlying generated code and type definitions to align with the latest protocol design. These changes aim to enhance the clarity, functionality, and consistency of the A2A service.

Highlights

  • Protocol Buffer Schema Updates: The core protocol buffer definitions (a2a_pb2.py and a2a_pb2.pyi) have been significantly updated. This includes renaming several fields (e.g., 'push_notification' to 'push_notification_config', 'mime_type' to 'media_type', 'content' to 'parts'), adding new fields (e.g., 'reference_task_ids' in Message, 'supported_interfaces' in AgentCard), and introducing new messages like ListTasksRequest and ListTasksResponse. Many fields now also include _serialized_options indicating they are required.
  • gRPC Service Method Refinements: The gRPC service (a2a_pb2_grpc.py) has undergone several changes to its methods. A new ListTasks method has been added, and existing methods have been renamed for clarity: TaskSubscription is now SubscribeToTask, CreateTaskPushNotificationConfig is now SetTaskPushNotificationConfig, and GetAgentCard is now GetExtendedAgentCard. Docstrings for these methods have also been updated to reflect their refined purpose.
  • Python Type Definition Enhancements: The Python type definitions (a2a/types.py) generated from the specification have been updated. The source specification now points to v0.3.0 tag. Documentation comments for various id and context_id fields have been simplified by removing the '(e.g. UUID)' clarification, and the __slots__ attribute has been removed from most message classes in a2a_pb2.pyi, which can impact memory usage and attribute access performance.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request updates the generated code to align with a new version of the A2A specification. The changes are consistent across all generated files, including protobuf messages, gRPC services, and Pydantic models. Key updates include adding new methods like ListTasks, renaming others for clarity (e.g., TaskSubscription to SubscribeToTask), and marking several fields as required, which enhances data integrity. My only suggestion is to restore the detailed class-level docstrings in src/a2a/grpc/a2a_pb2_grpc.py that were lost during generation, as they provided valuable context for developers. Overall, this is a solid update.

- TaskPushNotificationConfig are a resource whose parent is a task.
They have get, list and create methods.
- AgentCard is a static resource with only a get method.
"""A2AService defines the operations of the A2A protocol.
Copy link
Contributor

Choose a reason for hiding this comment

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

low

The docstrings for A2AServiceStub, A2AServiceServicer (L77), and A2AService (L225) have been significantly shortened, resulting in a loss of valuable information for developers. For example, the previous docstring for A2AServiceStub provided a good overview of the service resources and their methods.

While this is a generated file, I recommend restoring the more detailed docstrings in the source .proto file. This will ensure the generated Python code is well-documented and easier to understand.

Example of lost documentation for A2AServiceStub:

"""A2AService defines the gRPC version of the A2A protocol. This has a slightly
different shape than the JSONRPC version to better conform to AIP-127,
where appropriate. The nouns are AgentCard, Message, Task and
TaskPushNotificationConfig.
- Messages are not a standard resource so there is no get/delete/update/list
  interface, only a send and stream custom methods.
- Tasks have a get interface and custom cancel and subscribe methods.
- TaskPushNotificationConfig are a resource whose parent is a task.
  They have get, list and create methods.
- AgentCard is a static resource with only a get method.
"""

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants