langgraph-fundamentals

Originally fromjackjin1997/clawforge
Installation
Summary

Directed graph framework for building stateful, multi-step agent workflows with fine-grained control.

  • StateGraph with typed state schemas, reducers for accumulating lists/values, and nodes that return partial state updates
  • Static edges for fixed flow, conditional edges for branching, and Command for combining state updates with dynamic routing
  • Send API for fan-out parallelism to worker nodes with result aggregation via reducers
  • Invoke for single execution and stream modes (values, updates, messages, custom) for real-time monitoring and token streaming
  • RetryPolicy for transient errors and ToolNode with error handling for LLM-recoverable failures; human-in-the-loop via interrupt for user input
SKILL.md
  • StateGraph: Main class for building stateful graphs
  • Nodes: Functions that perform work and update state
  • Edges: Define execution order (static or conditional)
  • START/END: Special nodes marking entry and exit points
  • State with Reducers: Control how state updates are merged

Graphs must be compile()d before execution.

Designing a LangGraph application

Follow these 5 steps when building a new graph:

  1. Map out discrete steps — sketch a flowchart of your workflow. Each step becomes a node.
Related skills
Installs
7.1K
GitHub Stars
678
First Seen
Mar 3, 2026