langgraph-fundamentals

Design and execute stateful LangGraph workflows with StateGraph, nodes, edges, and commands.

1|Updated Apr 25, 2026
One-click install
npx skills add https://github.com/collat-labs/collat --skill langgraph-fundamentals-collat-labs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: langgraph-fundamentals
Source: https://github.com/collat-labs/collat/tree/main/.claude/skills/langgraph-fundamentals%20copy
Command: npx skills add https://github.com/collat-labs/collat --skill langgraph-fundamentals-collat-labs

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill prevents broken LangGraph graphs by teaching the correct mental model for state, nodes, edges, reducers, and execution patterns so your workflows compile and run as intended.

Core Features & Use Cases

  • StateGraph fundamentals: Understand how to structure a directed graph of agent/workflow steps, including START/END and the required compile step.
  • Correct state updates: Learn how to return partial update dicts from nodes without mutating and returning full state objects.
  • Reducer-backed state: Use reducers for lists/accumulators so parallel execution (Send) aggregates results instead of overwriting.

Use case: Implement a multi-step LangGraph workflow that classifies a query, routes to the right branch, and streams progress while safely aggregating node outputs for later synthesis.

Quick Start

Use the langgraph-fundamentals skill to design a StateGraph with typed state, reducers for list accumulation, and compiled execution before you invoke it for routing and streaming.

Frequently Asked Questions about langgraph-fundamentals

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

FAQPage Schema
How do I build a stateful agent workflow with LangGraph?

To build a stateful LangGraph workflow, define a typed state schema, construct a StateGraph with nodes and edges, and compile the graph before invoking it to ensure your orchestrated LLM workflow executes reliably.

Why does my LangGraph state get overwritten during parallel execution?

LangGraph state overwrites during parallel execution when you lack proper reducers. Defining reducer-backed state schemas for lists and accumulators ensures parallel Send operations aggregate results correctly instead of overwriting previous node outputs.

How do I update state in a LangGraph node without causing compilation errors?

To update state in a LangGraph node, return partial update dictionaries from your node functions. Avoid mutating and returning full state objects directly, as this prevents compilation errors and maintains correct graph execution.

When do I need to use Command and Send semantics in LangGraph?

You need to use Command and Send semantics in LangGraph when implementing branching, fan-out aggregation, and dynamic routing. They allow you to direct graph execution without conflicting static edges, enabling complex multi-step workflows.

Can I stream intermediate state and message tokens in a LangGraph workflow?

Yes, you can stream intermediate state and message tokens in a LangGraph workflow. The framework supports streaming over token outputs and progress updates while safely aggregating node outputs for later synthesis.

What is the correct way to structure a multi-step routing graph in LangGraph?

The correct way to structure a multi-step routing graph in LangGraph is to define a StateGraph with typed state, use reducers for list accumulation, and apply Command or goto semantics to route queries to the right branch without static edge conflicts.