StateGraph workflows.
Architecture
LangGraph graphs are composed of named nodes connected by edges. Each node executes a step (classify, research, analyze, synthesize) and writes output to a specific state key. On the frontend,useStream provides reactive access to node outputs, streaming tokens, and graph metadata so you can map each node to a UI card.
useStream exposes stream.values for completed node outputs and getMessagesMetadata for identifying which node produced each streaming token.
Patterns
Related patterns
The LangChain frontend patterns—markdown messages, tool calling, optimistic updates, and more—work with any LangGraph graph. TheuseStream hook provides the same core API whether you use createAgent, createDeepAgent, or a custom StateGraph.
Connect these docs to Claude, VSCode, and more via MCP for real-time answers.

