Tooluck logoTooluck
SKILL.md

langgraph-human-in-the-loop

Agent skill fromlangchain-ai/langchain-skills

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.

How to install langgraph-human-in-the-loop

install langgraph-human-in-the-loop
# install the langchain-skills pack with the skills CLI
npx skills add langchain-ai/langchain-skills

# or add only this skill to Claude Code: copy the folder

config/skills/langgraph-human-in-the-loop/

# into

~/.claude/skills/langgraph-human-in-the-loop/ (all projects)

.claude/skills/langgraph-human-in-the-loop/ (one project)

config/skills/langgraph-human-in-the-loop/SKILL.md

MITFull file
1<overview>
2LangGraph's human-in-the-loop patterns let you pause graph execution, surface data to users, and resume with their input:
3
4- **`interrupt(value)`** — pauses execution, surfaces a value to the caller
5- **`Command(resume=value)`** — resumes execution, providing the value back to `interrupt()`
6- **Checkpointer** — required to save state while paused
7- **Thread ID** — required to identify which paused execution to resume
8</overview>
9
10---
11
12## Requirements
13
14Three things are required for interrupts to work:
15
161. **Checkpointer** — compile with `checkpointer=InMemorySaver()` (dev) or `PostgresSaver` (prod)
172. **Thread ID** — pass `{"configurable": {"thread_id": "..."}}` to every `invoke`/`stream` call
183. **JSON-serializable payload** — the value passed to `interrupt()` must be JSON-serializable
19
20---
21
22## Basic Interrupt + Resume
23
24`interrupt(value)` pauses the graph. The value surfaces in the result under `__interrupt__`. `Command(resume=value)` resumes — the resume value becomes the return value of `interrupt()`.
25
26**Critical**: when the graph resumes, the node restarts from the **beginning** — all code before `interrupt()` re-runs.
27
28<ex-basic-interrupt-resume>
29<python>
30Pause execution for human review and resume with Command.
31
32```python
33from langgraph.types import interrupt, Command
34from langgraph.checkpoint.memory import InMemorySaver
35from langgraph.graph import StateGraph, START, END
36from typing_extensions import TypedDict
37
38class State(TypedDict):
39 approved: bool
40…

Excerpt shown under the repository's MIT license.

More skills in langchain-skills

Keep exploring

Similar skill repositories

thedotmack /

claude-mem
116k

Persistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More

CCCXGHGM+135 skills

Newsletter

Join the Community

Subscribe to our newsletter for the latest news and updates