Skip to content

Commit 0a9d996

Browse files
feat(packaging): introduce slim agentex-sdk-client sibling package
Splits the published wheel into two namespace-sharing packages so REST-only consumers (e.g. egp-api-backend, which currently hand-rolls clients to avoid dep weight) can install just the Stainless surface without dragging in the full ADK stack. Existing consumers see no change: `pip install agentex-sdk` continues to work; agentex-sdk now depends on agentex-sdk-client, so the bare REST client deps install transitively. Both packages contribute disjoint files to the agentex.* namespace. New package layout: - `agentex-sdk-client` (new, slim) - ships `agentex/{__init__.py, _*.py, _utils/, types/, resources/, py.typed}` - depends on httpx, pydantic, typing-extensions, anyio, distro, sniffio (6) - `pip install agentex-sdk-client` → 6 deps, `from agentex import Agentex` works - `agentex-sdk` (existing, heavy) - ships only `agentex/lib/*` now - depends on `agentex-sdk-client` + the existing 31 ADK deps - `pip install agentex-sdk` → 6 + 31 = 37 deps, full surface Verified locally with `python -m build --wheel` for both: - Slim wheel: 154 files (all under agentex/{__init__.py, _*.py, _utils, types, resources, py.typed}), 6 Requires-Dist, no agentex/lib/* files - Heavy wheel: only agentex/lib/* files, depends on agentex-sdk-client - Dual install on Python 3.13: both work, no file conflicts, all imports resolve correctly Follow-ups required before this can ship (see PR body): - release-please-config.json: add the second package - bin/publish-pypi: build + publish both wheels - PyPI: claim the agentex-sdk-client package name (needs maintainer auth) - Stainless dashboard: configure to emit / preserve client/pyproject.toml Tracking: AGX1-292. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 0f177c9 commit 0a9d996

3 files changed

Lines changed: 137 additions & 7 deletions

File tree

client/README.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# agentex-sdk-client
2+
3+
A lean REST client for the Agentex API. Provides the same `from agentex import Agentex, AsyncAgentex` entrypoints as `agentex-sdk` with only the dependencies the HTTP client actually needs (≈6 packages).
4+
5+
## Installation
6+
7+
```sh
8+
pip install agentex-sdk-client
9+
```
10+
11+
## Usage
12+
13+
```python
14+
from agentex import Agentex
15+
16+
client = Agentex()
17+
# ... call methods on `client.<resource>.<method>(...)`
18+
```
19+
20+
## When to use this vs `agentex-sdk`
21+
22+
- **`agentex-sdk-client`** — you only need to call the Agentex REST API. No agent authoring, no Temporal workflows, no FastACP server, no provider integrations.
23+
- **`agentex-sdk`** — you're authoring agents. Pulls everything: ACP server, Temporal, MCP, LLM providers, observability, CLI.
24+
25+
`agentex-sdk` depends on `agentex-sdk-client`, so if you install `agentex-sdk` you get the slim client transitively. The two packages contribute disjoint files to the `agentex.*` namespace — `agentex/lib/*` ships only from `agentex-sdk`.
26+
27+
## Source
28+
29+
This package is generated from the same Stainless project as `agentex-sdk`, at [scaleapi/scale-agentex-python](https://github.com/scaleapi/scale-agentex-python). The slim wheel includes only `agentex/{__init__.py, _*.py, _utils/, types/, resources/}` from the shared source tree.

client/pyproject.toml

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
[project]
2+
name = "agentex-sdk-client"
3+
version = "0.0.1"
4+
description = "Lean REST client for the Agentex API. Provides `from agentex import Agentex, AsyncAgentex` and supporting types with the minimal dependency set."
5+
license = "Apache-2.0"
6+
authors = [
7+
{ name = "Agentex", email = "roxanne.farhad@scale.com" },
8+
]
9+
readme = "README.md"
10+
11+
# Bare client surface only — the Stainless-generated REST client.
12+
# Everything ADK-related (agentex.lib.*) lives in the sibling agentex-sdk
13+
# package, which depends on this one.
14+
dependencies = [
15+
"httpx>=0.28.1,<0.29",
16+
"pydantic>=2.0.0, <3",
17+
"typing-extensions>=4.14, <5",
18+
"anyio>=3.5.0, <5",
19+
"distro>=1.7.0, <2",
20+
"sniffio",
21+
]
22+
23+
requires-python = ">= 3.11,<4"
24+
classifiers = [
25+
"Typing :: Typed",
26+
"Intended Audience :: Developers",
27+
"Programming Language :: Python :: 3.11",
28+
"Programming Language :: Python :: 3.12",
29+
"Programming Language :: Python :: 3.13",
30+
"Programming Language :: Python :: 3.14",
31+
"Operating System :: OS Independent",
32+
"Topic :: Software Development :: Libraries :: Python Modules",
33+
"License :: OSI Approved :: Apache Software License",
34+
]
35+
36+
[project.urls]
37+
Homepage = "https://github.com/scaleapi/scale-agentex-python"
38+
Repository = "https://github.com/scaleapi/scale-agentex-python"
39+
40+
[project.optional-dependencies]
41+
aiohttp = ["aiohttp>=3.10.10,<4", "httpx_aiohttp>=0.1.9"]
42+
43+
[build-system]
44+
requires = ["hatchling"]
45+
build-backend = "hatchling.build"
46+
47+
# Map the Stainless-generated client surface (excluding agentex/lib/) from
48+
# the shared src tree into the slim wheel. agentex/lib/ ships from the
49+
# sibling agentex-sdk package; both contribute to the agentex.* namespace
50+
# via disjoint files.
51+
[tool.hatch.build.targets.wheel]
52+
bypass-selection = true
53+
54+
[tool.hatch.build.targets.wheel.force-include]
55+
"../src/agentex/__init__.py" = "agentex/__init__.py"
56+
"../src/agentex/_base_client.py" = "agentex/_base_client.py"
57+
"../src/agentex/_client.py" = "agentex/_client.py"
58+
"../src/agentex/_compat.py" = "agentex/_compat.py"
59+
"../src/agentex/_constants.py" = "agentex/_constants.py"
60+
"../src/agentex/_exceptions.py" = "agentex/_exceptions.py"
61+
"../src/agentex/_files.py" = "agentex/_files.py"
62+
"../src/agentex/_models.py" = "agentex/_models.py"
63+
"../src/agentex/_qs.py" = "agentex/_qs.py"
64+
"../src/agentex/_resource.py" = "agentex/_resource.py"
65+
"../src/agentex/_response.py" = "agentex/_response.py"
66+
"../src/agentex/_streaming.py" = "agentex/_streaming.py"
67+
"../src/agentex/_types.py" = "agentex/_types.py"
68+
"../src/agentex/_version.py" = "agentex/_version.py"
69+
"../src/agentex/_utils" = "agentex/_utils"
70+
"../src/agentex/types" = "agentex/types"
71+
"../src/agentex/resources" = "agentex/resources"
72+
"../src/agentex/py.typed" = "agentex/py.typed"
73+
74+
[tool.hatch.build.targets.sdist]
75+
bypass-selection = true
76+
77+
[tool.hatch.build.targets.sdist.force-include]
78+
"../src/agentex/__init__.py" = "src/agentex/__init__.py"
79+
"../src/agentex/_base_client.py" = "src/agentex/_base_client.py"
80+
"../src/agentex/_client.py" = "src/agentex/_client.py"
81+
"../src/agentex/_compat.py" = "src/agentex/_compat.py"
82+
"../src/agentex/_constants.py" = "src/agentex/_constants.py"
83+
"../src/agentex/_exceptions.py" = "src/agentex/_exceptions.py"
84+
"../src/agentex/_files.py" = "src/agentex/_files.py"
85+
"../src/agentex/_models.py" = "src/agentex/_models.py"
86+
"../src/agentex/_qs.py" = "src/agentex/_qs.py"
87+
"../src/agentex/_resource.py" = "src/agentex/_resource.py"
88+
"../src/agentex/_response.py" = "src/agentex/_response.py"
89+
"../src/agentex/_streaming.py" = "src/agentex/_streaming.py"
90+
"../src/agentex/_types.py" = "src/agentex/_types.py"
91+
"../src/agentex/_version.py" = "src/agentex/_version.py"
92+
"../src/agentex/_utils" = "src/agentex/_utils"
93+
"../src/agentex/types" = "src/agentex/types"
94+
"../src/agentex/resources" = "src/agentex/resources"
95+
"../src/agentex/py.typed" = "src/agentex/py.typed"
96+
"README.md" = "README.md"
97+
"pyproject.toml" = "pyproject.toml"

pyproject.toml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ authors = [
88
{ name = "Agentex", email = "roxanne.farhad@scale.com" },
99
]
1010

11+
# `agentex-sdk` keeps shipping the full developer experience. The
12+
# Stainless-generated REST client (`from agentex import Agentex, AsyncAgentex`
13+
# and supporting `agentex/{_*.py,types,resources}`) now ships from the slim
14+
# sibling package `agentex-sdk-client`. Anyone who installs `agentex-sdk` gets
15+
# `agentex-sdk-client` transitively, so existing consumer code is unchanged.
1116
dependencies = [
12-
"httpx>=0.28.1,<0.29",
13-
"pydantic>=2.0.0, <3",
14-
"typing-extensions>=4.14, <5",
15-
"anyio>=3.5.0, <5",
16-
"distro>=1.7.0, <2",
17-
"sniffio",
17+
"agentex-sdk-client",
1818
"typer>=0.16,<0.17",
1919
"questionary>=2.0.1,<3",
2020
"rich>=13.9.2,<14",
@@ -150,8 +150,12 @@ include = [
150150
"src/*"
151151
]
152152

153+
# This wheel ships only agentex/lib/* — the rest of the agentex.* namespace
154+
# (the Stainless-generated client) ships from the sibling agentex-sdk-client
155+
# package, which agentex-sdk pulls in as a runtime dep.
153156
[tool.hatch.build.targets.wheel]
154-
packages = ["src/agentex"]
157+
only-include = ["src/agentex/lib"]
158+
sources = ["src"]
155159

156160
[tool.hatch.build.targets.sdist]
157161
# Basically everything except hidden files/directories (such as .github, .devcontainers, .python-version, etc)

0 commit comments

Comments
 (0)