Skip to content

feat: add GetExtendedAgentCardRequest as input parameter to GetExtendedAgentCard method#767

Merged
sokoliva merged 5 commits intoa2aproject:1.0-devfrom
sokoliva:extended-card-req
Mar 5, 2026
Merged

feat: add GetExtendedAgentCardRequest as input parameter to GetExtendedAgentCard method#767
sokoliva merged 5 commits intoa2aproject:1.0-devfrom
sokoliva:extended-card-req

Conversation

@sokoliva
Copy link
Contributor

@sokoliva sokoliva commented Mar 4, 2026

Spec defines rpc GetExtendedAgentCard(GetExtendedAgentCardRequest) returns (AgentCard). Currently GetExtendedAgentCard does not take GetExtendedAgentCardRequest as input parameter.

Fixes #766 🦕

@sokoliva sokoliva requested a review from a team as a code owner March 4, 2026 15:58
@sokoliva sokoliva requested a review from ishymko March 4, 2026 15:58
@gemini-code-assist
Copy link
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 introduces a change to the GetExtendedAgentCard method within the A2A client library. It modifies the method signature to accept a GetExtendedAgentCardRequest object as input, bringing the implementation in line with the A2A protocol specification. This change affects the base client, client interface, transport layers (gRPC, JSONRPC, REST), and includes updates to existing tests and the addition of a new test file to ensure proper functionality and tenant isolation.

Highlights

  • Feature Addition: The GetExtendedAgentCard method now accepts GetExtendedAgentCardRequest as an input parameter, aligning with the A2A protocol specification.
  • Interface Updates: Updated the client interfaces and transport layers to include the new request parameter for the GetExtendedAgentCard method.
  • Test Adjustments: Modified existing tests and added a new test file to ensure the correct implementation and usage of the GetExtendedAgentCardRequest.
Changelog
  • src/a2a/client/base_client.py
    • Modified to include GetExtendedAgentCardRequest as a parameter in the get_extended_agent_card method.
  • src/a2a/client/client.py
    • Modified the abstract method get_extended_agent_card to include GetExtendedAgentCardRequest as a parameter.
  • src/a2a/client/transports/base.py
    • Modified the abstract method get_extended_agent_card to include GetExtendedAgentCardRequest as a parameter.
  • src/a2a/client/transports/grpc.py
    • Modified the get_extended_agent_card method to accept GetExtendedAgentCardRequest and pass it to the gRPC stub.
  • src/a2a/client/transports/jsonrpc.py
    • Modified the get_extended_agent_card method to include GetExtendedAgentCardRequest as a parameter and pass it in the JSONRPC request.
  • src/a2a/client/transports/rest.py
    • Modified the get_extended_agent_card method to include GetExtendedAgentCardRequest as a parameter and convert it to query parameters.
  • tests/client/transports/test_jsonrpc_client.py
    • Updated test_get_card_with_extended_card_support_with_extensions to include GetExtendedAgentCardRequest.
  • tests/client/transports/test_rest_client.py
    • Updated test_get_card_with_extended_card_support_with_extensions to include GetExtendedAgentCardRequest.
  • tests/client/transports/test_tenant_decorator.py
    • Added a new test file to test the TenantTransportDecorator.
  • tests/integration/test_client_server_integration.py
    • Updated integration tests to include GetExtendedAgentCardRequest in get_extended_agent_card calls.
Activity
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 correctly adds the GetExtendedAgentCardRequest parameter to the get_extended_agent_card method across various client and transport layers, aligning it with the A2A specification. The changes are consistent and well-tested in the modified files.

However, a key component, TenantTransportDecorator, appears to have been missed. It needs to be updated to reflect the new method signature of get_extended_agent_card to avoid breaking its functionality. Additionally, the newly added test file for this decorator, tests/client/transports/test_tenant_decorator.py, contains a call that is inconsistent with the new method signature, which will cause test failures. Please refer to the specific comments for detailed suggestions to address these issues.

I am having trouble creating individual review comments. Click here to see my feedback.

tests/client/transports/test_tenant_decorator.py (6-20)

high

To use GetExtendedAgentCardRequest in this test file, it needs to be imported. Please add it to this import block, maintaining alphabetical order.

from a2a.types.a2a_pb2 import (
    AgentCard,
    CancelTaskRequest,
    CreateTaskPushNotificationConfigRequest,
    DeleteTaskPushNotificationConfigRequest,
    GetExtendedAgentCardRequest,
    GetTaskPushNotificationConfigRequest,
    GetTaskRequest,
    ListTaskPushNotificationConfigsRequest,
    ListTasksRequest,
    Message,
    Part,
    SendMessageRequest,
    StreamResponse,
    SubscribeToTaskRequest,
)

tests/client/transports/test_tenant_decorator.py (132-136)

high

The get_extended_agent_card method signature has been updated to require a request parameter, but this test call is missing it. This will cause a TypeError.

It also appears that TenantTransportDecorator itself has not been updated in this PR to handle this new parameter. Please ensure you update TenantTransportDecorator.get_extended_agent_card to accept and forward the request parameter to the underlying transport, and then update this test as suggested.

        # Test get_extended_agent_card
        card = MagicMock(spec=AgentCard);
        mock_transport.get_extended_agent_card.return_value = card;
        request = GetExtendedAgentCardRequest();
        res = await decorator.get_extended_agent_card(request);
        assert res is card

@sokoliva sokoliva mentioned this pull request Mar 4, 2026
4 tasks
@sokoliva sokoliva merged commit 13a092f into a2aproject:1.0-dev Mar 5, 2026
6 checks passed
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