Skip to content

Python SDK 0.13.0

Latest

Choose a tag to compare

@arunreddy arunreddy released this 13 Sep 15:28
e55f726

Python SDK 0.13.0 includes the durable initial-history replay fix (AGNT5-1108), the merged response-wait behavior, and published SDK core 0.3.1 for graceful draining of accepted pull work during intentional shutdown, including Unix SIGTERM (AGNT5-1129).

Upgrade prerequisite

Deploy the AGNT5-1108 runtime compatibility fix before upgrading deployed Python workers. It accepts the session creation event emitted with durable completion. Publishing or installing this package does not deploy that runtime prerequisite.

Breaking changes and migration

  • Client.run() and AsyncClient.run() now return accepted 202 pending receipts directly instead of polling detached runs to completion. Check response.is_pending before consuming response.output. Synchronous callers can continue waiting with client.wait_for_result(response.run_id, timeout=...); async callers can use get_status() and get_result() under their own bounded polling policy.
  • Gateway response waiting defaults to 300 seconds. Set wait_timeout from zero to 86400 seconds; zero returns after acceptance. Accepted execution continues after waiting ends or the client disconnects.
  • Default HTTP operation timeouts allow at least wait_timeout + 10 seconds (310 seconds by default), or the client timeout if longer. Set per-call timeout explicitly when needed.
  • Event streams expose stream.wait_expired or stream.detached; chunk-only stream() raises RunError carrying the run ID when response waiting ends. Retain that run ID to retrieve status/results.
  • WorkflowProxy.run() reserves timeout and wait_timeout; WorkflowProxy.stream_events() additionally reserves wait_timeout. Pass payload fields with those names through the explicit input dictionary of client.run(..., component_type="workflow") or client.stream_events(...).

The history fix preserves the initial snapshot across replay for runs that record it after upgrade. It cannot reconstruct a missing snapshot for a run already in flight on an older SDK. Fresh runs continue to load the session's latest history.

Dependency and validation

The native extension builds against crates.io agnt5-sdk-core 0.3.1 using its published checksum. Local validation passed a fresh native build, 67 focused tests, and 891 unit tests (13 skipped), plus Ruff, Rust formatting, locked dependency resolution, and source-package inspection. The release workflow builds Linux x86_64 and ARM64 wheels, a macOS ARM64 wheel, and a source distribution.