Skip to content

Restructure the agent_sdks folder#711

Merged
nan-yu merged 1 commit intogoogle:mainfrom
nan-yu:restructure
Mar 2, 2026
Merged

Restructure the agent_sdks folder#711
nan-yu merged 1 commit intogoogle:mainfrom
nan-yu:restructure

Conversation

@nan-yu
Copy link
Collaborator

@nan-yu nan-yu commented Feb 25, 2026

Description

The code is reorganized with the following structure

agent_sdks/python
- src/a2ui
  - core
    - schema
      - manager.py
      - validation.py
      - payload_fixer.py
      - ...
    - template
      - ...
    - inference_stategy.py
  - adk
    - a2a_extension
      - a2ui_extension.py
      - send_a2ui_to_client_toolset.py
- tests
  - core/schema
    - ...
  - adk/a2a_extension
    - ...

Tested:

  • All individual sample ADKs are working with connected client.
  • The orchestrator sample is also working with all sub-agents.

Pre-launch Checklist

If you need help, consider asking for advice on the discussion board.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request is a large-scale refactoring that restructures the Python SDK into the agent_sdks folder, improving project organization. A key design change is that component catalogs are now expected to be standalone, with the SDK no longer resolving $refs to other catalogs. This simplifies the SDK's logic but places more responsibility on catalog creators. The A2uiSchemaManager API has been significantly updated to reflect this new approach. My review includes a couple of suggestions to address a potential regression and improve adherence to Python best practices in the new API.

@nan-yu nan-yu force-pushed the restructure branch 2 times, most recently from a075f5a to d211021 Compare February 25, 2026 00:23
@yourkarma6788

This comment was marked as spam.

@jacobsimionato
Copy link
Collaborator

SGTM overall! I am wondering:

  • does this need to be nested in src/a2ui? I assume that's just a conventional way to structure python packages, if the package name is a2ui?
  • Can the tests be closer to the source files? I assume what you've done is just conventional for Python. I'm not familiar!

@wrenj
Copy link
Collaborator

wrenj commented Feb 25, 2026

a2ui_extension.py only depends on the A2A sdk, not the ADK

could we rename it to a2a.py and put it at base? we'd expect another file mcp.py, and interactions_api.py

@nan-yu
Copy link
Collaborator Author

nan-yu commented Feb 27, 2026

a2ui_extension.py only depends on the A2A sdk, not the ADK

could we rename it to a2a.py and put it at base? we'd expect another file mcp.py, and interactions_api.py

Makes sense. I also thought about having a top-level a2a package, but to start simple, I put the a2a.py for now.

@nan-yu
Copy link
Collaborator Author

nan-yu commented Feb 27, 2026

  • does this need to be nested in src/a2ui? I assume that's just a conventional way to structure python packages, if the package name is a2ui?

I didn't include the top level a2ui folder initially, but then realized when importing the package, it would look like from core.schema.catalog import A2uiSchemaManager, which didn't have the namespace of a2ui.. I also checked other python SDK, like ADK, it feels like it's better to add a2ui back.

  • Can the tests be closer to the source files? I assume what you've done is just conventional for Python. I'm not familiar!

I asked Gemini the same question when structuring this. It sounds like having src and tests as the root is the recommended way in python.

@jacobsimionato
Copy link
Collaborator

  • does this need to be nested in src/a2ui? I assume that's just a conventional way to structure python packages, if the package name is a2ui?

I didn't include the top level a2ui folder initially, but then realized when importing the package, it would look like from core.schema.catalog import A2uiSchemaManager, which didn't have the namespace of a2ui.. I also checked other python SDK, like ADK, it feels like it's better to add a2ui back.

  • Can the tests be closer to the source files? I assume what you've done is just conventional for Python. I'm not familiar!

I asked Gemini the same question when structuring this. It sounds like having src and tests as the root is the recommended way in python.

No problem - that all makes sense! Thanks for educating me!

@nan-yu nan-yu force-pushed the restructure branch 2 times, most recently from 5a2e09a to b02c55c Compare February 27, 2026 20:01
The code is reorganized with the following structure
```
agent_sdks/python
- src/a2ui
  - a2a.py
  - basic_catalog
    - provider.py
  - core
    - schema
      - manager.py
      - validation.py
      - payload_fixer.py
      - ...
    - template
      - ...
    - inference_stategy.py
  - adk
    - a2a_extension
      - send_a2ui_to_client_toolset.py
```

Tested:
- [x] All individual sample ADKs are working with connected client.
- [x] The orchestrator sample is also working with all sub-agents.
@nan-yu nan-yu merged commit 1ca2bd1 into google:main Mar 2, 2026
8 checks passed
@github-project-automation github-project-automation bot moved this from Todo to Done in A2UI Mar 2, 2026
@nan-yu nan-yu deleted the restructure branch March 2, 2026 23:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants