Skip to content

Commit e51c237

Browse files
Copilotg3force
andauthored
Add microsoft-agent-framework (#31)
* Initial plan * Changes before error encountered Co-authored-by: g3force <779094+g3force@users.noreply.github.com> * Fix Makefile tabs and ruff import order after pre-commit hooks Co-authored-by: g3force <779094+g3force@users.noreply.github.com> * Three independent projects + LITELLM env vars for MSAF OpenAI client Co-authored-by: g3force <779094+g3force@users.noreply.github.com> * Apply ruff format fixes in msaf after check-fix hook Co-authored-by: g3force <779094+g3force@users.noreply.github.com> * Read Python version from adk/pyproject.toml in copilot-setup-steps.yml Co-authored-by: g3force <779094+g3force@users.noreply.github.com> * ci: Temporary add root pyproject.toml again to fix copilot action * Update publish.yml: add shared+msaf publishing, fix python-version-file and packages-dir Co-authored-by: g3force <779094+g3force@users.noreply.github.com> * Rename agenticlayer_shared→agenticlayer, remove re-exports, matrix publish workflow Co-authored-by: g3force <779094+g3force@users.noreply.github.com> * refactor: Restructure modules * fix: Adapt publish workflow to publish to separate package --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: g3force <779094+g3force@users.noreply.github.com> Co-authored-by: Nicolai Ommer <nicolai.ommer@qaware.de>
1 parent 38ae9c2 commit e51c237

Some content is hidden

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

48 files changed

+6775
-3660
lines changed

.github/workflows/copilot-setup-steps.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ jobs:
2727
- name: Setup Python
2828
uses: 'actions/setup-python@v6'
2929
with:
30-
python-version-file: "pyproject.toml"
30+
python-version-file: "adk/pyproject.toml"
3131
pip-install: "pre-commit"
3232

3333
- name: Install dependencies
34-
run: uv sync --all-packages
34+
run: make build
3535

3636
- name: Configure precommit
3737
run: pre-commit install

.github/workflows/publish.yml

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,19 @@ jobs:
99
runs-on: ubuntu-latest
1010
environment:
1111
name: pypi
12-
url: https://pypi.org/p/agentic-layer-sdk-adk
12+
url: ${{ matrix.pypi_url }}
1313
permissions:
1414
id-token: write
15+
strategy:
16+
max-parallel: 1
17+
matrix:
18+
include:
19+
- package: adk
20+
directory: adk
21+
pypi_url: https://pypi.org/p/agentic-layer-sdk-adk
22+
- package: msaf
23+
directory: msaf
24+
pypi_url: https://pypi.org/p/agentic-layer-sdk-msaf
1525

1626
steps:
1727
- name: 'Checkout'
@@ -26,21 +36,19 @@ jobs:
2636
- name: Setup Python
2737
uses: 'actions/setup-python@v6'
2838
with:
29-
python-version-file: "pyproject.toml"
30-
31-
- name: Install Dependencies
32-
working-directory: adk
33-
run: uv sync
39+
python-version-file: "adk/pyproject.toml"
3440

3541
- name: uv Version Bump
36-
working-directory: adk
42+
working-directory: ${{ matrix.directory }}
3743
run: |-
3844
VERSION=${{ github.ref_name }}
3945
uv version "${VERSION#v}"
4046
41-
- name: 'Build adk package'
42-
working-directory: adk
47+
- name: Build package
48+
working-directory: ${{ matrix.directory }}
4349
run: uv build
4450

45-
- name: 'Publish adk package to PyPI'
51+
- name: Publish package to PyPI
4652
uses: pypa/gh-action-pypi-publish@release/v1
53+
with:
54+
packages-dir: ${{ matrix.directory }}/dist

.pre-commit-config.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,12 @@ repos:
1919
# uv version.
2020
rev: 0.8.4
2121
hooks:
22-
# Update the uv lockfile
22+
# Update the uv lockfile for adk
2323
- id: uv-lock
24+
args: ["--directory", "adk"]
25+
# Update the uv lockfile for msaf
26+
- id: uv-lock
27+
args: ["--directory", "msaf"]
2428

2529
- repo: local
2630
hooks:

CLAUDE.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,11 @@ This is a Python SDK monorepo for the Agentic Layer platform that helps convert
1515

1616
### Package Structure
1717
- Root package: `agentic-layer-sdk` (meta-package)
18-
- Main SDK: `agentic-layer-sdk-adk` in `adk/agenticlayer/`
19-
- Uses uv workspace configuration with `adk/` as a workspace member
18+
- Shared: `agentic-layer-sdk-shared` in `shared/agenticlayer/` (namespace base, build-time only)
19+
- ADK SDK: `agentic-layer-sdk-adk` in `adk/agenticlayer/adk/`
20+
- MSAF SDK: `agentic-layer-sdk-msaf` in `msaf/agenticlayer/msaf/`
21+
- Uses PEP 420 implicit namespace packages: `agenticlayer/` dirs have NO `__init__.py`
22+
- Uses uv workspace configuration with `adk/` and `msaf/` as workspace members
2023

2124
## Development Commands
2225

Makefile

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,23 @@ all: build
44

55
.PHONY: build
66
build:
7-
uv sync --all-packages
7+
$(MAKE) -C adk build
8+
$(MAKE) -C msaf build
89

910

1011
.PHONY: test
1112
test: build
12-
uv run pytest
13+
$(MAKE) -C adk test
14+
$(MAKE) -C msaf test
1315

1416

1517
.PHONY: check
1618
check: build
17-
uv run ruff check
18-
uv run mypy .
19-
uv run bandit -c pyproject.toml -r .
20-
make test
19+
$(MAKE) -C adk check
20+
$(MAKE) -C msaf check
2121

2222

2323
.PHONY: check-fix
2424
check-fix: build
25-
uv run ruff format
26-
uv run ruff check --fix
25+
$(MAKE) -C adk check-fix
26+
$(MAKE) -C msaf check-fix

adk/Makefile

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
.PHONY: all
2+
all: build
3+
4+
5+
.PHONY: build
6+
build:
7+
uv sync
8+
9+
10+
.PHONY: test
11+
test: build
12+
uv run pytest
13+
14+
15+
.PHONY: check
16+
check: build
17+
uv run ruff check
18+
uv run mypy .
19+
uv run bandit -c pyproject.toml -r .
20+
make test
21+
22+
23+
.PHONY: check-fix
24+
check-fix: build
25+
uv run ruff format
26+
uv run ruff check --fix

adk/README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,12 @@ pip install agentic-layer-sdk-adk
2222
Basic usage example:
2323

2424
```python
25-
from agenticlayer.agent_to_a2a import to_a2a
2625
from agenticlayer.config import parse_sub_agents, parse_tools
27-
from agenticlayer.otel import setup_otel
2826
from google.adk.agents import LlmAgent
2927

28+
from agenticlayer.adk.agent_to_a2a import to_a2a
29+
from agenticlayer.adk.otel import setup_otel
30+
3031
# Set up OpenTelemetry instrumentation, logging and metrics
3132
setup_otel()
3233

adk/agenticlayer/__init__.py

Lines changed: 0 additions & 4 deletions
This file was deleted.

adk/agenticlayer/adk/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"""Google ADK adapter for the Agentic Layer SDK."""
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
import httpx
99
from a2a.client import A2ACardResolver
1010
from a2a.utils.constants import AGENT_CARD_WELL_KNOWN_PATH
11+
from agenticlayer.config import InteractionType, McpTool, SubAgent
12+
from agenticlayer.constants import HTTP_HEADERS_SESSION_KEY
1113
from google.adk.agents import BaseAgent, LlmAgent
1214
from google.adk.agents.llm_agent import ToolUnion
1315
from google.adk.agents.readonly_context import ReadonlyContext
@@ -17,9 +19,6 @@
1719
from google.adk.tools.mcp_tool.mcp_toolset import McpToolset
1820
from httpx_retries import Retry, RetryTransport
1921

20-
from agenticlayer.config import InteractionType, McpTool, SubAgent
21-
from agenticlayer.constants import HTTP_HEADERS_SESSION_KEY
22-
2322
logger = logging.getLogger(__name__)
2423

2524

0 commit comments

Comments
 (0)