Skip to content

feat: add support for extendedAgentCard on client side#234

Merged
guglielmo-san merged 14 commits intoa2aproject:mainfrom
guglielmo-san:add_get_agent_card_api
Dec 7, 2025
Merged

feat: add support for extendedAgentCard on client side#234
guglielmo-san merged 14 commits intoa2aproject:mainfrom
guglielmo-san:add_get_agent_card_api

Conversation

@guglielmo-san
Copy link
Member

Description

This PR adds the support on client side for the getAuthenticatedExtendedCard api.

Fixes #196 🦕

Release-As: 0.3.6

@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 enhances the client-side capabilities by adding support for fetching and utilizing an 'extended' agent card. This involves modifying the core Client class to dynamically update its agent card based on available features and implementing the necessary RPC communication within the JsonRpcTransport to retrieve this extended information. The change ensures that the client can leverage more comprehensive agent data when provided by the backend.

Highlights

  • Client-side Extended Agent Card Support: Introduced a new getAgentCard() method in the Client class that conditionally fetches an authenticated extended agent card if the current card indicates support for it. The agentCard property in the Client constructor is now mutable to allow for updates.
  • Transport Layer Implementation: The Transport interface has been updated to include a new getAuthenticatedExtendedAgentCard() method. This method has been implemented in JsonRpcTransport to make an RPC call to the agent/getAuthenticatedExtendedCard endpoint.
  • Testing: A new test case has been added to multitransport-client.spec.ts to verify that the client.getAgentCard() method correctly calls the transport layer's getAuthenticatedExtendedAgentCard and updates the client's agent card when extended support is enabled.
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 adds client-side support for fetching an authenticated extended agent card. The changes introduce a new method getAgentCard on the Client class and update the transport layer accordingly. While the overall goal is clear, I've identified a few areas for improvement in the implementation. Specifically, making the agentCard property mutable is a significant change to the class's public API and could introduce risks. The new getAgentCard method has a race condition and a potentially misleading name due to its side effects. I've also suggested adding a test case to cover the scenario where an extended card is not supported, to ensure the new logic is fully tested. The other changes in the transport layer and interface definitions look correct.

@guglielmo-san guglielmo-san requested a review from ishymko December 5, 2025 15:26
guglielmo-san and others added 4 commits December 5, 2025 16:38
Co-authored-by: Ivan Shymko <vana.shimko@gmail.com>
Co-authored-by: Ivan Shymko <vana.shimko@gmail.com>
Co-authored-by: Ivan Shymko <vana.shimko@gmail.com>
@guglielmo-san guglielmo-san enabled auto-merge (squash) December 5, 2025 15:40
@guglielmo-san guglielmo-san merged commit 3073376 into a2aproject:main Dec 7, 2025
6 checks passed
@guglielmo-san guglielmo-san deleted the add_get_agent_card_api branch December 7, 2025 17:29
ishymko added a commit that referenced this pull request Dec 10, 2025
🤖 I have created a release *beep* *boop*
---


## [0.3.6](v0.3.5...v0.3.6)
(2025-12-10)


### Features

* add support for extendedAgentCard on client side
([#234](#234))
([3073376](3073376))
* Add support for extension headers on client side
([#227](#227))
([8c57002](8c57002))
* implement client interceptors
([#223](#223))
([5694c22](5694c22))
* Implement extended card support on server side
([#197](#197))
([45014ac](45014ac))
* implement server http+json
([#142](#142))
([f20e662](f20e662))
* introduce AgentCardResolver
([#225](#225))
([ddaf7de](ddaf7de))
* introduce transport agnostic client
([#198](#198))
([94a9848](94a9848))
* server side support for extensions
([5ef7396](5ef7396))
* support authentication on server side
([#195](#195))
([9872d93](9872d93))


### Bug Fixes

* handle errors occurred in non-blocking sendMessage
([#187](#187))
([e55c0f4](e55c0f4))


### Miscellaneous Chores

* set version to 0.3.6
([#191](#191))
([3f8cea0](3f8cea0))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: Ivan Shymko <ishymko@google.com>
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]: Implement support for getAuthenticatedExtendedAgentCard

2 participants