-
Notifications
You must be signed in to change notification settings - Fork 142
[Bug]: spec.AgentCard does not allow many agents on same domain #771
Description
What happened?
https://darrelmiller.github.io/agentbin/index.html is a test bed that provides 3 agents on the same domain:
- https://agentbin.greensmoke-1163cb63.eastus.azurecontainerapps.io/spec/.well-known/agent-card.json
- https://agentbin.greensmoke-1163cb63.eastus.azurecontainerapps.io/echo/.well-known/agent-card.json
- https://agentbin.greensmoke-1163cb63.eastus.azurecontainerapps.io/spec03/.well-known/agent-card.json
I was expecting to be able to connect to the "spec" agent card with a call to
A2A.getAgentCard("https://agentbin.greensmoke-1163cb63.eastus.azurecontainerapps.io/spec/");
but that does work as it builds the URL 'https://agentbin.greensmoke-1163cb63.eastus.azurecontainerapps.io/.well-known/agent-card.json" which is a 404.
The AgentCard follows the spec that mandates that the agent card can be at https://{server_domain}/.well-known/agent-card.json.
However the spec also says it should be possible to use "Pre-configured Agent Card URLs".
With the current AgentCard API, I've to split the agent url in two: server domain & path:
A2A.getAgentCard("https://agentbin.greensmoke-1163cb63.eastus.azurecontainerapps.io", "/spec/.well-know/agent-card.json");
This gives a poor UX if the client gets from URL as a parameter as it's up to the user to split this URL in 2.
Note that this does not work:
AgentCard card = A2A.getAgentCard("https://agentbin.greensmoke-1163cb63.eastus.azurecontainerapps.io/spec/.well-known/agent-card.json");
because the URL builder extracts the server domain from this URL and then appends /.well-known/agent-card.json.
It should be possible to pass a full URL of an agent card(including the well-known/agent-card.json bits) and let the client fetch this URL with doing any shenanigans.
Relevant log output
Code of Conduct
- I agree to follow this project's Code of Conduct