langgraph-fundamentals

Orchestrate stateful agent workflows with directed StateGraph structures.

Updated Apr 12, 2026
One-click install
npx skills add https://github.com/dotlab-hq/torque --skill langgraph-fundamentals-dotlab-hq
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: langgraph-fundamentals
Source: https://github.com/dotlab-hq/torque/tree/main/.agents/skills/langgraph-fundamentals
Command: npx skills add https://github.com/dotlab-hq/torque --skill langgraph-fundamentals-dotlab-hq

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

LangGraph Fundamentals teaches how to design, implement, and run stateful agent workflows so you can manage complex multi-step orchestration, conditional routing, parallel work, and state merging without brittle code or lost data.

Core Features & Use Cases

  • StateGraph construction: Define state schemas, reducers, and compile-time validation to ensure safe state updates.
  • Nodes & Edges: Implement nodes that return partial updates, use static and conditional edges, and combine updates with routing via Command.
  • Parallelism & Fan-out: Use Send to spawn parallel workers and ReducedValue/reducers to safely accumulate results.
  • Streaming & Error Handling: Stream values, updates, messages, or custom progress; apply retry policies and ToolNode patterns for recoverable errors and human-in-the-loop interrupts.
  • Use Case: Build an LLM orchestrator that classifies input, fans out tasks to workers, aggregates results with reducers, and streams token-level progress to a chat UI.

Quick Start

Invoke the skill to design a StateGraph with explicit state schema, add nodes for each step, wire edges or conditional routing, compile the graph, and run it with graph.invoke to execute the workflow.

Frequently Asked Questions about langgraph-fundamentals

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build stateful agent workflows with LangGraph?

Build stateful agent workflows by defining a directed StateGraph with explicit state schemas and reducers, adding nodes for each step, wiring conditional edges, and compiling the graph for validation before executing multi-step LLM pipelines.

What is the best way to handle parallel worker fan-out in a LangGraph pipeline?

Handle parallel worker fan-out in a LangGraph pipeline by using the Send API to spawn multiple parallel workers and applying reducers to safely accumulate and merge their partial state updates without losing data.

How does conditional routing work in a LangGraph StateGraph?

Conditional routing in a LangGraph StateGraph works by using Command objects within nodes to combine partial state updates with dynamic edge routing, directing the execution flow to specific downstream nodes based on runtime logic.

Can I stream token-level progress and handle errors in LangGraph?

Stream token-level progress and handle errors in LangGraph by selecting specific streaming modes for values, updates, or custom progress, while applying retry policies and ToolNode patterns to manage recoverable tool errors.

How do I implement human-in-the-loop interruptions in a LangGraph workflow?

Implement human-in-the-loop interruptions in a LangGraph workflow by configuring the StateGraph with specific interrupt patterns and ToolNode structures that pause execution, allowing human review before resuming the agent pipeline.

Why do I need explicit state schemas and reducers in a LangGraph StateGraph?

Explicit state schemas and reducers in a LangGraph StateGraph are needed to ensure safe state updates, enable compile-time graph validation, and prevent data loss or race conditions during parallel work and state merging.