feat(a2a): Infer agent cards from ADK agents#6180
Draft
jordanchendev wants to merge 1 commit into
Draft
Conversation
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
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.Testing
Passed:
Result:
Passed:
Result:
Attempted tox:
Result:
The tox failures are all in
tests/unittests/models/test_interactions_utils.pyand fail because the installed
google.genai.interactions.FunctionCallStepdoes not expose the
signatureattribute expected bysrc/google/adk/models/interactions_utils.py. The A2A and CLI tests touched bythis PR pass in the same environment.