Add LangGraph workflow streams sample#315
Open
brianstrauch wants to merge 2 commits into
Open
Conversation
Demonstrate the LangGraph plugin's Workflow Streams support: a node emits live tokens via get_stream_writer() (routed by the plugin's streaming_topic), and the workflow publishes coarse astream progress to its own topic. A single client subscribes to all topics and demultiplexes on item.topic. Bumps the langgraph group to temporalio>=1.28.0 (where workflow streams ship) and drops the now-obsolete langsmith<0.7.34 constraint, which was specific to the 1.27.2 langsmith patch. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
What
Adds a Graph-API sample demonstrating the LangGraph plugin's recently-added Workflow Streams support, under
langgraph_plugin/graph_api/streaming/.It combines both streaming patterns in one workflow:
write_storynode emits live tokens via LangGraph'sget_stream_writer(), routed onto thetokenstopic by the plugin'sstreaming_topic.astreampublish — the workflow drives the graph withapp.astream(...)and publishes each node-completion chunk onto aprogresstopic it owns viaWorkflowStream.topic().publish().A single client subscribes to all topics with
WorkflowStreamClientand demultiplexes onitem.topic. The workflow waits on anack_streamsignal before returning so the stream survives until the client finishes consuming it.Dependency changes
langgraphgroup totemporalio>=1.28.0(where workflow streams ship).langsmith<0.7.34uv constraint — 1.28.0 requireslangsmith>=0.7.34, and the pin was specific to the 1.27.2 langsmith patch. Existing langgraph tests still pass on the resulting langsmith 0.8.9.Also adds
langgraph_plugin/code owners.Testing
tests/langgraph_plugin/streaming_test.py; the fulltests/langgraph_plugin/suite passes (12 passed) on temporalio 1.28.0 / langsmith 0.8.9.ruffformat/import checks andmypyare clean for the new files.🤖 Generated with Claude Code