Skip to content

Agent published using to_a2a and deployed to Google Cloud Run mandatorily adds port to the URL in Agent Card #2405

@ameya-sap

Description

@ameya-sap

** Please make sure you read the contribution guide and file the issues in the right place. **
Contribution guide.

Describe the bug
Agent published using to_a2a and deployed to Google Cloud Run mandatorily adds port to the URL in Agent Card, which breaks calling it from A2AClient

To Reproduce
Steps to reproduce the behavior:

  1. Create a simple agent and expose by using the to_a2a() function.
  2. Deploy it to cloud run. Once deployed you will see that the URL in Agent card is pointing to localhost:8000
  3. Now, redeploy it by modifying URL to include cloud run service host, example: a2a_app = to_a2a(root_agent, host="...cloud run service host...")
  4. Once deployed check the Agent card from cloud run, you will notice that the URL in the card will be "url": "http://...cloud run service host..:8000",
  5. This URL will be used by "@a2a-js/sdk/client" or any other client once integrated. But cloud run service does not accept port and the client would fail with A2A Client Communication Error
Image

Expected behavior
to_a2a() function should not mandate port while constructing agent card URL. Below code in agent_to_a2y.py should be corrected

Image

Metadata

Metadata

Assignees

Labels

core[Component] This issue is related to the core interface and implementation

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions