Conversation
One agent loop, read, decide, publish and an activity, that runs unchanged on every provider, so a provider branch only swaps provider_setup.
run_demo.py writes its results next to the script, and one run's output was committed with the sample. Ignored so a later run can't add it again.
This was referenced Oct 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds
streams_demo, a small agent loop that runs unchanged on any stream provider.What changed?
streams_demo/agent_loop.pyholds the workflow and activity. The workflow reads inputs, decides, publishes, and runs an activity that appends receipts to the workflow's stream.streams_demo/run_demo.pydrives three cases: the loop with the smallest cache the provider supports, a producer whose second attempt supersedes its first, and an outside reader following what the workflow published.streams_demo/provider_setup.pyis the one file that names a provider. Here it'sMemoryStreams.pyproject.tomladds the directory to pyright'sinclude.Part of AI-198 (epic AI-37).
Why?
It shows the interface's main promise in a form you can run: the same workflow, activity and client code on any store. Each provider PR only has to change
provider_setup.pyto show it works the same way. It's a sample, not library code, so it gets its own PR.How did you test it?
Link to a test plan if any -
poe lintis clean, pyright included. I ranpython streams_demo/run_demo.pyagainst a local Temporal server. All three cases finished, and the activity's receipts showed up on the workflow's stream.