Skip to content

Conversation

@a2a-bot
Copy link
Collaborator

@a2a-bot a2a-bot commented Nov 29, 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 specification up to date with the latest changes, impacting the core Protocol Buffer definitions and their generated Python code. The update introduces new functionalities for task management, refines existing data structures, and enhances the API for interacting with agent capabilities and push notifications. These changes aim to improve the robustness, clarity, and extensibility of the A2A protocol.

Highlights

  • API Method Changes: The gRPC service definition has been updated with new methods: ListTasks for retrieving multiple tasks with filtering and pagination, and GetExtendedAgentCard for fetching a more comprehensive agent card for authenticated agents. The TaskSubscription method has been renamed to SubscribeToTask, and CreateTaskPushNotificationConfig is now SetTaskPushNotificationConfig.
  • Protobuf Definition Updates: Several Protocol Buffer messages have been modified. SendMessageConfiguration now includes an optional _history_length field and renames push_notification to push_notification_config. FilePart renames mime_type to media_type. The Message structure now uses parts instead of content and adds a reference_task_ids field. AgentCard introduces supported_interfaces and makes several fields explicitly required or optional. AgentInterface renames transport to protocol_binding. AgentCapabilities gains a state_transition_history field. Many fields across various messages have been explicitly marked as required.
  • Python Generated Code Enhancements: The generated Python protobuf files (a2a_pb2.py and a2a_pb2.pyi) reflect all the specification changes. Notably, __slots__ have been optimized to empty tuples for many message classes in a2a_pb2.pyi, which can improve memory usage and access speed for these objects.
  • Documentation and Specification Versioning: The a2a_types.py file's generation source has been updated to reference a specific tag (v0.3.0) of the A2A specification, indicating a move towards versioned specification generation. Documentation comments for various ID fields have been refined, removing the '(e.g. UUID)' suggestion for broader applicability.
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 Python code from version 0.3.0 of the A2A specification. This introduces several breaking changes, such as renaming gRPC methods (e.g., TaskSubscription to SubscribeToTask) and message fields. However, the client and server code that consumes these generated files has not been updated, which will break the build and cause runtime errors. For this PR to be mergeable, it is critical to also include the necessary updates to consumer files like src/a2a/client/transports/grpc.py, src/a2a/server/request_handlers/grpc_handler.py, and their corresponding tests. Additionally, I've noted in my review that some docstrings in the generated a2a_pb2_grpc.py file have become less descriptive, and I recommend restoring the previous level of detail for better maintainability.

Comment on lines +10 to 11
"""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.

medium

The updated docstring for A2AServiceStub is much less descriptive than the previous version. The old docstring provided valuable context about the design rationale and the resources involved (AgentCard, Message, Task, etc.), which was very helpful for developers trying to understand the service. Consider restoring some of that detail for better maintainability.

Comment on lines +77 to 78
"""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.

medium

Similar to the A2AServiceStub, the docstring for A2AServiceServicer has lost significant detail. The previous version explained the resources and design choices, which is important for anyone implementing this service. Please consider re-adding the more descriptive content.

Comment on lines +81 to 82
"""Send a message to the agent.
"""
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 docstring for SendMessage has been shortened, removing the explanation that it's a blocking call and can return a Long-Running Operation. This information was useful for understanding the method's behavior.

Comment on lines +88 to 89
"""SendStreamingMessage is a streaming version of SendMessage.
"""
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 docstring for SendStreamingMessage is now less descriptive. The previous version explained that it returns a stream of task update events, which is a key detail about its functionality.

Comment on lines +109 to 110
"""Cancel a task.
"""
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 docstring for CancelTask has been simplified, removing the detail about what to expect after cancellation (no more task updates). This was useful information for the caller.

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