Skip to content

release: 0.11.7#382

Merged
smoreinis merged 14 commits into
mainfrom
release-please--branches--main--changes--next
Jun 1, 2026
Merged

release: 0.11.7#382
smoreinis merged 14 commits into
mainfrom
release-please--branches--main--changes--next

Conversation

@stainless-app
Copy link
Copy Markdown
Contributor

@stainless-app stainless-app Bot commented May 30, 2026

Automated Release PR

0.11.7 (2026-06-01)

Full Changelog: v0.11.6...v0.11.7

Features

  • examples: OpenAI Agents SDK local-sandbox tutorials (sync + async + temporal) (#377) (a66d239)

Performance Improvements

  • tracing: bounded-concurrency span export (#374) (7b32a0d)

Chores


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 (0.11.7) adds three new OpenAI Agents SDK local-sandbox tutorial examples (sync, async-base, and Temporal variants) plus a matching CLI template (sync-openai-agents-local-sandbox), and replaces the serial span-export loop in AsyncSpanQueue with a bounded-concurrency dispatch model that lets up to _concurrency (default 3) HTTP batch requests be in-flight at once while still preserving the per-span START-before-END ordering guarantee.

  • Tracing (span_queue.py): Drain loop now dispatches each START/END batch as its own asyncio.Task; an asyncio.Semaphore bounds actual in-flight HTTP calls; END tasks snapshot in-flight START tasks as a barrier so ordering is preserved; shutdown waits for queue.join() then cleans up straggler tasks.
  • Tutorials + CLI template: Three new openai_agents_local_sandbox examples demonstrate the UnixLocalSandboxClient (shell commands on the host) in sync, async-base, and Temporal modes; a corresponding sync-openai-agents-local-sandbox Jinja2 template is wired into the agentex init command.

Confidence Score: 5/5

Safe to merge — the span queue concurrency change is well-reasoned, correctly bounded, and fully covered by new tests; the tutorial additions are self-contained examples.

The bounded-concurrency span export is the most load-bearing change: the backpressure loop, semaphore, and END barrier all compose correctly, and the new test suite validates concurrency cap, serial behavior, throughput improvement, and per-span ordering. The tutorials and CLI template are additive and isolated. The only gap is the missing sgp_base_url in the Temporal tutorial, which is a minor example inconsistency, not a runtime failure.

workflow.py in the Temporal tutorial (sgp_base_url omission), and the self-noted re-enqueue ordering caveat in span_queue.py if retries are ever enabled by default.

Important Files Changed

Filename Overview
src/agentex/lib/core/tracing/span_queue.py Core change: replaces serial export with bounded-concurrency dispatch; logic is sound but the re-enqueue note acknowledges a START-before-END breakage when retries are enabled — not an issue at max_retries=1 (default).
tests/lib/core/tracing/test_span_queue.py New TestAsyncSpanQueueConcurrency suite covers concurrency cap, serialization at concurrency=1, speed improvement, and per-span END-waits-for-START ordering — comprehensive coverage of the new behavior.
src/agentex/lib/cli/commands/init.py Adds SYNC_OPENAI_AGENTS_LOCAL_SANDBOX to TemplateType enum and wires it into project_files and the interactive prompt; straightforward and consistent with existing template entries.
examples/tutorials/10_async/10_temporal/120_openai_agents_local_sandbox/project/workflow.py Temporal tutorial workflow is well-structured; SGPTracingProcessorConfig call omits sgp_base_url (minor inconsistency with other tutorials), and the module-level tracing config runs unconditionally even when credentials are absent.
examples/tutorials/10_async/00_base/120_openai_agents_local_sandbox/project/acp.py Async-base ACP handler with multi-turn state via adk.state; correct pattern for loading/saving conversation history, clean tracing integration.
examples/tutorials/00_sync/050_openai_agents_local_sandbox/project/acp.py Sync ACP handler; guards tracing config behind SGP_API_KEY check (consistent with template), clean implementation.

Sequence Diagram

sequenceDiagram
    participant DL as _drain_loop
    participant D as _dispatch()
    participant RS as _run_send (task)
    participant S as asyncio.Semaphore
    participant P as Processor (HTTP)

    loop Drain items from queue
        DL->>DL: "backpressure check (len(inflight) >= concurrency?)"
        DL->>DL: collect batch (linger window)
        DL->>D: dispatch(starts, START)
        D->>RS: "create_task(_run_send(starts, barrier=[]))"
        D->>D: inflight.add(task), inflight_starts.add(task)
        DL->>DL: re-check backpressure for ENDs
        DL->>D: dispatch(ends, END)
        D->>RS: "create_task(_run_send(ends, barrier=snapshot(inflight_starts)))"
        D->>D: inflight.add(task)
    end

    par START send
        RS->>S: acquire semaphore slot
        S-->>RS: acquired
        RS->>P: on_spans_start(spans)
        P-->>RS: HTTP response
        RS->>S: release slot
        RS->>RS: queue.task_done() [finally]
        RS->>D: done_callback - inflight.discard, inflight_starts.discard
    and END send (waits for START barrier)
        RS->>RS: "await gather(*barrier, return_exceptions=True)"
        RS->>S: acquire semaphore slot
        S-->>RS: acquired
        RS->>P: on_spans_end(spans)
        P-->>RS: HTTP response
        RS->>S: release slot
        RS->>RS: queue.task_done() [finally]
        RS->>D: done_callback - inflight.discard
    end
Loading

Fix All in Cursor Fix All in Claude Code Fix All in Codex

Prompt To Fix All With AI
Fix the following 1 code review issue. Work through them one at a time, proposing concise fixes.

---

### Issue 1 of 1
examples/tutorials/10_async/10_temporal/120_openai_agents_local_sandbox/project/workflow.py:65-70
The other two tutorials (sync and async-base) both read `SGP_CLIENT_BASE_URL` from the environment and pass it as `sgp_base_url`. Omitting it here means the Temporal tutorial always uses the default production URL and cannot be pointed at a custom SGP endpoint via env var, which breaks parity with the other examples.

```suggestion
add_tracing_processor_config(
    SGPTracingProcessorConfig(
        sgp_api_key=os.environ.get("SGP_API_KEY", ""),
        sgp_account_id=os.environ.get("SGP_ACCOUNT_ID", ""),
        sgp_base_url=os.environ.get("SGP_CLIENT_BASE_URL", ""),
    )
)
```

Reviews (3): Last reviewed commit: "release: 0.11.7" | Re-trigger Greptile

max-parke-scale and others added 9 commits May 26, 2026 17:48
)

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
Co-authored-by: Declan Brady <declan.brady@scale.com>
Co-authored-by: Michael Chou <michael.chou@scale.com>
…ts adapter (#375)

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…nc + temporal) (#377)

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@smoreinis smoreinis changed the title release: 0.12.0 release: 0.11.6 Jun 1, 2026
@stainless-app stainless-app Bot force-pushed the release-please--branches--main--changes--next branch from 1ca9d5c to 772a07a Compare June 1, 2026 16:50
@stainless-app stainless-app Bot changed the title release: 0.11.6 release: 0.12.0 Jun 1, 2026
@stainless-app stainless-app Bot force-pushed the release-please--branches--main--changes--next branch from 772a07a to d7d6ab7 Compare June 1, 2026 16:50
@smoreinis smoreinis changed the title release: 0.12.0 release: 0.11.6 Jun 1, 2026
@stainless-app stainless-app Bot force-pushed the release-please--branches--main--changes--next branch from d7d6ab7 to 2857504 Compare June 1, 2026 16:51
@stainless-app stainless-app Bot changed the title release: 0.11.6 release: 0.12.0 Jun 1, 2026
@stainless-app stainless-app Bot force-pushed the release-please--branches--main--changes--next branch 2 times, most recently from c16c25b to c7100c5 Compare June 1, 2026 16:51
@smoreinis smoreinis changed the title release: 0.12.0 release: 0.11.6 Jun 1, 2026
@stainless-app
Copy link
Copy Markdown
Contributor Author

stainless-app Bot commented Jun 1, 2026

Release version edited manually

The Pull Request version has been manually set to 0.11.6 and will be used for the release.

If you instead want to use the version number 0.12.0 generated from conventional commits, just remove the label autorelease: custom version from this Pull Request.

@stainless-app stainless-app Bot force-pushed the release-please--branches--main--changes--next branch from c7100c5 to 0e1cdd5 Compare June 1, 2026 16:53
@smoreinis smoreinis changed the title release: 0.11.6 release: 0.11.7 Jun 1, 2026
@stainless-app stainless-app Bot force-pushed the release-please--branches--main--changes--next branch from 0e1cdd5 to eeb68d9 Compare June 1, 2026 16:59
Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
Co-authored-by: Max Parke <max.parke@scale.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: Declan Brady <declan.brady@scale.com>
Co-authored-by: Michael Chou <michael.chou@scale.com>
Co-authored-by: Daniel Miller <daniel.miller@scale.com>
Co-authored-by: Matteo Librizzi <matteo.librizzi@scale.com>
@stainless-app stainless-app Bot force-pushed the release-please--branches--main--changes--next branch from eeb68d9 to 54e9890 Compare June 1, 2026 17:24
…into-next-2

# Conflicts:
#	src/agentex/lib/core/tracing/span_queue.py
#	tests/lib/core/tracing/test_span_queue.py
smoreinis and others added 2 commits June 1, 2026 10:32
chore: back-merge main into next (merge commit to clear release PR #382)
@stainless-app stainless-app Bot force-pushed the release-please--branches--main--changes--next branch from 54e9890 to ec2f02d Compare June 1, 2026 17:32
@smoreinis smoreinis enabled auto-merge (squash) June 1, 2026 17:34
@smoreinis smoreinis merged commit 845c8d4 into main Jun 1, 2026
47 checks passed
@smoreinis smoreinis deleted the release-please--branches--main--changes--next branch June 1, 2026 17:37
@stainless-app
Copy link
Copy Markdown
Contributor Author

stainless-app Bot commented Jun 1, 2026

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants