Skip to content

Commit 2bd83fd

Browse files
committed
Restructure the agent_sdks folder
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 ``` Tested: - [x] All individual sample ADKs are working with connected client. - [x] The orchestrator sample is also working with all sub-agents.
1 parent dde8862 commit 2bd83fd

59 files changed

Lines changed: 138 additions & 118 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

a2a_agents/java/src/main/java/org/a2ui/A2uiExtension.java renamed to agent_sdks/java/src/main/java/org/a2ui/A2uiExtension.java

File renamed without changes.

a2a_agents/java/src/test/java/org/a2ui/A2uiExtensionTest.java renamed to agent_sdks/java/src/test/java/org/a2ui/A2uiExtensionTest.java

File renamed without changes.
Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
# A2UI Agent implementation
22

3-
The `a2a_agents/python/a2ui_agent/` is the Python implementation of the a2ui agent library.
3+
The `agent_sdks/python/src/a2ui` is the Python implementation of the A2UI agent SDK library.
4+
5+
## Core components (`src/a2ui/core`)
6+
7+
The `src/a2ui/core` directory contains the core logic for the A2UI agent:
8+
9+
* **`a2ui_agent.py`**: The core A2UI agent class.
10+
* **`a2ui_schema_utils.py`**: Schema manipulation helpers.
411

512
### Extension components (`src/a2ui/extension`)
613

@@ -12,10 +19,10 @@ The `src/a2ui/extension` directory contains the core logic for the A2UI agent ex
1219

1320
## Running tests
1421

15-
1. Navigate to the a2ui_agent dir:
22+
1. Navigate to the directory:
1623

1724
```bash
18-
cd a2a_agents/python/a2ui_agent
25+
cd agent_sdks/python
1926
```
2027

2128
2. Run the tests
@@ -26,12 +33,20 @@ The `src/a2ui/extension` directory contains the core logic for the A2UI agent ex
2633

2734
## Building the SDK
2835

29-
To build the SDK, run the following command from the `a2a_agents/python/a2ui_agent` directory:
36+
To build the SDK, run the following command from the `agent_sdks/python` directory:
3037

3138
```bash
3239
uv build .
3340
```
3441

42+
## Formatting code
43+
44+
To format the code, run the following command from the `agent_sdks/python` directory:
45+
46+
```bash
47+
uv run pyink .
48+
```
49+
3550
## Disclaimer
3651

3752
Important: The sample code provided is for demonstration purposes and illustrates the mechanics of A2UI and the Agent-to-Agent (A2A) protocol. When building production applications, it is critical to treat any agent operating outside of your direct control as a potentially untrusted entity.

a2a_agents/python/a2ui_agent/pack_specs_hook.py renamed to agent_sdks/python/pack_specs_hook.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
def load_constants(project_root):
2222
"""Loads the shared constants module directly from its path in src/."""
2323
constants_path = os.path.join(
24-
project_root, "src", "a2ui", "inference", "schema", "constants.py"
24+
project_root, "src", "a2ui", "core", "schema", "constants.py"
2525
)
2626
if not os.path.exists(constants_path):
2727
raise RuntimeError(f"Could not find shared constants at {constants_path}")
@@ -39,14 +39,14 @@ class PackSpecsBuildHook(BuildHookInterface):
3939
def initialize(self, version, build_data):
4040
project_root = self.root
4141

42-
# Load constants dynamically from src/a2ui/inference/schema/constants.py
42+
# Load constants dynamically from src/a2ui/core/schema/constants.py
4343
a2ui_constants = load_constants(project_root)
4444

4545
spec_version_map = a2ui_constants.SPEC_VERSION_MAP
4646
a2ui_asset_package = a2ui_constants.A2UI_ASSET_PACKAGE
4747
specification_dir = a2ui_constants.SPECIFICATION_DIR
4848

49-
# project root is in a2a_agents/python/a2ui_agent
49+
# project root is in agent_sdks/python
5050
# Dynamically find repo root by looking for specification_dir
5151
repo_root = a2ui_constants.find_repo_root(project_root)
5252
if not repo_root:
File renamed without changes.

a2a_agents/python/a2ui_agent/src/a2ui/extension/__init__.py renamed to agent_sdks/python/src/a2ui/__init__.py

File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)