langgraph-streaming
从 LangGraph 流式传输实时更新:流式模式(values、updates、messages、custom、debug)用于响应式 UX
npx skills add majiayu000/claude-skill-registry --skill langgraph-streaming --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# langgraph-streaming (JavaScript/TypeScript) --- name: langgraph-streaming description: 从 LangGraph 流式传输实时更新 - 流式模式(values、updates、messages、custom、debug)用于响应式 UX --- ## 概述 LangGraph 的流式系统在图执行期间输出实时更新,对于响应式 LLM 应用程序至关重要。可以在生成时流式传输图状态、LLM 令牌或自定义数据。 ## 决策表:流式模式 | 模式 | 流式传输的内容 | 使用场景 | |------|----------------|----------| | `values` | 每步后的完整状态 | 监控完整状态变化 | | `updates` | 每步后的状态增量 | 跟踪增量更新 | | `messages` | LLM 令牌 + 元数据 | 聊天 UI、令牌流式传输 | | `custom` | 用户定义的数据 | 进度指示器、日志 | | `debug` | 所有执行详情 | 调试、详细跟踪 | ## 代码示例 ### 流式传输状态值 ```typescript import { StateGraph, START, END } from "@langchain/langgraph"; const process = async (state) => ({ count: state.count + 1 }); const graph = new StateGraph(State) .addNode("process", process) .addEdge(START, "process") .addEdge("process", END) .compile(); // 每步后流式传输完整状态 for await (const chunk of await graph.stream( { count: 0 }, { streamMode: "values" } )) { console.log(chunk); // { count: 0 }, 然后 { count: 1 } } ``` ### 流式传输状态更新(增量) ```typescript // 只流式传输变化 for await (const chunk of await graph.stream( { count: 0 }, { streamMode: "updates" } )) { console.log(chunk); // { process: { count: 1 } } } ``` ### 流式传输 LLM 令牌 ```typescript import { ChatOpenAI } from "@
- 概述
- 决策表:流式模式
- 代码示例
- 流式传输状态值
- 流式传输状态更新(增量)
- 流式传输 LLM 令牌
- 流式传输自定义数据
- 多种流式模式
- 带子图的流式传输
- 带中断的流式传输
- 边界
- 您能够配置的
- 您不能配置的
- 注意事项
What does the langgraph-streaming skill do?
从 LangGraph 流式传输实时更新:流式模式(values、updates、messages、custom、debug)用于响应式 UX
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill langgraph-streaming --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
