LangGraph 1 · Human in the loop

Pause for human input

Call interrupt inside a node. The graph stops, saves its state and returns the value you passed. Needs a checkpointer.

from langgraph.types import interrupt

def approval(state: State):
    answer = interrupt("Approve this action?")
    return {"approved": answer}

Official LangGraph 1 documentation

More human in the loop commands

All human in the loop commands · LangGraph 1 cheatsheet

Was this page helpful?