Uh oh!
There was an error while loading. Please reload this page.
feat(deps)!: split ADK/server deps into optional [adk]/[cli]/[observability] extras - #368
Conversation
7b3abb4 to
4621f8aCompare…bility] extras Bare `pip install agentex-sdk` now installs only the 6 deps the Stainless-generated REST client actually needs (`httpx`, `pydantic`, `typing-extensions`, `anyio`, `distro`, `sniffio`). Everything used by the `agentex.lib.*` surface — CLI, ACP server, Temporal workflows, LLM provider integrations, observability — moves to optional extras. Three extras for different consumer slices: - `[cli]` (11 deps) — `agentex.lib.cli.*`, `agentex.lib.sdk.config.*`, and the `agentex` CLI entry point. For tools like sgpctl that need the CLI helpers without temporal/fastapi/redis. - `[observability]` (4 deps) — `agentex.lib.core.tracing.*`, `agentex.lib.core.observability.*`. For consumers that only attach the SGP/Datadog/OTel tracing processors. - `[adk]` (31 deps) — union of [cli] + [observability] + ACP server + Temporal + Redis + MCP + LLM providers. Full agent authoring. The current install behavior is recoverable with `pip install agentex-sdk[adk]`. CLI templates (`agentex init`) are updated to pin `agentex-sdk[adk]` so newly bootstrapped agents work out of the box. BREAKING CHANGE: consumers who rely on `agentex.lib.*` must pin one of the new extras instead of bare `agentex-sdk`. The REST client surface (`from agentex import Agentex, AsyncAgentex`) is unchanged and still works with a bare install. Verified by building the wheel locally: - `Requires-Dist` (base): 6 - `Requires-Dist; extra == 'cli'`: 11 - `Requires-Dist; extra == 'observability'`: 4 - `Requires-Dist; extra == 'adk'`: 31 Stacked on AGX1-292 / #367 (drop unused deps). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
4621f8a to
d40200bComparemax-parke-scale
commented
May 26, 2026
Closing in favor of a non-breaking redesign: publish a new lean sibling package This avoids the breaking-change blast radius (130+ files across 5 repos) that this PR would have required. Tracking: AGX1-292. PR #367 (drop dead deps + exclude tests from wheel) stays open as a no-breaking-change cleanup. 🤖 — posted via Claude Code |
Summary
Stacked on #367. Second PR under AGX1-292. Do not merge before #367 lands.
Splits the SDK into a 6-dep bare client plus three opt-in extras:
pip install agentex-sdkfrom agentex import Agentex, AsyncAgentex)pip install agentex-sdk[cli]agentex.lib.cli.*,agentex.lib.sdk.config.*) + theagentexCLIpip install agentex-sdk[observability]agentex.lib.core.tracing.*)pip install agentex-sdk[adk][cli] + [observability]+ ACP server + Temporal + Redis + MCP + LLM providers[cli]and[observability]are deliberately scoped to keep client-side tools (e.g.sgpctl, voice-agent tracing setup) from pulling temporal/fastapi/redis just to use a few helpers.Also updates all 10 CLI scaffolding templates (
agentex init) to pinagentex-sdk[adk]so newly bootstrapped agent projects work out of the box.Why
agentex.libis import-lazy (empty__init__.py), so a pure REST consumer never touches the heavy deps at import time. Butpipstill installs all of them today, dragging intemporalio,fastapi,redis,kubernetes,litellm,anthropic,openai-agents,claude-agent-sdk, observability stacks, etc. — for consumers who just want to make API calls or use a small slice oflib.Audit: AGX1-292.
BREAKING CHANGE
Consumers who use
agentex.lib.*must switch fromagentex-sdkto one of:agentex-sdk[cli]if they only useagentex.lib.cli.*oragentex.lib.sdk.config.*agentex-sdk[observability]if they only useagentex.lib.core.tracing.*/.observability.*agentex-sdk[adk]for full agent authoring (FastACP + Temporal + providers + …)The REST client (
from agentex import Agentex, AsyncAgentex) is unchanged and works with a bare install.Known internal consumer blast radius
GitHub code-search across the
scaleapiorg. Migration PRs being opened in parallel:scaleapi/agentex-agents[adk]scaleapi/models[adk]scaleapi/sgp[cli]for sgpctl,[observability]for voice-agentsscaleapi/scale-agentex[adk]scaleapi/fna1-ops[adk]The CLI templates inside this repo are fixed in this PR so the
agentex initflow stays working.Verification
Test plan
Validate PR titlepasses (note the!— breaking change).pip install agentex-sdkin a clean env →from agentex import Agentexworks;import agentex.lib.adkfails withModuleNotFoundError(expected).pip install agentex-sdk[adk]→ both work.pip install agentex-sdk[cli]→from agentex.lib.cli.handlers.agent_handlers import prepare_cloud_build_contextworks.agentex initagainst an updated template produces a project that imports successfully.Rollout note
Worth a minor or major version bump to flag the install-time break in release notes.
Greptile Summary
This PR splits
agentex-sdk's runtime dependencies into a lean base install (6 deps, REST client only) and a[adk]optional extra (6 + 31 deps, full agent development kit), with intermediate[cli]and[observability]extras as sub-components of[adk]. All 10 CLI scaffolding templates generated byagentex initare updated to pinagentex-sdk[adk]so newly scaffolded projects continue to work out of the box.pyproject.toml: Moves 31 ADK/server dependencies (Temporal, FastAPI, Redis, LLM providers, CLI tools, observability) out of baredependenciesinto[adk], which composes[cli]+[observability]sub-extras using the self-referential PEP 508 syntax.*.j2): Uniformagentex-sdk→agentex-sdk[adk]substitution across all 10 template pairs (pyproject.toml.j2+requirements.txt.j2).Confidence Score: 4/5
The dep split is mechanically correct, but the
agentexbinary remains registered unconditionally while its runtime imports land exclusively in the new optional extras, breaking the CLI on a bare install.The packaging restructuring is logically sound — the self-referential extra syntax is valid PEP 508, all 10 templates are consistently updated, and the
[cli]extra is correctly scoped (CLI handlers verified to not importscale-gpor ADK-only deps). The one outstanding defect is the unconditional[project.scripts]entry point foragentexthat invokesagentex.lib.cli.commands.main:app, which immediately importstyper— a dep now living only in[cli]/[adk]. Any barepip install agentex-sdkuser who runsagentexwill get aModuleNotFoundErrorwith no actionable guidance.pyproject.toml — the
[project.scripts]entry point at line 107 registers theagentexCLI unconditionally regardless of which extras are installed.Important Files Changed
agentexconsole-script entry point remains unconditionally registered while its runtime imports (typer, etc.) are now only in the [cli]/[adk] extras, causing a ModuleNotFoundError on a bare install.Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart TD A["pip install agentex-sdk"] --> B["Base deps (6)\nhttpx, pydantic,\ntyping-extensions, anyio,\ndistro, sniffio"] C["pip install agentex-sdk[adk]"] --> D["[cli] extra (11)\ntyper, questionary, rich,\nkubernetes, jinja2, pyyaml,\npython-on-whales, etc."] C --> E["[observability] extra (4)\nddtrace, opentelemetry-api,\nopentelemetry-sdk,\njson_log_formatter"] C --> F["[adk]-only deps (16)\nfastapi, starlette, uvicorn,\ntemporalio, redis, litellm,\nopenai-agents, claude-agent-sdk,\nscale-gp, mcp, etc."] C --> B G["pip install agentex-sdk[aiohttp]"] --> H["aiohttp>=3.10.10,<4\nhttpx_aiohttp"] G --> B I["agentex init (CLI templates)"] --> J["Generated pyproject.toml\nagentex-sdk[adk]"] style B fill:#d4edda,stroke:#28a745 style D fill:#cce5ff,stroke:#007bff style E fill:#cce5ff,stroke:#007bff style F fill:#cce5ff,stroke:#007bff style H fill:#fff3cd,stroke:#ffc107Reviews (3): Last reviewed commit: "feat(deps)!: split ADK/server deps into ..." | Re-trigger Greptile