-
Notifications
You must be signed in to change notification settings - Fork 8
feat(packaging)!: introduce slim agentex-sdk-client + heavy agentex-sdk split #370
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
max-parke-scale
wants to merge
4
commits into
next
Choose a base branch
from
maxparke/agx1-292-prototype-client-split
base: next
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
d102eb8
feat(packaging)!: introduce slim agentex-sdk-client + heavy agentex-s…
max-parke-scale da5b8f0
fix(ci): tutorial tests look for heavy wheel at adk/dist/, pass both …
max-parke-scale cdb3a48
fix(packaging): force --wheel builds, drop broken sdist path
max-parke-scale a1617e5
fix(publish): make publish-pypi idempotent across two-tag release cycles
max-parke-scale File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| { | ||
| ".": "0.11.4" | ||
| ".": "0.11.4", | ||
| "adk": "0.11.4" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| # agentex-sdk | ||
|
|
||
| The Agent Development Kit (ADK) overlay for the Agentex API. | ||
|
|
||
| ## What's in here | ||
|
|
||
| This package ships everything under `agentex.lib.*`: | ||
|
|
||
| - **ACP server** (`agentex.lib.sdk.fastacp`) — FastAPI-based agent control plane. | ||
| - **Temporal workflows** (`agentex.lib.core.temporal`) — durable agent execution. | ||
| - **CLI** (`agentex.lib.cli`) — `agentex init`, `agentex run`, deploy helpers. | ||
| - **LLM provider integrations** (`agentex.lib.adk.providers`, `agentex.lib.core.temporal.plugins`) — OpenAI Agents, Claude Agent SDK, pydantic-ai, langgraph, litellm. | ||
| - **Observability** (`agentex.lib.core.tracing`, `agentex.lib.core.observability`) — SGP, Datadog, OpenTelemetry tracing processors. | ||
|
|
||
| ## Installation | ||
|
|
||
| ```sh | ||
| pip install agentex-sdk | ||
| ``` | ||
|
|
||
| This automatically pulls in [`agentex-sdk-client`](../) (the slim Stainless-generated REST client) so `from agentex import Agentex, AsyncAgentex` works the same as before. | ||
|
|
||
| ## When to use this vs `agentex-sdk-client` | ||
|
|
||
| - **`agentex-sdk`** — you're authoring agents. Pulls everything: ACP server, Temporal, MCP, LLM providers, observability, CLI. ~37 deps. | ||
| - **`agentex-sdk-client`** — you only need to call the Agentex REST API. No agent authoring, no Temporal workflows, no FastACP server, no provider integrations. 6 deps. | ||
|
|
||
| The two packages contribute disjoint files to the `agentex.*` namespace — `agentex/lib/*` ships only from `agentex-sdk`. | ||
|
|
||
| ## Repo layout | ||
|
|
||
| This package is hand-authored and lives at `adk/` inside [scaleapi/scale-agentex-python](https://github.com/scaleapi/scale-agentex-python). The Stainless generator preserves `adk/**` via `keep_files` so its codegen never touches anything here. The sibling `agentex-sdk-client` package lives at the repo root and IS Stainless-generated. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,106 @@ | ||
| [project] | ||
| # Hand-authored ADK overlay for agentex. This package contributes only | ||
| # `agentex/lib/*` to the agentex.* namespace; the REST client surface | ||
| # (agentex/{__init__.py, _*.py, types/, resources/}) ships from the slim | ||
| # sibling package `agentex-sdk-client` which is pinned as a runtime dep. | ||
| # | ||
| # This entire `adk/` directory must be preserved across Stainless codegen | ||
| # via `keep_files: ["adk/**"]` in the Stainless dashboard config. | ||
| name = "agentex-sdk" | ||
| version = "0.11.4" | ||
| description = "Agent Development Kit (ADK) overlay for the Agentex API — FastACP server, Temporal workflows, LLM provider integrations, observability" | ||
| license = "Apache-2.0" | ||
| authors = [ | ||
| { name = "Agentex", email = "roxanne.farhad@scale.com" }, | ||
| ] | ||
| readme = "README.md" | ||
|
|
||
| dependencies = [ | ||
| # Lockstep with this package's own version — both are co-released. The | ||
| # heavy package imports from `agentex.types.*` and `agentex.protocol.*` | ||
| # which ship from the slim, so a slim bump that drops/renames anything | ||
| # imported here would silently break heavy. Bump this range whenever the | ||
| # slim's major/minor changes. | ||
| "agentex-sdk-client>=0.11.4,<0.12", | ||
| # CLI surface (agentex.lib.cli.*, agentex.lib.sdk.config.*) | ||
| "typer>=0.16,<0.17", | ||
| "questionary>=2.0.1,<3", | ||
| "rich>=13.9.2,<14", | ||
| "yaspin>=3.1.0", | ||
| "pyyaml>=6.0.2,<7", | ||
| "python-on-whales>=0.73.0,<0.74", | ||
| "kubernetes>=25.0.0,<36.0.0", | ||
| "jsonref>=1.1.0,<2", | ||
| "jsonschema>=4.23.0,<5", | ||
| "jinja2>=3.1.3,<4", | ||
| "watchfiles>=0.24.0,<1.0", | ||
| # ACP server (FastAPI app surface) | ||
| "fastapi>=0.115.0", | ||
| "starlette>=0.49.1", | ||
| "uvicorn>=0.31.1", | ||
| "aiohttp>=3.10.10,<4", | ||
| # Temporal workflows | ||
| "temporalio>=1.26.0,<2", | ||
| "cloudpickle>=3.1.1", | ||
| # Async streaming infra | ||
| "redis>=5.2.0,<8", | ||
| # LLM provider integrations | ||
| "litellm>=1.83.7,<2", | ||
| "openai-agents==0.14.1", | ||
| "openai>=2.2,<3", # Required by openai-agents; litellm now supports openai 2.x (issue #13711 resolved: https://github.com/BerriAI/litellm/issues/13711) | ||
| "claude-agent-sdk>=0.1.0", | ||
| "pydantic-ai-slim>=1.0,<2", | ||
| "langgraph-checkpoint>=2.0.0", | ||
| "scale-gp>=0.1.0a59", | ||
| "scale-gp-beta>=0.2.0", | ||
| "mcp>=1.4.1", | ||
| # Observability | ||
| "ddtrace>=3.13.0", | ||
| "opentelemetry-api>=1.20.0", | ||
| "opentelemetry-sdk>=1.20.0", | ||
| "json_log_formatter>=1.1.1", | ||
| ] | ||
|
|
||
| # agentex/lib/* uses `from typing import override` (3.12+) in 19 files. | ||
| # The slim agentex-sdk-client keeps 3.11 support. | ||
| requires-python = ">= 3.12,<4" | ||
| classifiers = [ | ||
| "Typing :: Typed", | ||
| "Intended Audience :: Developers", | ||
| "Programming Language :: Python :: 3.12", | ||
| "Programming Language :: Python :: 3.13", | ||
| "Programming Language :: Python :: 3.14", | ||
| "Operating System :: OS Independent", | ||
| "Topic :: Software Development :: Libraries :: Python Modules", | ||
| "License :: OSI Approved :: Apache Software License", | ||
| ] | ||
|
|
||
| [project.urls] | ||
| Homepage = "https://github.com/scaleapi/scale-agentex-python" | ||
| Repository = "https://github.com/scaleapi/scale-agentex-python" | ||
|
|
||
| [project.scripts] | ||
| agentex = "agentex.lib.cli.commands.main:app" | ||
|
|
||
| [build-system] | ||
| requires = ["hatchling"] | ||
| build-backend = "hatchling.build" | ||
|
|
||
| # Ship only agentex/lib/*, pulled in from the parent repo's `src/agentex/lib` | ||
| # tree. The rest of agentex.* (the Stainless-generated client) ships from the | ||
| # sibling agentex-sdk-client package, which this package pins as a runtime dep. | ||
| # Stainless explicitly preserves `src/agentex/lib/` across codegen (per | ||
| # CONTRIBUTING.md), so it's safe to keep the source where it is. | ||
| [tool.hatch.build.targets.wheel] | ||
| bypass-selection = true | ||
|
|
||
| [tool.hatch.build.targets.wheel.force-include] | ||
| "../src/agentex/lib" = "agentex/lib" | ||
|
|
||
| # Sdist deferred: hatchling can't represent the wheel's ../src/agentex/lib | ||
| # force-include in an sdist include list. CI + bin/publish-pypi pass --wheel. | ||
| [tool.hatch.build.targets.sdist] | ||
| include = [ | ||
| "/pyproject.toml", | ||
| "/README.md", | ||
| ] | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,35 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| # Publish both the Stainless-managed slim `agentex-sdk-client` package (built | ||
| # from this repo's root) and the hand-authored `agentex-sdk` ADK overlay | ||
| # (built from adk/). The two packages contribute disjoint files to the same | ||
| # `agentex.*` namespace; `agentex-sdk` pins `agentex-sdk-client` as a runtime | ||
| # dep so installing `agentex-sdk` transitively pulls in the slim client. | ||
| # | ||
| # Publish ORDER matters: slim first, then heavy. Heavy's dep on slim means | ||
| # anyone installing `agentex-sdk` hits resolver failure if slim hasn't shipped | ||
| # yet. Failing the slim publish before the heavy gives us a chance to abort | ||
| # without leaving an inconsistent registry state. | ||
| # | ||
| # Tokens: | ||
| # - $AGENTEX_SDK_CLIENT_PYPI_TOKEN — auths publishing the slim client | ||
| # - $AGENTEX_PYPI_TOKEN (alias $PYPI_TOKEN for back-compat) — auths | ||
| # publishing the heavy ADK overlay (which continues to claim the | ||
| # `agentex-sdk` name on PyPI) | ||
|
|
||
| set -eux | ||
|
|
||
| # Slim Stainless-managed client (root) — `agentex-sdk-client` on PyPI. | ||
| mkdir -p dist | ||
| rye build --clean | ||
| rye publish --yes --token=$PYPI_TOKEN | ||
| rye build --clean --wheel # --wheel: sdist deferred (see adk/pyproject.toml). | ||
| rye publish --yes --skip-existing --token="${AGENTEX_SDK_CLIENT_PYPI_TOKEN:-$PYPI_TOKEN}" | ||
|
|
||
| # Heavy ADK overlay (adk/) — `agentex-sdk` on PyPI; pins the slim above. | ||
| ( | ||
| cd adk | ||
| mkdir -p dist | ||
| # --wheel load-bearing: rye's sdist-then-wheel default can't resolve | ||
| # the force-include of ../src/agentex/lib → silent empty wheel. | ||
| rye build --clean --wheel | ||
| rye publish --yes --skip-existing --token="${AGENTEX_PYPI_TOKEN:-$PYPI_TOKEN}" | ||
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.