feat(a2a): Infer agent cards from ADK agents - #6180
Open
jordanchendev wants to merge 2 commits into
Open
Conversation
jordanchendev
marked this pull request as ready for review
June 23, 2026 02:44
jordanchendev
force-pushed
the
fix/2237-infer-agent-card
branch
from
June 24, 2026 09:54
133fca9 to
89c38c7
Compare
Allow A2A setup in get_fast_api_app to serve ADK agent directories without a checked-in agent.json by building the AgentCard from the loaded ADK agent. Fixes google#2237 Tests: uv run python -m pytest tests/unittests/cli/test_fast_api_a2a.py tests/unittests/cli/test_fast_api.py -k a2a tests/unittests/a2a/utils/test_agent_card_builder.py tests/unittests/a2a/utils/test_agent_to_a2a.py -q uv run pre-commit run --files src/google/adk/cli/fast_api.py tests/unittests/cli/test_fast_api_a2a.py
jordanchendev
force-pushed
the
fix/2237-infer-agent-card
branch
from
June 25, 2026 02:16
b1c4674 to
a26259f
Compare
Collaborator
|
Hi @jordanchendev , Thank you for your contribution! We appreciate you taking the time to submit this pull request. Your PR has been received by the team and is currently under review. We will provide feedback as soon as we have an update to share. |
Collaborator
|
Hi @xuanyang15 , can you please review this. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #2237.
This lets
get_fast_api_app(..., a2a=True)expose standard ADK agentdirectories even when they do not include an explicit
agent.json. Existingagent.jsonfiles still take precedence; otherwise the loaded ADK agent isused to build an
AgentCard.The loaded agent is normalized to the
BaseAgent | Workflowshape accepted byAgentCardBuilder, soApp.root_agentis validated before card generation.Testing
Checked:
Result:
Passed:
Result:
Passed:
Result:
Passed:
Result:
Not rerun after rebasing:
I previously ran
py312,py313tox and hit failures intests/unittests/models/test_interactions_utils.pyon the old base. Afterrebasing onto latest
origin/main, that previously failing test file nowpasses as shown above.