General
581 installs
langgraph-human-in-the-loop
by langchain-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=...),…
Skill content
- interrupt(value) - pauses execution, surfaces a value to the caller
- Command(resume=value) - resumes execution, providing the value back to interrupt()
- Checkpointer - required to save state while paused
- Thread ID - required to identify which paused execution to resume
Requirements
Three things are required for interrupts to work:
- Checkpointer - compile with checkpointer=InMemorySaver() (dev) or PostgresSaver (prod)
- Thread ID - pass {"configurable": {"thread_id": "..."}} to every invoke/stream call
- JSON-serializable payload - the value passed to interrupt() must be JSON-serializable