langgraph-fundamentals

Compile LangGraph StateGraphs with correct reducers, routing, and execution semantics.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Building LangGraph workflows can break subtly when state merging, routing, and execution semantics are misunderstood, causing lost updates, incorrect graph flows, or graphs that fail to run as expected.

Core Features & Use Cases

  • StateGraph fundamentals: Learn how to define state, nodes, edges, and the required START/END structure, then compile before execution.
  • Correct state update semantics: Use reducers to append or aggregate (preventing list overwrite) and return partial update dicts instead of mutating full state.
  • Execution control patterns: Use conditional edges, Command (update + goto), and Send for fan-out parallel workers with proper result accumulation.
  • Operational excellence: Understand invoke vs stream modes and choose appropriate error-handling strategies for transient, tool, user-fixable, and unexpected failures.
  • Use Case: Implement a multi-step agent that classifies user intent, routes to specialized nodes, runs parallel sub-tasks, streams intermediate progress to a UI, and safely handles failures.

Quick Start

Invoke this skill when writing your LangGraph graph by compiling a StateGraph, defining nodes with correct partial updates, wiring edges/conditional routing, and using reducers for any list fields that should accumulate across steps.

Frequently Asked Questions about langgraph-fundamentals

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

FAQPage Schema
Why does my LangGraph state update overwrite previous data instead of appending?

LangGraph state updates overwrite previous data when reducers are not defined for list fields, causing default replacement behavior instead of accumulation. Defining custom reducers ensures state merges correctly across multiple nodes and parallel execution steps.

How do I use Send for parallel fan-out execution in a StateGraph?

Use the Send object within a conditional edge to dispatch multiple state instances to parallel worker nodes, enabling fan-out execution in a compiled StateGraph. Ensure your state includes reducers to properly accumulate results from these concurrent workers.

What is the difference between using conditional edges and Command for routing in LangGraph?

Conditional edges evaluate state to determine the next node, while Command objects allow simultaneous state updates and goto routing within a single node return. Command provides explicit control over both data mutation and graph flow progression.

Should I return a partial update dict or mutate the full state in LangGraph nodes?

You should return a partial update dict from LangGraph nodes rather than mutating the full state object directly. Partial updates trigger the defined reducers to safely merge new values with existing state, preventing lost updates and unexpected graph behavior.

How do I stream intermediate progress from a LangGraph agent workflow to a UI?

Stream intermediate progress from LangGraph agent workflows by using the stream method instead of invoke during graph execution. This outputs state changes and node outputs in real-time, allowing you to display step-by-step updates to a user interface.

How do I handle tool failures and unexpected errors during LangGraph execution?

Handle LangGraph execution failures by implementing explicit error-handling strategies that distinguish between transient, tool, user-fixable, and unexpected errors. Design dedicated fallback nodes or conditional routing paths to gracefully manage these common failure modes.