Skip to content

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
src/a2a/types.py Outdated
"""


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
ognis1205

This comment was marked as resolved.

@ognis1205 ognis1205 force-pushed the poc/agent-catalog branch 3 times, most recently from c103828 to d048513 Compare July 2, 2025 19:55
@ognis1205 ognis1205 force-pushed the poc/agent-catalog branch 3 times, most recently from 7e3d328 to 756eaeb Compare July 14, 2025 19:09
@ognis1205 ognis1205 force-pushed the poc/agent-catalog branch 3 times, most recently from 03a2310 to 4756d83 Compare July 22, 2025 17:23
@ognis1205 ognis1205 force-pushed the poc/agent-catalog branch from 4756d83 to 569851f Compare July 28, 2025 08:39
@ognis1205 ognis1205 closed this Aug 4, 2025
@satendrakumar
Copy link

satendrakumar commented Aug 15, 2025

@holtskinner I created an example project to run multiple agents on a single host. I’m not sure if this is the right approach. let me know your thoughts.

here is URL https://github.com/satendrakumar/a2a-multiple-agents-on-single-host

Does it make sense to add this to the a2a-samples code until it’s included in the a2a-sdk ?

@ognis1205
Copy link
Contributor Author

Closing since this branch is out of sync with upstream.
It’s referenced elsewhere, so I’ll follow up with a fresh PR based on the current SDK.

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.

5 participants