Skip to content

Conversation

@a2a-bot
Copy link
Collaborator

@a2a-bot a2a-bot commented Dec 5, 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 a comprehensive update to the A2A protocol specification, focusing on enhancing the gRPC service definitions and their corresponding Python implementations. The changes introduce new functionalities for task listing and management, enforce stricter field requirements, and improve the overall consistency and clarity of the API through strategic renames and updated documentation.

Highlights

  • API Evolution: The A2A protocol specification has been significantly updated, introducing new API methods and refining existing ones for improved clarity and functionality.
  • Field Requirements and Renames: Numerous fields across various messages (e.g., Task, Message, Artifact, AgentCard) are now explicitly marked as required. Several fields and messages have also been renamed (e.g., push_notification to push_notification_config, mime_type to media_type, TaskSubscription to SubscribeToTask, CreateTaskPushNotificationConfig to SetTaskPushNotificationConfig, and GetAgentCard to GetExtendedAgentCard).
  • New Task Management Features: New capabilities for task management have been added, including a ListTasks method for retrieving tasks with filtering and pagination, and the introduction of a tenant field in several request messages to support multi-tenancy.
  • Code Generation Updates: The Python protobuf bindings (a2a_pb2.py and a2a_pb2.pyi) and gRPC service definitions (a2a_pb2_grpc.py) have been regenerated to reflect these specification changes, including updates to type hints and method signatures.
  • Documentation Refinements: Docstrings and comments within the generated code have been updated to align with the new specification, particularly clarifying the nature of 'id' fields and simplifying service descriptions.
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 A2A specification, which involves changes to protobuf definitions, gRPC services, and Pydantic type models. The changes are extensive and reflect a new version of the specification, including renaming fields and methods, adding new ones, and adjusting message structures. My review focuses on the generated gRPC service code, where I've noticed a regression in the quality of docstrings. I've provided suggestions to restore more descriptive documentation to help developers understand the API's behavior. The changes in the protobuf definitions and Pydantic models appear consistent with a specification update.

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 simplified, which results in the loss of valuable information about the service's resources and methods. Restoring a more detailed docstring would be beneficial for developers using this stub.

    """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 get, list, cancel and subscribe methods.
    - TaskPushNotificationConfig are a resource whose parent is a task.
      They have get, list, set and delete methods.
    - AgentCard is a singleton resource with a get method for the public card,
      and another for an extended card for authenticated users.
    """

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

The docstring for A2AServiceServicer has been simplified, losing important context about the service's structure. Providing a more detailed docstring would help developers who need to implement this service.

    """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 get, list, cancel and subscribe methods.
    - TaskPushNotificationConfig are a resource whose parent is a task.
      They have get, list, set and delete methods.
    - AgentCard is a singleton resource with a get method for the public card,
      and another for an extended card for authenticated users.
    """

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 useful information that this can be a blocking or non-blocking call. Adding this detail back would improve clarity.

        """Send a message to the agent. This can be a blocking or non-blocking call
        depending on the configuration.
        """

def SendStreamingMessage(self, request, context):
"""SendStreamingMessage is a streaming call that will return a stream of
task update events until the Task is in an interrupted or terminal state.
"""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 a bit too brief. The previous version was more descriptive about the behavior of the streaming call. I suggest a more informative docstring.

        """Send a message to the agent and receive a stream of updates.

        This is a streaming call that will return a stream of task update events
        until the Task is in an interrupted or terminal state.
        """

def CancelTask(self, request, context):
"""Cancel a task from the agent. If supported one should expect no
more task updates for the task.
"""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 was simplified, removing the explanation of its effect. Restoring this detail would be helpful.

        """Cancel a task. If supported, one should expect no more task updates for the task.
        """

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