Skip to content

refactor: start tck agent on jsonrpc, rest and grpc server#844

Merged
guglielmo-san merged 9 commits intoa2aproject:1.0-devfrom
guglielmo-san:guglielmoc/fix_tck_transports
Mar 17, 2026
Merged

refactor: start tck agent on jsonrpc, rest and grpc server#844
guglielmo-san merged 9 commits intoa2aproject:1.0-devfrom
guglielmo-san:guglielmoc/fix_tck_transports

Conversation

@guglielmo-san
Copy link
Copy Markdown
Member

Description

This PR enhances the tck sut agent to support jsonrpc, rest and grpc transport.

@guglielmo-san guglielmo-san requested a review from a team as a code owner March 17, 2026 09:15
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, 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 TCK System Under Test (SUT) agent by integrating support for multiple communication protocols, including JSONRPC, REST, and gRPC. This refactoring allows the agent to be tested against a wider range of client interactions and transport mechanisms, improving its versatility and robustness without altering its core functionality.

Highlights

  • Multi-protocol Support: The TCK SUT agent was enhanced to support JSONRPC, REST, and gRPC transport protocols, significantly broadening its compatibility.
  • Agent Interface Updates: The AgentCard configuration was updated to declare the newly supported REST and gRPC interfaces, along with their respective protocol versions.
  • Concurrent Server Operation: The server startup logic was refactored to concurrently run the JSONRPC, REST (HTTP), and gRPC servers using asyncio.gather.
  • REST Response Formatting: A minor adjustment was made to the REST handler to ensure all fields are printed during MessageToDict serialization, even if they have no presence.
Changelog
  • src/a2a/server/request_handlers/rest_handler.py
    • Modified the list_tasks method to ensure MessageToDict always prints fields, even if they have no presence.
  • tck/sut_agent.py
    • Added new imports for gRPC, Starlette, and FastAPI applications.
    • Defined a new REST_URL constant.
    • Updated the AgentCard to include REST and gRPC interfaces with protocol version 1.0.0.
    • Refactored the serve function to initialize and run JSONRPC, REST, and gRPC servers concurrently using asyncio.gather.
Activity
  • No specific activity has been recorded for this pull request yet.
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.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 17, 2026

🧪 Code Coverage (vs 1.0-dev)

⬇️ Download Full Report

No coverage changes.

Generated by coverage-comment.yml

Comment thread src/a2a/server/request_handlers/rest_handler.py
Copy link
Copy Markdown
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 refactors the SUT agent to support JSON-RPC, REST, and gRPC transports simultaneously, which is a great enhancement. The implementation correctly sets up and runs the different servers. My review includes a high-severity fix for a shutdown issue that would cause the application to hang, and a low-severity suggestion to improve maintainability by removing magic numbers for port configurations. Overall, the changes are well-structured.

Comment thread tck/sut_agent.py
Comment thread tck/sut_agent.py
guglielmo-san and others added 3 commits March 17, 2026 11:33
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@guglielmo-san guglielmo-san enabled auto-merge (squash) March 17, 2026 10:50
@guglielmo-san guglielmo-san merged commit 0e583f5 into a2aproject:1.0-dev Mar 17, 2026
6 checks passed
@guglielmo-san guglielmo-san deleted the guglielmoc/fix_tck_transports branch March 17, 2026 10:52
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.

2 participants