Who it is forA team building an agent that sends emails, edits records or spends money and wants a person to sign off first.
The problemFully autonomous agents can take an action you cannot undo before anyone has looked at it.
The outcomeAn agent that stops at chosen points, shows its state for review and continues only after a person approves or edits it.
What you need first
- Python and pip
- An LLM provider for your agent's model calls
- Optional: a LangSmith account for tracing and the LangSmith Deployment platform
- For JavaScript or TypeScript, the separate LangGraph.js library
Steps
- Install with
pip install -U langgraph - Model the agent as a LangGraph graph, putting the risky action in its own step
- Follow the Human-in-the-loop guide (interrupts) to pause before that step
- Inspect and, if needed, modify the agent state at the pause, then resume the run
- Pair it with persistence so a paused run can wait for a reviewer without losing its place
Prompt for your agent
With langchain-ai/langgraph, add a human-in-the-loop interrupt before the <risky action> step of my agent. When it pauses, print the pending state, let me edit it, and only resume after I approve.
Caveat. Interrupt syntax lives in the docs, not the README, and it changes between releases, so match the docs to your installed version.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for langchain-ai/langgraph and "Pause an agent for human approval before it acts"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer