interrupt and resume with Command.
For concepts, see the Functional API overview. For interrupt payloads and resume shapes, see Interrupts. Persistence requires a checkpointer and a thread_id.
Pause for feedback
Create three tasks:- Append
"bar". - Pause for human input. When resuming, append that input.
- Append
"qux".
interrupt runs inside human_feedback after step_1 has finished. Those results are persisted, so step_1 does not run again after resume.
Identify the run with thread_id. Drive the stream until it pauses, print the interrupt payload, then resume.
Command resume value is the data human_feedback expects. After resume, the run continues through step_3 and returns foo bar baz qux.
Review tool calls
To review tool calls before execution, callinterrupt from a helper. Execution pauses until you resume with Command.
Given a tool call, choose one of:
- Accept the tool call
- Revise the tool call and continue
- Generate a custom tool message (for example, instruct the model to re-format its tool call)
call_tool. Feedback becomes a ToolMessage and skips execution. Prior task results, here the first model call, stay on the thread after the interrupt.
call_model and call_tool below are stand-ins. Replace them with your model and tools. For more, see Add memory with the Functional API.
The entrypoint restores prior messages from the checkpointer with previous.
See also
- Functional API overview
- Build checklist for the Functional API
- Interrupts
- Add memory with the Functional API
- Stream with the Functional API
Connect these docs to your agent of choice via MCP for real-time answers.

