Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ jobs:
# force-include can't build via the sdist-then-wheel default.
run: uv build --all-packages --wheel

- name: Smoke-test wheel install
# Both wheels must install together into one working agentex.* namespace.
run: ./scripts/check-wheel-install

- name: Get GitHub OIDC Token
if: |-
github.repository == 'stainless-sdks/agentex-sdk-python' &&
Expand Down
4 changes: 2 additions & 2 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
".": "0.13.0",
"adk": "0.13.0"
".": "0.13.1",
"adk": "0.13.1"
}
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,20 @@

* **tracing:** emit OTel metrics for async span queue depth, batch drain, and SGP export success/failure (HTTP status labels). Disable SDK-side recording with ``AGENTEX_TRACING_METRICS=0``.

## 0.13.1 (2026-06-17)

Full Changelog: [agentex-client-v0.13.0...agentex-client-v0.13.1](https://github.com/scaleapi/scale-agentex-python/compare/agentex-client-v0.13.0...agentex-client-v0.13.1)

### Bug Fixes

* **adk:** re-send task_id/agent_id in state updates for backend compatibility ([#405](https://github.com/scaleapi/scale-agentex-python/issues/405)) ([f59f26d](https://github.com/scaleapi/scale-agentex-python/commit/f59f26d4402f01318cf34d57820e121d97719986))
* **packaging:** guard agentex-client surface, bump floor, smoke-test wheel install ([#406](https://github.com/scaleapi/scale-agentex-python/issues/406)) ([a5abbb9](https://github.com/scaleapi/scale-agentex-python/commit/a5abbb9669c6ab71c52e60db72676c95c20d840d))


### Documentation

* drop stale keep_files / dashboard-config comments ([#401](https://github.com/scaleapi/scale-agentex-python/issues/401)) ([23858df](https://github.com/scaleapi/scale-agentex-python/commit/23858df775d0a617c6418eed28f1b68c9bf9ed5c))

## 0.13.0 (2026-06-10)

Full Changelog: [agentex-client-v0.12.0...agentex-client-v0.13.0](https://github.com/scaleapi/scale-agentex-python/compare/agentex-client-v0.12.0...agentex-client-v0.13.0)
Expand Down
13 changes: 13 additions & 0 deletions adk/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Changelog

## 0.13.1 (2026-06-17)

Full Changelog: [agentex-sdk-v0.13.0...agentex-sdk-v0.13.1](https://github.com/scaleapi/scale-agentex-python/compare/agentex-sdk-v0.13.0...agentex-sdk-v0.13.1)

### Bug Fixes

* **packaging:** guard agentex-client surface, bump floor, smoke-test wheel install ([#406](https://github.com/scaleapi/scale-agentex-python/issues/406)) ([a5abbb9](https://github.com/scaleapi/scale-agentex-python/commit/a5abbb9669c6ab71c52e60db72676c95c20d840d))


### Documentation

* drop stale keep_files / dashboard-config comments ([#401](https://github.com/scaleapi/scale-agentex-python/issues/401)) ([23858df](https://github.com/scaleapi/scale-agentex-python/commit/23858df775d0a617c6418eed28f1b68c9bf9ed5c))

## 0.13.0 (2026-06-10)

Full Changelog: [agentex-sdk-v0.12.0...agentex-sdk-v0.13.0](https://github.com/scaleapi/scale-agentex-python/compare/agentex-sdk-v0.12.0...agentex-sdk-v0.13.0)
Expand Down
2 changes: 1 addition & 1 deletion adk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ The two packages contribute disjoint files to the `agentex.*` namespace — `age

## 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-client` package lives at the repo root and IS Stainless-generated.
This package is hand-authored and lives at `adk/` inside [scaleapi/scale-agentex-python](https://github.com/scaleapi/scale-agentex-python). Stainless codegen never touches `adk/**` — it's outside the generated surface. The sibling `agentex-client` package lives at the repo root and IS Stainless-generated.
7 changes: 2 additions & 5 deletions adk/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,8 @@
# `agentex/lib/*` to the agentex.* namespace; the REST client surface
# (agentex/{__init__.py, _*.py, types/, resources/}) ships from the slim
# sibling package `agentex-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.13.0"
version = "0.13.1"
description = "Agent Development Kit (ADK) overlay for the Agentex API — FastACP server, Temporal workflows, LLM provider integrations, observability"
license = "Apache-2.0"
authors = [
Expand All @@ -18,7 +15,7 @@ readme = "README.md"
dependencies = [
# Co-released in lockstep; floor-only by design — a ceiling would
# eventually exclude the co-versioned slim (release-please can't bump it).
"agentex-client>=0.12.0",
"agentex-client>=0.13.0",
# CLI surface (agentex.lib.cli.*, agentex.lib.sdk.config.*)
"typer>=0.16,<0.17",
"questionary>=2.0.1,<3",
Expand Down
7 changes: 1 addition & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,8 @@
# This is the Stainless-generated REST client. The hand-authored ADK
# overlay (formerly `src/agentex/lib/*`) now lives in `adk/` and ships
# as the sibling `agentex-sdk` package — see `adk/pyproject.toml`.
#
# Stainless dashboard config must:
# - Rename `package_name` from `agentex-sdk` to `agentex-client`
# - Reduce the dep list to the 6 bare-client deps below
# - Add `adk/**` to `keep_files` so the ADK overlay persists across codegen
name = "agentex-client"
version = "0.13.0"
version = "0.13.1"
description = "The official Python REST client for the Agentex API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
25 changes: 25 additions & 0 deletions scripts/check-wheel-install
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/usr/bin/env bash
# Smoke: agentex-client + agentex-sdk must install together into one working
# agentex.* namespace. Builds + installs in a clean temp dir to avoid stale dist/.

set -euo pipefail

cd "$(dirname "$0")/.."

work="$(mktemp -d)"
echo "==> building both wheels into $work/dist"
uv build --all-packages --wheel --out-dir "$work/dist"

venv="$work/venv"
uv venv "$venv" >/dev/null
echo "==> installing both wheels into a fresh venv"
uv pip install --python "$venv" "$work"/dist/agentex_client-*.whl "$work"/dist/agentex_sdk-*.whl

echo "==> importing the merged namespace from the installed wheels"
"$venv/bin/python" - <<'PY'
import agentex.lib.adk # ADK overlay — ships in agentex-sdk
from agentex.types import Event # client surface — ships in agentex-client
from agentex.resources import states # client surface that "didn't land" in the incident
print("agentex namespace OK:", Event.__name__, states.__name__)
PY
2 changes: 1 addition & 1 deletion src/agentex/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

__title__ = "agentex"
__version__ = "0.13.0" # x-release-please-version
__version__ = "0.13.1" # x-release-please-version
4 changes: 4 additions & 0 deletions src/agentex/lib/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
from agentex.lib._version_guard import verify_client_compatibility

# Fail fast + clearly on a skewed/incomplete agentex-client install.
verify_client_compatibility()
28 changes: 28 additions & 0 deletions src/agentex/lib/_version_guard.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
"""Fail fast with a clear error on an incomplete agentex-client install instead
of a cryptic `cannot import name ... from agentex.types`."""

from __future__ import annotations

from importlib.metadata import PackageNotFoundError, version


def _installed(package: str) -> str:
try:
return version(package)
except PackageNotFoundError:
return "unknown"


def verify_client_compatibility() -> None:
# Canary on the client REST surface, not the version: newer clients are fine
# (additive); we only fail if a symbol/resource the ADK needs is absent.
try:
from agentex.types import Event as _Event # noqa: F401
from agentex.resources import states as _states # noqa: F401
except (ImportError, AttributeError) as exc:
raise ImportError(
f"agentex-sdk could not import the agentex-client REST surface it "
f"depends on (agentex-sdk={_installed('agentex-sdk')}, "
f"agentex-client={_installed('agentex-client')}). Reinstall both at a "
f"compatible version, e.g. `pip install --force-reinstall agentex-sdk`."
) from exc
3 changes: 3 additions & 0 deletions src/agentex/lib/core/services/adk/state.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,12 @@ async def update_state(
"state": state,
},
) as span:
# Send task_id/agent_id in the body for backends predating
# scale-agentex#278, which still require them (newer ones ignore them).
state_model = await self._agentex_client.states.update(
state_id=state_id,
state=state,
extra_body={"task_id": task_id, "agent_id": agent_id},
)
if span:
span.output = state_model.model_dump()
Expand Down
Empty file added tests/compat/__init__.py
Empty file.
34 changes: 34 additions & 0 deletions tests/compat/refresh_specs.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
"""Re-vendor the server OpenAPI specs at the SHAs pinned in manifest.json.
Usage: `python tests/compat/refresh_specs.py` (needs `gh` auth for the source repo)."""

from __future__ import annotations

import json
import subprocess
from pathlib import Path

_DIR = Path(__file__).parent / "server_specs"


def main() -> None:
manifest = json.loads((_DIR / "manifest.json").read_text())
repo, path = manifest["source_repo"], manifest["source_path"]
for entry in manifest["specs"]:
content = subprocess.run(
[
"gh",
"api",
f"repos/{repo}/contents/{path}?ref={entry['sha']}",
"-H",
"Accept: application/vnd.github.raw",
],
check=True,
capture_output=True,
text=True,
).stdout
(_DIR / entry["file"]).write_text(content)
print(f"wrote {entry['file']} from {repo}@{entry['sha'][:12]}")


if __name__ == "__main__":
main()
Loading
Loading