Skip to content

Conversation

@guglielmo-san
Copy link
Member

Description

This PR adds the support for GRPC transport on the client side

Fixes #275 🦕

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @guglielmo-san, 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 communication capabilities by adding full client-side support for GRPC transport. This integration provides a robust and performant alternative to existing transport mechanisms, leveraging protocol buffers for structured data and HTTP/2 for efficient communication. The changes span across client and server components, including new GRPC-specific handlers, type conversion utilities, and updated build configurations to support protobuf generation. This lays the groundwork for more flexible and high-performance agent interactions.

Highlights

  • Client-side GRPC Support: Introduced a new GrpcTransport and GrpcTransportFactory to enable client-side communication using the GRPC protocol, allowing for efficient, bidirectional streaming and structured data exchange.
  • GRPC Server-side Handler: Added a grpcHandler for the server, implementing the A2A gRPC service definition. This handler translates incoming gRPC requests to the core A2A request handler logic and maps A2A errors to appropriate gRPC status codes.
  • Protobuf Generation and Utilities: Integrated buf for generating gRPC protobuf types and created utility classes (FromProto, ToProto, id_decoding) to facilitate seamless conversion between internal A2A types and gRPC protobuf messages.
  • Updated Agent Card and Test Infrastructure: Modified the SUTAgentCard to include the new GRPC transport interface and updated the test agent's startup process to launch a gRPC server alongside the existing HTTP server, ensuring comprehensive testing of the new transport.
Ignored Files
  • Ignored by pattern: .github/workflows/** (1)
    • .github/workflows/run-tck.yaml
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 introduces gRPC support for both the client and server sides of the SDK, which is a significant feature addition. The implementation is comprehensive, covering new transport layers, utility functions for type conversion between internal and protobuf types, and updates to the build and test configurations. I've identified a few critical bugs in the type conversion logic and client transport implementation that could lead to runtime errors, as well as an issue in the test agent setup. My feedback focuses on correcting these issues to ensure the new gRPC functionality is robust and correct.

guglielmo-san and others added 3 commits December 30, 2025 15:45
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@github-actions
Copy link

🧪 Code Coverage

⬇️ Download Full Report

Main PR Delta
src/index.ts 0% 100% 🟢 +100.00%
src/server/express/json_rpc_handler.ts 90.72% 90.62% 🔴 -0.10%
src/client/transports/grpc_transport.ts (new) 93.16%
src/grpc/a2a.ts (new) 10.51%
src/grpc/google/api/annotations.ts (new) 0%
src/grpc/google/api/client.ts (new) 0%
src/grpc/google/api/field_behavior.ts (new) 0%
src/grpc/google/api/http.ts (new) 0%
src/grpc/google/api/launch_stage.ts (new) 0%
src/grpc/google/protobuf/descriptor.ts (new) 0%
src/grpc/google/protobuf/duration.ts (new) 0%
src/grpc/google/protobuf/empty.ts (new) 25.64%
src/grpc/google/protobuf/struct.ts (new) 10.15%
src/grpc/google/protobuf/timestamp.ts (new) 12.04%
src/grpc/utils/from_proto.ts (new) 43.56%
src/grpc/utils/id_decoding.ts (new) 28%
src/grpc/utils/to_proto.ts (new) 59.66%
src/server/grpc/common.ts (new) 0%
src/server/grpc/grpc_handler.ts (new) 64.21%
src/server/grpc/index.ts (new) 0%
src/server/transports/grpc/grpc_transport_handler.ts (new) 55.26%
Total 82.74% 23.72% 🔴 -59.02%

Generated by coverage-comment.yml

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.

[Feat]: Add support for gRPC

2 participants