Skip to content

feat: support open agent discovery under shared base URL via API Catalog [PoC: DO NOT MERGE] #109

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ognis1205
Copy link
Contributor

@ognis1205 ognis1205 commented May 26, 2025

Description

Thank you for opening a Pull Request!
Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

Note:
This PR is currently not ready to be merged as it temporarily uses types.py generated from a personal fork of the schema repository. This will be replaced with an official schema source once it becomes available or is upstreamed.

While this PR is primarily intended as a PoC/demo implementation, if google/A2A#642 is considered meaningful and accepted by the community, we may consider merging this implementation more formally into the project.

TODO

  • Complete SDK implementation
  • Add example usage
  • Write test cases

Fixes N/A 🦕

@ognis1205 ognis1205 changed the title feat(schema): support open agent discovery under shared base URL via API Catalog (WIP) feat: support open agent discovery under shared base URL via API Catalog (WIP) May 26, 2025
@ognis1205 ognis1205 force-pushed the poc/agent-catalog branch from 2aa4a5c to 2bdc4f8 Compare May 28, 2025 02:35
@ognis1205 ognis1205 changed the title feat: support open agent discovery under shared base URL via API Catalog (WIP) feat: support open agent discovery under shared base URL via API Catalog May 28, 2025
@ognis1205 ognis1205 marked this pull request as ready for review May 28, 2025 23:51
@ognis1205 ognis1205 requested a review from a team as a code owner May 28, 2025 23:51
@ognis1205 ognis1205 force-pushed the poc/agent-catalog branch from 746d5b3 to 55ae0e3 Compare May 31, 2025 23:30
@@ -1058,6 +1142,21 @@ class SetTaskPushNotificationConfigSuccessResponse(BaseModel):
"""


class AgentCatalog(BaseModel):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change will need to be approved in the A2A specification. https://github.com/google-a2a/A2A

This file is the current source of truth https://github.com/google-a2a/A2A/blob/main/types/src/types.ts

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @holtskinner , thank you for the review!

Just a quick reminder: as mentioned in the PR description, this is a PoC and currently uses a temporary types.py generated via datamodel-codegen from a personal fork of the schema repository. This setup is only intended to demonstrate what integration might look like, and will be updated once the schema is finalized and available upstream.

To make this intent clearer, I’ll update the PR title accordingly as well. Thanks again for taking the time to look through it!

@ognis1205 ognis1205 changed the title feat: support open agent discovery under shared base URL via API Catalog [DO NOT MERGE - PoC] feat: support open agent discovery under shared base URL via API Catalog Jun 2, 2025
@ognis1205 ognis1205 force-pushed the poc/agent-catalog branch from 6e86e78 to 293dc75 Compare June 3, 2025 20:04
@yangzhengzhiroy
Copy link

yangzhengzhiroy commented Jun 4, 2025

I was exploring shared domain and this is right on time, thanks!

If I understand correctly, this change requires agent catalog definition to have multiple agent card info into one catalog for agent discovery. Since this requires changes on a2a.json, will it be easier to adopt this feature by keeping the same schema with separate well-known locations, {base-url}/{agent-identifier}/.well-known/agent.json? Though this requires one agent.json per each agent, it may help to push this feature more smoothly.

@ognis1205
Copy link
Contributor Author

Hi @yangzhengzhiroy, thank you for your comment!

Your understanding is mostly correct. While "API Catalog" might sound a bit grand, the idea is to support Open Discovery by exposing a list of agent endpoints via a /.well-known/agent-catalog endpoint. So as you pointed out, if we want to adopt this as part of the A2A protocol, it would indeed require changes to the a2a.json schema.

One small clarification: according to the RFC for Well-Known URIs, the .well-known path must reside at the root level of the origin. That means {base-url}/{agent-identifier}/.well-known/agent.json would not be valid. Instead, a path like {base-url}/{agent-identifier}/path/to/agent.json would be more appropriate (the actual path can be arbitrary outside of .well-known).

I'd really appreciate it if you could also take a look at this discussion and share your thoughts there!

@ognis1205
Copy link
Contributor Author

ognis1205 commented Jun 5, 2025

Hi @yangzhengzhiroy, thanks again for your input!

I took another look at your comment and realized there might be a fundamental misunderstanding. To clarify:

The API Catalog is not intended to combine multiple Agent Card definitions into a single catalog.
Instead, it’s designed to support Open Discovery, as outlined in the Internet Draft, by exposing the list of A2A-related
endpoints — such as Agent Card URLs — via a .well-known/api-catalog endpoint.

So, it's more about publishing a directory of endpoints (including one or more Agent Cards per agent, if needed), rather than merging multiple agents’ information into one file.

Hope that clears things up — happy to discuss further if needed!

@ognis1205 ognis1205 changed the title [DO NOT MERGE - PoC] feat: support open agent discovery under shared base URL via API Catalog feat: support open agent discovery under shared base URL via API Catalog (PoC: DO NOT MERGE) Jun 9, 2025
@ognis1205 ognis1205 force-pushed the poc/agent-catalog branch 3 times, most recently from a5d84ae to 1c49f84 Compare June 18, 2025 19:11
@ognis1205 ognis1205 changed the title feat: support open agent discovery under shared base URL via API Catalog (PoC: DO NOT MERGE) feat: support open agent discovery under shared base URL via API Catalog [PoC: DO NOT MERGE] Jun 19, 2025
@ognis1205 ognis1205 force-pushed the poc/agent-catalog branch 4 times, most recently from 48b7c3f to 029f2df Compare June 23, 2025 20:30
@ognis1205 ognis1205 requested a review from a team as a code owner June 23, 2025 20:30
@ognis1205 ognis1205 force-pushed the poc/agent-catalog branch 4 times, most recently from 6e0f8ca to 62baf5b Compare June 26, 2025 20:49
Copy link
Contributor Author

@ognis1205 ognis1205 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ognis1205 ognis1205 force-pushed the poc/agent-catalog branch 2 times, most recently from 51c4412 to 0066470 Compare July 2, 2025 19:43
…log [PoC: DO NOT MERGE]

Signed-off-by: Shingo OKAWA <shingo.okawa.g.h.c@gmail.com>
@ognis1205 ognis1205 force-pushed the poc/agent-catalog branch from c103828 to d048513 Compare July 2, 2025 19:55
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