Skip to content

Conversation

@a2a-bot
Copy link
Collaborator

@a2a-bot a2a-bot commented Oct 18, 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 significantly enhances the A2A service API by integrating a new ListTasks RPC method. This addition provides a robust mechanism for clients to query and manage tasks more effectively, offering capabilities for filtering, pagination, and control over the level of detail returned. The changes span across the protobuf definitions, generated Python code, and the Python type definitions to fully support this new functionality.

Highlights

  • New ListTasks RPC Method: A new ListTasks RPC method has been introduced to the A2AService, enabling clients to retrieve a paginated and filterable list of tasks.
  • Task Filtering and Pagination: The ListTasks method supports various filtering criteria such as context_id, status, last_updated_time, and includes options for pagination (page_size, page_token) and artifact inclusion (include_artifacts).
  • Python Type Hinting and Optimization: The generated Python protobuf interface file (a2a_pb2.pyi) has been updated to reflect the new ListTasks types and includes an optimization by setting __slots__ = () for many message classes, which can reduce memory consumption.
  • Message Content Field Renamed: The content field within the Message class in the Python protobuf interface (a2a_pb2.pyi) has been renamed to parts.
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, primarily by renaming the content field to parts within the Message object and introducing a new ListTasks RPC. The changes across the generated protobuf files and Pydantic type definitions appear consistent with these updates. My review highlights opportunities to enhance data validation in the new Pydantic models and points out some structural redundancies that could be simplified. More critically, I've noted that while the ListTasks RPC is now defined, its server-side and client-side implementations are missing, rendering the feature incomplete. These omissions are flagged as high-severity issues that need to be addressed.

Comment on lines +43 to +47
self.ListTasks = channel.unary_unary(
'/a2a.v1.A2AService/ListTasks',
request_serializer=a2a__pb2.ListTasksRequest.SerializeToString,
response_deserializer=a2a__pb2.ListTasksResponse.FromString,
_registered_method=True)
Copy link
Contributor

Choose a reason for hiding this comment

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

high

The ListTasks RPC has been added to the client stub, but there appears to be no corresponding list_tasks method in a2a.client.transports.grpc.GrpcTransport or the abstract a2a.client.client.Client class. This functionality needs to be exposed to be usable by clients.

Comment on lines +121 to +126
def ListTasks(self, request, context):
"""List tasks with optional filtering and pagination.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
Copy link
Contributor

Choose a reason for hiding this comment

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

high

The ListTasks RPC method has been added to the service definition, but the implementation is missing from the GrpcHandler class in src/a2a/server/request_handlers/grpc_handler.py. Without this, the server will return an UNIMPLEMENTED error for this call.

SendMessageRequest
| SendStreamingMessageRequest
| GetTaskRequest
| ListTasksRequest
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

This union is redundant. The type for the RootModel is already defined in the class's generic type parameter (lines 1756-1768). This root attribute with its type hint should be removed to avoid redundancy and simplify the class definition. The same issue exists for the JSONRPCResponse class (defined around line 2102).

"""
Filter tasks by context ID to get tasks from a specific conversation or session.
"""
history_length: int | None = None
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 history_length states that it must be non-negative. This constraint can be enforced at the model level using Pydantic's Field for better data validation and clarity.

Suggested change
history_length: int | None = None
history_length: int | None = Field(default=None, ge=0)

"""
Request-specific metadata.
"""
page_size: int | None = None
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 page_size specifies a range of 1 to 100. It's a good practice to enforce this validation directly in the Pydantic model using Field to ensure data integrity.

Suggested change
page_size: int | None = None
page_size: int | None = Field(default=None, ge=1, le=100)

@holtskinner holtskinner changed the title Update to specification from 2a1f819aaa2540602ee81498e159ebe0192be818 fix(grpc): Fix inconsistent property name between gRPC and JSON-RPC in Message object Oct 20, 2025
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.

1 participant