-
Notifications
You must be signed in to change notification settings - Fork 103
Description
I run into this issue while testing various A2A agent scenarios (A2A SDK version used was 0.3.3.Final)
<!-- A2A SDK version - centralized for all agents -->
<io.a2a.sdk.version>0.3.3.Final</io.a2a.sdk.version>
<!-- Common dependency versions -->
<quarkus.platform.version>3.30.1</quarkus.platform.version>
Deployment:
- 1 server A2A agent running locally available on http://localhost:11000
- 1 server A2A agent running in Kubernetes available on http://wanaku-a2a-agent.poc
- 1 java client A2A agent running locally based on
samples/java/agents/dice_agent_multi_transport/client/src/main/java/com/samples/a2a/client/TestClientRunner.java - A2A Inspector running locally and available on http://localhost:5001/
The server A2A agent running locally and in Kubernetes is the same.
we're able to pull back the agent card successfully
http://localhost:11000/.well-known/agent-card.json
http://wanaku-a2a-agent.poc/.well-known/agent-card.json
Scenario 1: it does work
java client A2A Agent (running locally) >> A2A Server Agent (running locally on port 11000)
jbang TestClientRunner.java --server-url http://localhost:11000 --message "Convert from EUR to GBP"
Connecting to agent at: http://localhost:11000
Successfully fetched public agent card:
{"name":"Wanaku Agent","description":"Function calling to Wanaku MCP toolbox. it can call currency conversion API to convert currencies it can call external APIs. It can call petstore API to get information.","url":"http://localhost:11000","version":"1.0.0","documentationUrl":"http://example.com/docs","capabilities":{"streaming":true,"pushNotifications":false,"stateTransitionHistory":false},"defaultInputModes":["text"],"defaultOutputModes":["text"],"skills":[{"id":"currency_converter","name":"Currency Converter","description":"Converts currencies using the Wanaku MCP toolbox","tags":["currency","conversion","finance","from","to","amount"],"examples":["Convert 100 USD to EUR","What is 2500 JPY in GBP?"]},{"id":"petstore_info","name":"Petstore Information","description":"Provides information about the petstore","tags":["petstore","information","pets","users","store"],"examples":["get the list of available pets in the petstore","get information about users in the petstore"]}],"supportsAuthenticatedExtendedCard":false,"additionalInterfaces":[{"transport":"HTTP+JSON","url":"http://localhost:11000"},{"transport":"GRPC","url":"http://localhost:11000"}],"preferredTransport":"JSONRPC","protocolVersion":"0.3.0"}
Using public agent card for client initialization.
Sending message: Convert from EUR to GBP
Message sent successfully. Waiting for response...
Received Task status-update: submitted
Received Task status-update: working
Received Task artifact-update: The conversion rate from EUR to GBP is 1 EUR = 0.87726 GBP.
Received Task status-update: completed
Final response: The conversion rate from EUR to GBP is 1 EUR = 0.87726 GBP.
Scenario 2: it does work
A2A Ispector (running locally) >> A2A Server Agent (running locally on port 11000)
Agent Card Url: http://localhost:11000/.well-known/agent-card.json (Agent Card is valid)
send message: convert from GBP to EUR
Response:
{
"artifact": {
"artifactId": "d9824b81-b182-4b73-8782-45af34439c1d",
"parts": [
{
"kind": "text",
"text": "The conversion rate from GBP to EUR is 1.13647."
}
]
},
"contextId": "9089e5c1-987e-48e2-aba0-3977cf8dd1ce",
"kind": "artifact-update",
"taskId": "9b3bea53-5daf-4b36-89ce-17bbb83b465b",
"id": "msg-1764764493215-z7408ih2s",
"validation_errors": []
}
Scenario 3: it does work
A2A Ispector (running locally) >> A2A Server Agent (running in kubernetes on http://wanaku-a2a-agent.poc)
Agent Card Url: http://wanaku-a2a-agent.poc/.well-known/agent-card.json (Agent Card is valid)
send message: convert from GBP to EUR
Response:
{
"artifact": {
"artifactId": "7224f787-729c-47d3-93d3-ca741b02548f",
"parts": [
{
"kind": "text",
"text": "The conversion rate from GBP to EUR is currently 1.13981."
}
]
},
"contextId": "67c65f2c-b285-4d06-afa3-046fee0a9ef1",
"kind": "artifact-update",
"taskId": "557c90f0-e2a4-485a-8a45-a568725d49f2",
"id": "msg-1764764626853-ycj5xnv3c",
"validation_errors": []
}
Scenario 4: it does NOT work
java client A2A Agent (running locally) >> A2A Server Agent (running in kubernetes on http://wanaku-a2a-agent.poc)
jbang TestClientRunner.java --server-url http://wanaku-a2a-agent.poc --message "Convert from EUR to GBP"
Connecting to agent at: http://wanaku-a2a-agent.poc
An error occurred: Failed to obtain agent card: 502
io.a2a.spec.A2AClientError: Failed to obtain agent card: 502
at io.a2a.client.http.A2ACardResolver.getAgentCard(A2ACardResolver.java:101)
at com.samples.a2a.client.TestClient.main(TestClient.java:92)
at TestClientRunner.main(TestClientRunner.java:41)