Skip to content

Conversation

@egor-baranov
Copy link
Contributor

@egor-baranov egor-baranov commented Apr 16, 2025

In file /samples/js/src/client/client.ts there are an agentCard method that triggers a GET request trying to retrieve this data. But from the server-side it's defined only in /.well-known/agent.json. So we need to additionally implement the same method through endpoint compatible with specification

https://github.com/google/A2A/blob/71b5a485a9cf844a531e8a8c821507d9358dd4b9/samples/js/src/client/client.ts#L362

In file /samples/js/src/client/client.ts there are an agentCard method that triggers a GET request trying to retrieve this data. But from the server-side it's defined only in /.well-known/agent.json. So we need to additionally implement the same method through endpoint compatible with specification
@google-cla
Copy link

google-cla bot commented Apr 16, 2025

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@olegchir
Copy link

Looks legit

@egor-baranov
Copy link
Contributor Author

Doc string says

/**
   * Retrieves the AgentCard.
   * Note: The standard A2A protocol doesn't define a JSON-RPC method for this.
   * This implementation fetches it from a hypothetical '/agent-card' endpoint
   * on the same server, assuming it's provided out-of-band.
   * Caches the result after the first successful fetch.
   */

But there are no implementations to retrieve an agent card from /.well-known/agent.json. Should it be a distinguished method in API or there are need to be a custom implementation of AgentCard? I just don't see a point to have the same method which is provided from the agent.json out of the box. But not presented by an API client

Any thoughts on that?

@zeroasterisk zeroasterisk requested a review from mbleigh April 25, 2025 22:47
@mbleigh
Copy link
Contributor

mbleigh commented Apr 26, 2025

I don't really understand what you're trying to do here - the spec specifies that /.well-known/agent.json is the discovery URL, there is no /agent-card endpoint as far as I know. Can you help me understand what part of the spec you feel is lacking and needs to be implemented here?

@holtskinner
Copy link
Member

Please move this PR to the new samples repo here https://github.com/google-a2a/a2a-samples

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants