Install any skill in seconds. Free to start, no credit card required.
Get Started Free →jeremylongshore/langchain-langgraph-streaming
Pick the correct LangGraph 1.0 stream_mode ("messages" vs "updates" vs "values"), wire it into SSE or WebSocket without proxy-buffering gotchas, and filter astream_events(v2) server-side before forwarding to the browser.
Passed 22 of 22 test cases with the skill, and 19 of 22 without it.
and 1 more in the full report
3 fixed19 passed either way0 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 3 test cases the skill fixed. Same model, same prompt, with and without the skill.
I need a FastAPI WebSocket endpoint implementation for a LangGraph assistant where users can send messages back and forth interactively. The endpoint must maintain persistent thread memory so if a user loses connection and reconnects with their session identifier, their conversation state is preserved across turns without memory loss or blocking the event loop.
| Checked | Without skill | With skill |
|---|---|---|
| Configures stream_mode to messages when executing graph streaming | Passed | Passed |
| Extracts text from message chunks using chunk.text or content string type checking | Missed | Passed |
| Executes graph streaming via async astream to prevent blocking the event loop | Passed | Passed |
The instructions your model reads when the skill loads.
An engineer ships stream_mode="values" to a token-level chat UI because it
"seemed the most complete." Every single token causes the full graph state —
message history, scratchpad, plan — to be re-sent and re-rendered. At ~60
tokens/sec the browser overdraws, the React reconciler can't keep up, the tab
freezes, and users blame the model. The correct answer was stream_mode="messages",
which emits an AIMessageChunk delta per token (typically 5-50 bytes) — one
token's worth of DOM work. This is pain-catalog entry P19 and it is the #1
LangGraph integration mistake in the 1.0 generation.
Then the same UI ships to Cloud Run and hangs forever. No error. No logs. The
server is emitting tokens; they just never reach the browser. Default proxy
buffering (Nginx, Cloud Run's HTTP/1.1 path, Cloudflare Free) holds the last
chunk waiting for more bytes. This is P46 — SSE streams from LangGraph
drop the final end event over proxies that buffer — and the fix is three
headers: X-Accel-Buffering: no, Cache-Control: no-cache, Connection: keep-alive.
And then the debug view starts crashing browser tabs on long runs. The engineer
forwarded astream_events(version="v2") raw to the client because "it has more
detail" — but v2 emits thousands of events per invocation (per-token, per-node,
per-runnable lifecycle), and a 60-second agent run easily hits 3,000 events.
Browsers freeze on the JSON deserialize queue. This is P47 — filter
server-side, forward only on_chat_model_stream tokens (and optionally
on_tool_start / on_tool_end).
This skill ships the decision matrix, a production-grade FastAPI SSE endpoint
with the anti-buffering headers and a 15-second heartbeat, a server-side v2
event filter that drops ~90% of noise, and a WebSocket variant with
reconnect-by-thread_id that resumes from the LangGraph checkpointer. Pin:
langgraph 1.0.x, langchain-core 1.0.x. Pain-catalog anchors: P19, P46,
P47, P48, P67, plus P16 for the thread_id rule and P22 for checkpointer
persistence.
langgraph >= 1.0, < 2.0, langchain-core >= 1.0, < 2.0test cases passed, vs 19 / 22 without
More skills from the same source and nearby in the registry, with their headline benchmark lift.