-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Description
Describe the bug
When using get_fast_api_app(a2a=True)
1 to serve a remote agent, the Agent Card becomes inaccessible via the legacy path /.well-known/agent.json
after upgrading a2a-sdk from v0.2.x to v0.3.x. This breaks backward compatibility for existing clients that expect the old Agent Card path.
To Reproduce
Steps to reproduce the behavior:
- Install a2a-sdk v0.2.x and google-adk
- Create a remote agent using
get_fast_api_app(a2a=True)
- Verify Agent Card is accessible at
/.well-known/agent.json
- Upgrade a2a-sdk to v0.3.x
- Restart the agent server
- Access
/.well-known/agent.json
- returns 404 error - Access
/.well-known/agent-card.json
- works correctly
Expected behavior
The Agent Card should be accessible via both the new path (/.well-known/agent-card.json
) and the legacy path (/.well-known/agent.json
) to maintain backward compatibility, similar to how a2a-sdk itself handles this transition.
Screenshots
N/A
Desktop (please complete the following information):
- OS: macOS
- Python version: 3.13.0
- ADK version: 1.10.0
- a2a-sdk version: v0.3.1
Model Information:
Any model can be used to reproduce this issue.
Additional context
- The issue stems from ADK's dependency on
AGENT_CARD_WELL_KNOWN_PATH
constant from a2a-sdk, which changed from/.well-known/agent.json
to/.well-known/agent-card.json
in v0.3.0 - a2a-sdk v0.3.x maintains backward compatibility by serving both paths and shows a deprecation warning for the old path
- ADK currently only serves the path defined by the current
AGENT_CARD_WELL_KNOWN_PATH
constant - This breaks existing
RemoteA2aAgent
implementations that hardcode the old Agent Card URL - Relevant code: fast_api.py#L375-L378
- Related blog post: https://nikkie-ftnext.hatenablog.com/entry/a2a-spec-0.3.0-breaking-change-agent-card-path (in Japanese)
Proposed solution
Add support for PREV_AGENT_CARD_WELL_KNOWN_PATH
from a2a-sdk to serve the Agent Card on both the current and legacy paths, maintaining backward compatibility similar to a2a-sdk's approach.