| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Audit (AGX1-292) found that the published wheel declared 8 deps with zero import sites in `src/`, plus shipped its own test files under `src/agentex/lib/.../tests/` — which forced `pytest` and `pytest-asyncio` to appear as runtime deps. Dropped: tornado, ipykernel, tzlocal, tzdata, datadog, anthropic, pytest, pytest-asyncio. Also strips the `[cli]` extra from `mcp` (only `StdioServerParameters` is imported). Hatchling wheel `exclude` added so the test trees stop shipping. The Jinja templates under `lib/cli/templates/**/test_agent.py.j2` are intentionally preserved — they render into scaffolded user projects. Verified locally: - `Requires-Dist` count 44 → 37 - Test files in wheel 24 → 0 - `.j2` agent templates still present (10) Follow-ups in AGX1-292: extras-based split of ADK/server deps, and lazy imports under `agentex.lib.adk` to keep that safe. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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 a single `[adk]` optional extra. The current install behavior is recoverable with `pip install agentex-sdk[adk]`. BREAKING CHANGE: consumers who rely on `agentex.lib.*` (CLI, ADK, fastacp, temporal, providers) must switch from `agentex-sdk` to `agentex-sdk[adk]`. 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 == 'adk'`: 31 - Bare install pulls ~6 packages instead of ~hundreds. Stacked on AGX1-292 / #367 (drop unused deps). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…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>
| Back | FazBrowse Home | New Git URL |
Summary
First of a planned set under AGX1-292. Zero-risk wins.
The published agentex-sdk wheel declares 44 required runtime deps. Audit found that 8 of them are imported nowhere in src/ and 2 more (pytest, pytest-asyncio) are only used by test files we accidentally ship inside the wheel.
Dropped (zero imports anywhere in src/agentex/**)
Tests stop shipping in the wheel
hatchling's packages = ["src/agentex"] was including 24 test files (tests/, conftest.py, pytest.ini, test_*.py) under src/agentex/lib/. Those forced pytest + pytest-asyncio into the runtime metadata. Added an exclude to the wheel target so they stop shipping; dropped both deps.
The Jinja templates at lib/cli/templates/**/test_agent.py.j2 are intentionally preserved — those render into scaffolded user projects and don't end in .py.
mcp[cli] → mcp
The [cli] extra of mcp pulls typer/rich/pyperclip for the mcp dev CLI; the SDK only uses from mcp import StdioServerParameters.
Verification
Test plan
Follow-ups (separate PRs)
Both tracked in AGX1-292.
Greptile Summary
This maintenance PR removes 8 runtime dependencies that have zero imports anywhere in src/agentex/, downgrades mcp[cli] to mcp (since only StdioServerParameters is imported), and adds hatchling exclude rules to stop test infrastructure files from shipping inside the published wheel.
Confidence Score: 5/5
Safe to merge — all removed packages are confirmed unused in src/ and the wheel exclude patterns cover every test file in the current codebase.
Every dropped dependency was verified to have zero direct imports in src/agentex. The mcp[cli]→mcp narrowing is backed by four call sites that exclusively import StdioServerParameters from the core namespace. The wheel exclude globs match all test files present under src/agentex/lib/, and the Jinja templates are correctly left untouched.
No files require special attention. pyproject.toml is the only changed file and the edits are straightforward.
Important Files Changed
Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart TD A[agentex-sdk wheel] --> B[Runtime deps kept] A --> C[Deps removed] A --> D[Wheel build target] B --> B1[mcp - StdioServerParameters only] B --> B2[claude-agent-sdk - transitively pulls anthropic] B --> B3[temporalio - transitively pulls tzdata] B --> B4[ddtrace - replaced datadog] C --> C1[tornado - security pin, unused] C --> C2[ipykernel - unused] C --> C3[tzlocal / tzdata - transitive via temporalio] C --> C4[datadog - confused with ddtrace] C --> C5[anthropic - transitive via claude-agent-sdk] C --> C6[pytest / pytest-asyncio - test-only] D --> E[packages = src/agentex] D --> F[exclude patterns added] F --> F1[lib/**/tests/**] F --> F2[lib/**/test_*.py] F --> F3[lib/**/conftest.py] F --> F4[lib/**/pytest.ini] F --> G[Jinja templates test_agent.py.j2 preserved]Reviews (1): Last reviewed commit: "chore(deps): drop unused runtime deps an..." | Re-trigger Greptile