langgraph-fundamentals
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
- 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:
- Map out discrete steps — sketch a flowchart of your workflow. Each step becomes a node.
More from langchain-ai/langchain-skills
deep-agents-memory
INVOKE THIS SKILL when your Deep Agent needs memory, persistence, or filesystem access. Covers StateBackend (ephemeral), StoreBackend (persistent), FilesystemMiddleware, and CompositeBackend for routing.
7.7Klangchain-fundamentals
Create LangChain agents with create_agent, define tools, and use middleware for human-in-the-loop and error handling.
6.7Klangchain-rag
INVOKE THIS SKILL when building ANY retrieval-augmented generation (RAG) system. Covers document loaders, RecursiveCharacterTextSplitter, embeddings (OpenAI), and vector stores (Chroma, FAISS, Pinecone).
6.6Klanggraph-persistence
INVOKE THIS SKILL when your LangGraph needs to persist state, remember conversations, travel through history, or configure subgraph checkpointer scoping. Covers checkpointers, thread_id, time travel, Store, and subgraph persistence modes.
6.5Klanggraph-human-in-the-loop
INVOKE THIS SKILL when implementing human-in-the-loop patterns, pausing for approval, or handling errors in LangGraph. Covers interrupt(), Command(resume=...), approval/validation workflows, and the 4-tier error handling strategy.
6.4Kdeep-agents-orchestration
INVOKE THIS SKILL when using subagents, task planning, or human approval in Deep Agents. Covers SubAgentMiddleware, TodoList for planning, and HITL interrupts.
6.3K