Skip to content

fix: new agent card #2623

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

fix: new agent card #2623

wants to merge 3 commits into from

Conversation

racinmat
Copy link

Fixes #2622.
Basically reflects the change from https://github.com/a2aproject/a2a-python/releases/tag/v0.3.0.

testing plan

I ran the relevant tests to my code and here are the results, everything passes except few tests that are completely unrelated.

pytest .\tests\unittests\cli\                                                                                                                                                                          
======================================================================================================================= test session starts =======================================================================================================================
platform win32 -- Python 3.12.8, pytest-8.4.1, pluggy-1.6.0
rootdir: C:\Projects\others\adk-python
configfile: pyproject.toml
plugins: anyio-4.9.0, langsmith-0.3.45, asyncio-1.1.0, mock-3.14.1, xdist-3.8.0
asyncio: mode=Mode.AUTO, asyncio_default_fixture_loop_scope=function, asyncio_default_test_loop_scope=function
collected 222 items                                                                                                                                                                                                                                                

tests\unittests\cli\test_cli_tools_click_option_mismatch.py ................                                                                                                                                                                                 [  7%] 
tests\unittests\cli\test_fast_api.py ................................                                                                                                                                                                                        [ 21%]
tests\unittests\cli\utils\test_agent_loader.py ..................................                                                                                                                                                                            [ 36%]
tests\unittests\cli\utils\test_cli.py ........                                                                                                                                                                                                               [ 40%]
tests\unittests\cli\utils\test_cli_create.py ..................................                                                                                                                                                                              [ 55%]
tests\unittests\cli\utils\test_cli_deploy.py ..........................................                                                                                                                                                                      [ 74%] 
tests\unittests\cli\utils\test_cli_tools_click.py ......FF..................FF..                                                                                                                                                                             [ 88%] 
tests\unittests\cli\utils\test_evals.py ..........................                                                                                                                                                                                           [100%]

pytest .\tests\unittests\agents\
======================================================================================================================= test session starts =======================================================================================================================
platform win32 -- Python 3.12.8, pytest-8.4.1, pluggy-1.6.0
rootdir: C:\Projects\others\adk-python
configfile: pyproject.toml
plugins: anyio-4.9.0, langsmith-0.3.45, asyncio-1.1.0, mock-3.14.1, xdist-3.8.0
asyncio: mode=Mode.AUTO, asyncio_default_fixture_loop_scope=function, asyncio_default_test_loop_scope=function
collected 342 items                                                                                                                                                                                                                                                

tests\unittests\agents\test_agent_clone.py ..............................                                                                                                                                                                                    [  8%]
tests\unittests\agents\test_agent_config.py ............                                                                                                                                                                                                     [ 12%] 
tests\unittests\agents\test_base_agent.py ........................................................                                                                                                                                                           [ 28%] 
tests\unittests\agents\test_callback_context.py ..................................                                                                                                                                                                           [ 38%] 
tests\unittests\agents\test_langgraph_agent.py ......                                                                                                                                                                                                        [ 40%]
tests\unittests\agents\test_live_request_queue.py ..........                                                                                                                                                                                                 [ 43%] 
tests\unittests\agents\test_llm_agent_callbacks.py ............                                                                                                                                                                                              [ 46%] 
tests\unittests\agents\test_llm_agent_fields.py ......................................                                                                                                                                                                       [ 57%] 
tests\unittests\agents\test_llm_agent_include_contents.py ......                                                                                                                                                                                             [ 59%] 
tests\unittests\agents\test_llm_agent_output_save.py ..........................                                                                                                                                                                              [ 67%] 
tests\unittests\agents\test_loop_agent.py ....                                                                                                                                                                                                               [ 68%] 
tests\unittests\agents\test_model_callback_chain.py ............                                                                                                                                                                                             [ 71%] 
tests\unittests\agents\test_parallel_agent.py ....                                                                                                                                                                                                           [ 73%]
tests\unittests\agents\test_readonly_context.py ......                                                                                                                                                                                                       [ 74%] 
tests\unittests\agents\test_remote_a2a_agent.py ..........................................................................                                                                                                                                   [ 96%] 
tests\unittests\agents\test_run_config.py ........                                                                                                                                                                                                           [ 98%] 
tests\unittests\agents\test_sequential_agent.py ....                                                                                                                                                                                                         [100%]

The errors are completely unrelated, they are caused by <Result OSError(22, 'A required privilege is not held by the client')>.exit_code because I run tests on windows and nobody bothered to make them fully multiplatform.

Copy link

@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 @racinmat, 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 an update to the agent configuration file naming convention, transitioning from agent.json to agent-card.json. The primary goal is to align with recent changes in the a2a-python project, ensuring consistency across related components. The changes include renaming existing sample agent configuration files and modifying the agent loading logic to support both the new and old naming conventions, providing a smooth transition path. This update ensures that the system correctly identifies and loads agent configurations while maintaining compatibility with previous versions.

Highlights

  • Agent Card Naming Convention: The standard agent configuration file name has been updated from agent.json to agent-card.json across all sample directories, reflecting a new naming convention.
  • Backward Compatibility: The agent loading mechanism has been enhanced to first look for agent-card.json and then gracefully fall back to agent.json, ensuring backward compatibility for existing configurations.
  • Test Suite Updates: Unit tests for remote A2A agents and FastAPI integration have been updated to align with the new agent-card.json naming, ensuring test accuracy and consistency with the updated logic.
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.

@adk-bot adk-bot added bot triaged [Bot] This issue is triaged by ADK bot core [Component] This issue is related to the core interface and implementation labels Aug 20, 2025
@adk-bot adk-bot requested a review from Jacksunwei August 20, 2025 08:22
Copy link

@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 updates the codebase to prefer agent-card.json over the deprecated agent.json for agent definitions, aligning with a change in a2a-python. The changes correctly implement backward compatibility by checking for both filenames. The sample agent files and tests have been updated accordingly. My review includes one suggestion to refactor a loop in src/google/adk/cli/fast_api.py to improve efficiency and maintainability by removing a redundant file system check.

@racinmat racinmat changed the title New agent card fix: new agent card Aug 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot triaged [Bot] This issue is triaged by ADK bot core [Component] This issue is related to the core interface and implementation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

A2A integration still uses deprecated agent.json
2 participants