Skip to content

Conversation

@a2a-bot
Copy link
Collaborator

@a2a-bot a2a-bot commented Jan 6, 2026

@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 up to date, incorporating a range of structural and functional enhancements. The changes primarily focus on refining existing data models, introducing new capabilities for task management, and improving the overall clarity and consistency of the API definitions across protobuf, gRPC, and Python type hints. These updates aim to provide a more robust and developer-friendly interface for interacting with the A2A service.

Highlights

  • Protocol Buffer Definitions Update: The core protocol buffer definitions in a2a_pb2.py have undergone significant changes, including field renames (e.g., push_notification to push_notification_config, update to message, mime_type to media_type, content to parts), the addition of new fields like reference_task_ids in Message and tenant in various request messages, and marking several fields as required.
  • New Task Management Features: New messages ListTasksRequest and ListTasksResponse have been introduced, enabling the listing of tasks with filtering and pagination capabilities. This enhances the task management functionality of the A2A service.
  • gRPC Service Method Renames and Additions: Several gRPC service methods have been renamed for clarity and consistency (e.g., TaskSubscription to SubscribeToTask, CreateTaskPushNotificationConfig to SetTaskPushNotificationConfig, GetAgentCard to GetExtendedAgentCard). A new ListTasks method has also been added to the gRPC service.
  • Improved Documentation and Type Clarity: Docstrings in a2a/types.py have been refined to provide clearer descriptions for various ID and identifier fields, removing redundant examples like '(e.g. UUID)' to streamline the language.
  • Python Type Hinting Updates: The __slots__ attribute has been removed from many message classes in a2a_pb2.pyi, indicating a change in the generated Python type hints, likely to align with more recent protobuf generation practices or to simplify the type definitions.
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 for the A2A protocol specification, reflecting changes from a new version. The changes include updates to protobuf messages, gRPC services, and Pydantic type models. My review focuses on the generated gRPC service file, where I've noticed that many docstrings have become less descriptive. I've left several low-severity comments suggesting that the source .proto file comments be enhanced to restore the helpful documentation in the generated code, providing examples of more descriptive docstrings. All original comments were kept as they do not contradict any provided rules.

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.

low

The docstring for A2AServiceStub has been shortened, which results in a loss of valuable information about the service structure and its resources. The previous version provided a helpful overview. While this is a generated file, it would be beneficial for developers if the descriptiveness could be restored. This might require updating the comments in the source .proto file.

For reference, here is a more descriptive docstring that reflects the latest service definition:

"""A2AService defines the operations of the A2A protocol.

The service is structured around several resources:
- **Message**: Sent via `SendMessage` and `SendStreamingMessage`. Not a standard resource.
- **Task**: Represents an operation. Can be retrieved with `GetTask`, listed with `ListTasks`, canceled with `CancelTask`, and subscribed to with `SubscribeToTask`.
- **TaskPushNotificationConfig**: A sub-resource of Task for managing push notifications. Supports `Set`, `Get`, `List`, and `Delete` operations.
- **AgentCard**: The `GetExtendedAgentCard` method retrieves detailed agent information for authenticated clients.
"""

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.

low

Similar to A2AServiceStub, the docstring for A2AServiceServicer has lost its descriptive summary. To improve usability, consider enhancing the comments in the source .proto file so that a more detailed docstring is generated.

A good docstring could look like this:

"""A2AService defines the operations of the A2A protocol.

The service is structured around several resources:
- **Message**: Sent via `SendMessage` and `SendStreamingMessage`. Not a standard resource.
- **Task**: Represents an operation. Can be retrieved with `GetTask`, listed with `ListTasks`, canceled with `CancelTask`, and subscribed to with `SubscribeToTask`.
- **TaskPushNotificationConfig**: A sub-resource of Task for managing push notifications. Supports `Set`, `Get`, `List`, and `Delete` operations.
- **AgentCard**: The `GetExtendedAgentCard` method retrieves detailed agent information for authenticated clients.
"""

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. The previous version provided more context about its behavior. A more descriptive docstring would be helpful. This could be improved in the source .proto file.

Example of a more descriptive docstring:

"""Sends a message to the agent.

This can be a blocking or non-blocking call depending on the `SendMessageConfiguration`.
It can return either a `Task` object for asynchronous operations or a direct `Message` response.
"""

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 very brief. The previous version was more informative. Consider updating the source .proto file to generate a more helpful docstring.

For example:

"""SendStreamingMessage is a streaming version of SendMessage.

It initiates a task and returns a stream of events, including status updates,
artifact updates, and final messages, until the task reaches a terminal state.
"""

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 CancelTask docstring has been shortened. The previous version included useful information about the expected behavior after cancellation. It would be beneficial to restore this detail, likely by updating the source .proto file.

For example:

"""Cancels a task. If supported, no more task updates should be expected for this task.
"""

Comment on lines +225 to 226
"""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 docstring for the experimental A2AService class has been shortened, losing a helpful summary of the service. Consider improving the source .proto file comments to generate a more descriptive docstring here as well.

A good docstring could look like this:

"""A2AService defines the operations of the A2A protocol.

The service is structured around several resources:
- **Message**: Sent via `SendMessage` and `SendStreamingMessage`. Not a standard resource.
- **Task**: Represents an operation. Can be retrieved with `GetTask`, listed with `ListTasks`, canceled with `CancelTask`, and subscribed to with `SubscribeToTask`.
- **TaskPushNotificationConfig**: A sub-resource of Task for managing push notifications. Supports `Set`, `Get`, `List`, and `Delete` operations.
- **AgentCard**: The `GetExtendedAgentCard` method retrieves detailed agent information for authenticated clients.
"""

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