← Back to hub
Human-in-the-loop
In one line
Pause for human approval before risky actions, then resume from the same spot.
Key idea
LangGraph interrupts save state via the checkpointer, wait for a human, then continue.
Easy path: HumanInTheLoopMiddleware with decisions approve / edit / reject.
from langchain.agents.middleware import HumanInTheLoopMiddleware
HumanInTheLoopMiddleware(interrupt_on={"send_email": {"allowed_decisions": ["approve","edit","reject"]}})
Needs a checkpointer (short-term memory). See Memory.
My notes
Add your own findings here as you learn.