Skip to content

Releases: scaleapi/scale-agentex-python

v0.10.5

05 May 20:03
09a816c

Choose a tag to compare

0.10.5 (2026-05-05)

Full Changelog: v0.10.4...v0.10.5

Features

  • api: api update (ffaecd5)
  • openai_agents: expose real usage, response_id, plumb previous_response_id, opt-in prompt_cache_key for stateful responses and prompt caching (#335) (ba5d64b)

Chores

  • internal: reformat pyproject.toml (ba06702)
  • internal: reformat pyproject.toml (3faf5d5)
  • internal: version bump (168cc44)
  • internal: version bump (5715828)

This pull request is managed by Stainless's GitHub App.

The semver version number is based on included commit messages. Alternatively, you can manually set the version number in the title of this pull request.

For a better experience, it is recommended to use either rebase-merge or squash-merge when merging this pull request.

🔗 Stainless website
📚 Read the docs
🙋 Reach out for help or questions

Greptile Summary

  • Introduces batched span dispatch: AsyncSpanQueue._process_items now groups spans per-processor and calls on_spans_start/on_spans_end in one call, letting processors like SGPAsyncTracingProcessor send a single upsert_batch HTTP request per drain cycle instead of one request per span.
  • Adds status and task_metadata filter parameters to tasks.list() (sync and async), and task_metadata to ParamsCreateTaskRequest in both RPC param types, matching an API spec update.
  • Three issues flagged in prior review threads remain open in sgp_tracing_processor.py: _spans populated before the HTTP call (stale state on failure), shutdown() calling into a None client when disabled=True, and a production assert in span_queue.py.

Confidence Score: 3/5

Three P1-level issues from prior review threads remain unaddressed; this PR adds a new mutual-recursion trap in the processor interface.

The prior review identified three concrete bugs (assert stripped with -O, _spans populated before upsert, shutdown() AttributeError when disabled). None were fixed in this PR. This PR additionally introduces the mutual-recursion interface design issue. Score is pulled below the P1 ceiling due to multiple unresolved P1 findings.

src/agentex/lib/core/tracing/processors/sgp_tracing_processor.py and src/agentex/lib/core/tracing/processors/tracing_processor_interface.py

Important Files Changed

Filename Overview
src/agentex/lib/core/tracing/processors/tracing_processor_interface.py Adds default batched on_spans_start/on_spans_end fan-out; the fan-out calls on_span_start, creating a mutual-recursion trap when subclasses delegate on_span_start back to on_spans_start without overriding on_spans_start.
src/agentex/lib/core/tracing/processors/sgp_tracing_processor.py Refactors single-span methods to delegate to new batch methods; _spans is populated before the disabled guard and before the HTTP call, leaving orphaned entries on failure or when disabled (flagged in prior review threads); shutdown() still lacks a disabled guard.
src/agentex/lib/core/tracing/span_queue.py _process_items refactored to group spans per-processor and call batched methods; assert guards the same-event-type precondition (assert is stripped with -O, flagged in prior review).
src/agentex/resources/tasks.py Adds status and task_metadata filter parameters to list() on both sync and async variants; straightforward generated-SDK change.
src/agentex/types/task_list_params.py Adds status and task_metadata TypedDict fields aligned with the new tasks.py parameters.
tests/lib/core/tracing/processors/test_sgp_tracing_processor.py Adds batch-path tests for on_spans_start/on_spans_end verifying single upsert_batch call and correct span counts.

Sequence Diagram

sequenceDiagram
    participant Caller
    participant AsyncSpanQueue
    participant SGPAsyncTracingProcessor

    Caller->>AsyncSpanQueue: enqueue(START, span, processors)
    AsyncSpanQueue->>AsyncSpanQueue: _drain_loop: collect batch, split START/END
    AsyncSpanQueue->>SGPAsyncTracingProcessor: on_spans_start([span1, span2, ...])
    SGPAsyncTracingProcessor->>SGPAsyncTracingProcessor: build sgp_spans, populate _spans
    SGPAsyncTracingProcessor->>SGPAsyncTracingProcessor: upsert_batch(items=[...])

    Caller->>AsyncSpanQueue: enqueue(END, span, processors)
    AsyncSpanQueue->>SGPAsyncTracingProcessor: on_spans_end([span1, span2, ...])
    SGPAsyncTracingProcessor->>SGPAsyncTracingProcessor: pop from _spans, update fields
    SGPAsyncTracingProcessor->>SGPAsyncTracingProcessor: upsert_batch(items=[...])

Fix All in Cursor Fix All in Claude Code <a href="https://chatgpt.com/codex/deeplink?prompt=IMPORTANT%3A%20Work%20in%20the%20repository%20%22scaleapi%2Fscale-agentex-python%22%20on%20the%20existing%20branch%20%22release-please--branches--main--changes--next%22.%20Checkout%20that%20branch%20%E2%80%94%20do%20NOT%20create%20a%20new%20branch%20or%20open%20a%20new%20PR.%20Push%20your%20changes%20to%20%22release-please--branches--main-...

Read more

v0.10.4

04 May 16:25
ed6fd5e

Choose a tag to compare

0.10.4 (2026-05-04)

Full Changelog: v0.10.3...v0.10.4

Features

  • add service account id option for registering agentex agents (8365771)

v0.10.3

30 Apr 21:24
f17ad00

Choose a tag to compare

0.10.3 (2026-04-30)

Full Changelog: v0.10.2...v0.10.3

Features

Bug Fixes

  • adk: Always inject headers on execute activity (#337) (9d80e0b)
  • allow litellm security patch (#336) (c980948)
  • tests: repair test_streaming_model so all 28 tests run and pass (#334) (7e5e69c)
  • use correct field name format for multipart file arrays (bd6d362)

Performance Improvements

  • streaming: coalesce per-token publishes to Redis (50ms / 128-char window) (#333) (e6f11c4)

Chores

  • internal: more robust bootstrap script (f004301)

This pull request is managed by Stainless's GitHub App.

The semver version number is based on included commit messages. Alternatively, you can manually set the version number in the title of this pull request.

For a better experience, it is recommended to use either rebase-merge or squash-merge when merging this pull request.

🔗 Stainless website
📚 Read the docs
🙋 Reach out for help or questions

Greptile Summary

This release bundles several independent fixes and one performance feature: a CoalescingBuffer that batches per-token Redis publishes into 50 ms / 128-char windows, three execute_activity_method → execute_activity corrections so headers are always injected, a BaseHTTPMiddleware → pure ASGI swap that fixes streaming response buffering, and an AGENTEX_CUSTOM_HEADERS env-var feature.

  • The expanded header-injection scope in context_interceptor.py now fires logger.warning for every non-agentex activity that lacks _task_id, which will flood logs in multi-activity workflows.
  • send_message (sync + async) silently discards JSON-RPC error payloads when the server returns an error envelope, returning an empty result list instead.

Confidence Score: 4/5

Safe to merge with minor follow-up; no data loss or critical runtime failures introduced.

Both findings are P2: the warning log noise in the interceptor is annoying but not functionally breaking, and the silent error discard in send_message was a pre-existing gap now made slightly more likely to hit. All P0/P1 bugs (execute_activity fix, BaseHTTPMiddleware streaming fix, multipart field naming) are addressed with tests.

src/agentex/resources/agents.py (silent error swallowing in send_message) and src/agentex/lib/core/temporal/plugins/openai_agents/interceptors/context_interceptor.py (warning log level).

Important Files Changed

Filename Overview
src/agentex/lib/core/services/adk/streaming.py Major addition: CoalescingBuffer (50ms/128-char windowed batching), StreamingMode literal, and delta merge helpers; StreamingTaskMessageContext updated to dispatch through the new buffer.
src/agentex/resources/agents.py send_message (sync + async) refactored to consume a streaming response and reconstruct the final result; JSON-RPC error chunks are silently discarded with an empty task_messages list.
src/agentex/lib/core/temporal/plugins/openai_agents/interceptors/context_interceptor.py Header injection scope widened from model-only activities to all activities; logger.warning fires for every non-agentex workflow activity that lacks _task_id/_trace_id/_parent_span_id.
src/agentex/lib/sdk/fastacp/base/base_acp_server.py RequestIDMiddleware replaced from BaseHTTPMiddleware (which buffers streaming responses) to a pure ASGI middleware; fixes streaming response truncation.
src/agentex/_utils/_utils.py extract_files now accepts an array_format parameter and delegates suffix generation to _array_suffix; fixes bracket/indices/repeat/comma naming for multipart file arrays.
src/agentex/_client.py Added AGENTEX_CUSTOM_HEADERS env var support (newline-delimited key:value pairs) in both sync and async clients; env headers take precedence over default_headers argument.
src/agentex/lib/core/temporal/plugins/openai_agents/hooks/hooks.py Switched execute_activity_method to execute_activity for stream_lifecycle_content calls; ensures header injection by the context interceptor.
pyproject.toml Bumped httpx (0.27 → 0.28), litellm minimum (1.83.0 → 1.83.7 for security patch), pinned starlette>=0.49.1 and tornado>=6.5.5 explicitly, and relaxed fastapi upper bound.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[stream_update called] --> B{streaming_mode?}
    B -->|off| C[Feed accumulator only\nno publish]
    B -->|per_token| D[Publish immediately\nvia stream_update]
    B -->|coalesced| E[CoalescingBuffer.add]

    E --> F{first delta OR\nbuf_chars >= 128?}
    F -->|yes| G[Signal flush_event]
    F -->|no| H[Wait for ticker]

    G --> I[_run background task\nawakens immediately]
    H --> J[50ms timeout\nexpires]
    I --> K[_drain_locked:\nmerge consecutive same-channel deltas]
    J --> K
    K --> L[Publish merged batch\nvia on_flush]

    M[context.close] --> N[buffer.close:\ncancel ticker\ndrain remainder]
    N --> L
    L --> O[stream_update:\nStreamTaskMessageDone]

Fix All in Cursor <a href="https://app.greptile.com/ide/claude-code?prompt=Fix%20the%20following%202%20code%20review%20issues.%20Work%20through%20them%20one%20at%20a%20time%2C%20proposing%20concise%20fixes.%0A%0A---%0A%0A%23%23%23%20Issue%201%20of%202%0Asrc%2Fagentex%2Flib%2Fcore%2Ftemporal%2Fplugins%2Fopenai_agents%2Finterceptors%2Fcontext_interceptor.py%3A780-781%0A**Warning%20log%20will%20flood%20for%20every%20non-agentex%20activity**%0A%0AThe%20previous%20code%20only%20ran%20this%20block%20for%20model-specific%20activities.%20Now%20it%20runs%20for%20every%20activity%20in%20every...

Read more

v0.10.2

21 Apr 15:06

Choose a tag to compare

0.10.2 (2026-04-21)

Full Changelog: v0.10.1...v0.10.2

Features

Bug Fixes

Performance Improvements

  • client: optimize file structure copying in multipart requests (87fe899)

v0.10.1

17 Apr 15:12

Choose a tag to compare

0.10.1 (2026-04-17)

Full Changelog: v0.10.0...v0.10.1

v0.10.0

14 Apr 16:56
ced40bb

Choose a tag to compare

0.10.0 (2026-04-14)

Full Changelog: v0.9.10...v0.10.0

Features

  • add AgentCard for self-describing agent capabilities (#296) (6509be1)
  • api: api update (8abce2b)

Bug Fixes

  • ensure file data are only sent as 1 parameter (48fae27)
  • Temporal Union deserialization causing tool_response messages to be lost (79ef4dd)
  • temporal: allowing-ACP-temporal-telemetry (9b44eb0)

v0.9.10

07 Apr 21:27

Choose a tag to compare

0.9.10 (2026-04-07)

Full Changelog: v0.9.9...v0.9.10

Features

  • adk: Revamp run_claude_agent_activity to use more streaming (#309) (25069d3)

v0.9.9

07 Apr 18:47

Choose a tag to compare

0.9.9 (2026-04-07)

Full Changelog: v0.9.8...v0.9.9

Bug Fixes

  • client: preserve hardcoded query params when merging with user params (4a97659)

v0.9.8

06 Apr 18:55

Choose a tag to compare

0.9.8 (2026-04-06)

Full Changelog: v0.9.7...v0.9.8

Features

  • adk: allow all ClaudeAgentOptions in run_claude_agent_activity (e41aec7)
  • pass AGENTEX_DEPLOYMENT_ID in registration metadata (#305) (31af8c6)
  • tracing: Add background queue for async span processing (#303) (3a60add)

Bug Fixes

  • tracing: Fix memory leak in SGP tracing processors (#302) (f43dac4)

v0.9.7

31 Mar 12:43

Choose a tag to compare

0.9.7 (2026-03-30)

Full Changelog: v0.9.6...v0.9.7

Features

  • lib: Add task updates to adk (ff12ae1)