Title: Add openai_agents streaming sample by jssmith · Pull Request #301 · temporalio/samples-python · GitHub
Open Graph Title: Add openai_agents streaming sample by jssmith · Pull Request #301 · temporalio/samples-python
X Title: Add openai_agents streaming sample by jssmith · Pull Request #301 · temporalio/samples-python
Description: Summary Adds an openai_agents/streaming/ sample demonstrating buffered token streaming for OpenAI Agents-backed workflows via temporalio.contrib.workflow_streams (experimental, contrib/pubsub branch of sdk-python). The OpenAI Agents plugin's ModelActivityParameters carries a streaming_event_topic; the model activity publishes raw TResponseStreamEvents to that topic, batched over streaming_event_batch_interval (default 100ms). The workflow emits a sentinel on a done topic when Runner.run_streamed finishes; subscribers iterate (events, done) and break on the sentinel. race_with_workflow handles the case where the workflow fails before publishing the sentinel. Two scenarios: stream_text — text-delta events from a simple haiku agent stream_items — agent-update / handoff / tool-call events across a multi-agent workflow with a joke-rating activity This is the second half of #299. Independent of the workflow_streams basics (separate PR), though both target the same sdk-python contrib branch. Test plan Build sdk-python from contrib/pubsub and install into the samples uv environment OPENAI_API_KEY=... uv run openai_agents/streaming/run_worker.py uv run openai_agents/streaming/run_stream_text_workflow.py — verify text deltas print as small bursts uv run openai_agents/streaming/run_stream_items_workflow.py — verify agent-update / tool-call / message-output events render in order
Open Graph Description: Summary Adds an openai_agents/streaming/ sample demonstrating buffered token streaming for OpenAI Agents-backed workflows via temporalio.contrib.workflow_streams (experimental, contrib/pubsub branc...
X Description: Summary Adds an openai_agents/streaming/ sample demonstrating buffered token streaming for OpenAI Agents-backed workflows via temporalio.contrib.workflow_streams (experimental, contrib/pubsub branc...
Opengraph URL: https://github.com/temporalio/samples-python/pull/301
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:0e1ed094-14f3-d0f0-6e3e-fafc926879ec |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | D71A:2A9EAA:14818E:1BF96C:6A4D2879 |
| html-safe-nonce | d5c72355a8f643ce46b6125374e4377e2fe96235336f4ad0ef43006e8546c842 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENzFBOjJBOUVBQToxNDgxOEU6MUJGOTZDOjZBNEQyODc5IiwidmlzaXRvcl9pZCI6IjY0NDA0ODIwODk4MjUyODIxNjkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 1d68e37b76551fe107148125856d156878fa3be5104e11914a370bc646f9fbd6 |
| hovercard-subject-tag | pull_request:3606237576 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/temporalio/samples-python/pull/301/files |
| twitter:image | https://avatars.githubusercontent.com/u/782994?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/782994?s=400&v=4 |
| og:image:alt | Summary Adds an openai_agents/streaming/ sample demonstrating buffered token streaming for OpenAI Agents-backed workflows via temporalio.contrib.workflow_streams (experimental, contrib/pubsub branc... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 92571a8944142227b7e19cd10918b1ddd06e5066c1ad5bc7e4769cf6140a87e6 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/temporalio/samples-python git https://github.com/temporalio/samples-python.git |
| octolytics-dimension-user_id | 56493103 |
| octolytics-dimension-user_login | temporalio |
| octolytics-dimension-repository_id | 454557884 |
| octolytics-dimension-repository_nwo | temporalio/samples-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 454557884 |
| octolytics-dimension-repository_network_root_nwo | temporalio/samples-python |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 93f17a978ee60bc4668e1d7b90e6bd2d622261fd |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width