Repository navigation
🌱 support both legacy and new agent card endpoint for all agent examples - #116
Conversation
Signed-off-by: Paolo Dettori <[email protected]>
There was a problem hiding this comment.
Pull request overview
This pull request updates all A2A agent examples to support the new standard agent card endpoint (/.well-known/agent-card.json) alongside the legacy endpoint (/.well-known/agent.json). This change ensures compatibility with modern frameworks like Google ADK and Amazon Bedrock AgentCore, which use the new standard path, while maintaining backward compatibility with older clients.
Changes:
- Added import for
starlette.routing.Routeto all 9 agent files - Registered a new route for
/.well-known/agent-card.jsonthat reuses the same handler as the legacy path - Both endpoints now serve identical agent card data
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| a2a/weather_service/src/weather_service/agent.py | Added new agent-card.json route alongside legacy agent.json path |
| a2a/slack_researcher/a2a_agent.py | Added new agent-card.json route alongside legacy agent.json path |
| a2a/git_issue_agent/a2a_agent.py | Added new agent-card.json route alongside legacy agent.json path |
| a2a/a2a_currency_converter/app/main.py | Added new agent-card.json route alongside legacy agent.json path |
| a2a/a2a_contact_extractor/main.py | Added new agent-card.json route alongside legacy agent.json path |
| a2a/image_service/src/image_service/agent.py | Added new agent-card.json route alongside legacy agent.json path |
| a2a/reservation_service/src/reservation_service/agent.py | Added new agent-card.json route alongside legacy agent.json path |
| a2a/file_organizer/src/file_organizer/agent.py | Added new agent-card.json route alongside legacy agent.json path |
| a2a/generic_agent/src/generic_agent/agent.py | Added new agent-card.json route alongside legacy agent.json path |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Paolo Dettori <[email protected]> Co-authored-by: Copilot <[email protected]>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Paolo Dettori <[email protected]>
Summary
Updated all A2A agents to serve the agent card at both paths:
Files Modified (9 total):
Changes Made:
Both paths now serve the identical agent card, ensuring compatibility with:
Related issue(s)
Fixes #115
🤖 Assisted by Claude Code