Skip to content

Conversation

ehsavoie
Copy link
Contributor

@ehsavoie ehsavoie commented Aug 14, 2025

  • Create JSON+HTTP/REST Client.
  • Integrate PR from @ronantakizawa using regexp for server routing.
  • Update server code to use proper JSON (de)serialization with Proto.

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.

Summary of Changes

Hello @ehsavoie, 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 introduces a significant refactoring of the client-side A2A SDK, shifting from monolithic client implementations to a modular architecture that supports multiple transport protocols. It establishes a flexible client factory, abstract client interfaces, and dedicated transport implementations for JSON-RPC, gRPC, and a new HTTP+JSON REST client. This change enhances the SDK's extensibility and maintainability by decoupling transport logic from core client functionalities.

Highlights

  • Modular Client Architecture: The old monolithic client implementations ('A2AClient' and 'A2AGrpcClient') have been replaced by a flexible 'AbstractClient' and 'Client' structure, supported by a 'ClientFactory' and 'ClientTransport' interfaces. This significantly improves modularity and extensibility.
  • Multi-Transport Protocol Support: New dedicated transport implementations for JSON-RPC, gRPC, and a new HTTP+JSON REST client have been introduced. This allows the SDK to dynamically select the appropriate communication protocol based on agent capabilities.
  • Enhanced Client-Side Event Handling: A new event processing mechanism, including 'ClientEvent' and 'ClientTaskManager', ensures consistent handling of messages, tasks, and updates across all supported transport protocols.
  • Standardized Agent Card Path: The standard path for agent card discovery has been updated from '.well-known/agent.json' to '.well-known/agent-card.json' for consistency.
  • Integration of New Protocol Features: The SDK now includes support for new protocol features such as Agent Card Signatures and Mutual TLS security schemes, enhancing security and verification capabilities.
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 in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

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 issue 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 introduces a major refactoring of the client-side implementation, abstracting the transport layer to support JSON-RPC, gRPC, and a new REST+JSON transport. This is a significant architectural improvement that enhances modularity and extensibility. The changes include removing the old monolithic clients and introducing a transport-agnostic Client with a ClientFactory and SPI for transport providers. The protobuf definitions and spec classes have been updated to align with version 0.3.0 of the A2A protocol.

My review focuses on the new REST+JSON transport implementation. I've found that it is currently incomplete, with several methods throwing UnsupportedOperationException. There are also some areas for improvement regarding logging consistency and error handling. Overall, this is a great step forward for the SDK's architecture.

@ehsavoie ehsavoie force-pushed the rest_json branch 3 times, most recently from 7e4ec93 to a72f662 Compare August 14, 2025 17:27
@ehsavoie
Copy link
Contributor Author

/gemini review

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 introduces a major refactoring of the A2A client, abstracting the transport layer to support multiple protocols like JSON-RPC, gRPC, and a new REST+JSON implementation. The changes are extensive, including the removal of old client classes and the addition of a new modular structure with a client factory, abstract client, and transport-specific implementations. The code is also updated to align with a newer version of the A2A specification. My feedback focuses on a couple of minor issues in the new implementation, such as a parameter typo and leftover debugging code. Overall, this is a significant improvement to the SDK's architecture and capabilities.

@fjuma
Copy link
Collaborator

fjuma commented Aug 19, 2025

@ehsavoie Just FYI, I've merged the v0.3.0 PR so this one can be rebased now.

@ehsavoie ehsavoie force-pushed the rest_json branch 2 times, most recently from 67c8163 to 13367c4 Compare August 19, 2025 17:29
@ehsavoie
Copy link
Contributor Author

/gemini-review

Copy link
Contributor

It looks like you might have intended to use the /gemini review command. Please try that if you'd like me to perform a review of the pull request.

@ehsavoie ehsavoie force-pushed the rest_json branch 4 times, most recently from eb68867 to 9700c25 Compare August 26, 2025 12:35
@ehsavoie ehsavoie changed the title Rest json feat: add support for JSON+HTTP/REST Aug 26, 2025
@ehsavoie ehsavoie marked this pull request as ready for review August 26, 2025 12:39
@ehsavoie ehsavoie force-pushed the rest_json branch 4 times, most recently from 9ffdeb5 to 83add84 Compare August 26, 2025 14:24
Copy link
Collaborator

@fjuma fjuma left a comment

Choose a reason for hiding this comment

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

Thanks @ehsavoie! I'm starting to review this so adding an initial set of comments.

@fjuma fjuma requested a review from kabir August 29, 2025 18:51
@priyanshus1
Copy link

Question:
This PR only covers a REST client(as I understand), Is their a plan to introduce REST support for A2A server soon ?
Is their a contribution needed if this is not already planned by someone.

@ehsavoie
Copy link
Contributor Author

ehsavoie commented Sep 1, 2025

@priyanshus1 it covers all the rest part (client and server)

@ehsavoie ehsavoie force-pushed the rest_json branch 2 times, most recently from 1ac5baa to 4a70fbf Compare September 1, 2025 13:32
@priyanshus1
Copy link

@ehsavoie Do we know an ETA on this PR, we are waiting for either adopt this or self implement :)

@kabir
Copy link
Collaborator

kabir commented Sep 1, 2025

@priyanshus1 We're aiming to get it in for the next release (hopefully later this week)

@ehsavoie ehsavoie force-pushed the rest_json branch 6 times, most recently from a45d770 to ed6f73a Compare September 2, 2025 16:52
@ehsavoie ehsavoie force-pushed the rest_json branch 2 times, most recently from 393a6a1 to 87f2869 Compare September 5, 2025 09:43
* Create JSON+HTTP/REST Client.
* Integrate PR from @ronantakizawa using regexp for server routing.
* Update server code to use proper JSON (de)serialization with Proto.
* Create Reference Implementation
* Removing the listTasks since it has been removed from the specs
* Removing io.grpc:* as direct dependencies for a2a-java-sdk-spec-grpc.
* Support client preferences.
* Running the TCK

Signed-off-by: Emmanuel Hugonnet <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants