DEDUPED Hot AI repos. Real use cases. What people build. Get the Monday 5

How to pause an agent for human approval before it acts with Langgraph

Use LangGraph interrupts to inspect and edit an agent's state before a risky step runs.

Short answer: Install with pip install -U langgraph; then 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. All steps.

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

  1. Install with pip install -U langgraph
  2. Model the agent as a LangGraph graph, putting the risky action in its own step
  3. Follow the Human-in-the-loop guide (interrupts) to pause before that step
  4. Inspect and, if needed, modify the agent state at the pause, then resume the run
  5. 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

Cursor, ChatGPT, others

Share: X LinkedIn Hacker News Email Copy link

Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer