> ## Documentation Index
> Fetch the complete documentation index at: https://notes.kodekloud.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Implementing Interruption Points

> Explains human-in-the-loop interruption points in LangGraph, pausing workflows for human approval, implementation details, examples, front-end integration, and best practices.

Interruption points (human-in-the-loop gates) let users pause or stop an agent before it completes an action. These checkpoints give humans oversight and control in scenarios with consequences—approving contract clauses, sending emails, or deleting records—so the system behaves cooperatively rather than as an opaque autonomous process.

<Frame>
  <img src="https://mintcdn.com/kodekloud-c4ac6d9a/s58V3Wk57W0ne4D5/images/LangGraph/Human-in-the-Loop-HILT-Architectures/Implementing-Interruption-Points/interruption-points-oversight-control-diagram.jpg?fit=max&auto=format&n=s58V3Wk57W0ne4D5&q=85&s=f34060b27aba15d2ddb0faa6ea7d2ed6" alt="The image highlights the value of interruption points for oversight and control, specifically in processes like approving a contract clause and sending an email." width="1920" height="1080" data-path="images/LangGraph/Human-in-the-Loop-HILT-Architectures/Implementing-Interruption-Points/interruption-points-oversight-control-diagram.jpg" />
</Frame>

Benefits

* Reduce risk by requiring explicit human approval for sensitive steps.
* Improve collaboration by letting humans inspect, edit, or reject AI-generated outputs.
* Increase trust and compliance for workflows involving legal, financial, or destructive actions.

In LangGraph, an interruption point is modeled as a node that pauses execution and waits for human interaction. Based on that interaction, the graph takes different edges: proceed, retry, or cancel. Think of it as a decision gate—the graph only advances once the user chooses a path.

<Frame>
  <img src="https://mintcdn.com/kodekloud-c4ac6d9a/s58V3Wk57W0ne4D5/images/LangGraph/Human-in-the-Loop-HILT-Architectures/Implementing-Interruption-Points/interruption-points-overview-diagram.jpg?fit=max&auto=format&n=s58V3Wk57W0ne4D5&q=85&s=1a8944e76c3190fcf6da104fa1eeeb7e" alt="The image is an overview of interruption points, featuring an interruption node represented by a hexagon and an hourglass, along with a &#x22;Human Input Gate&#x22; where flow pauses until a decision is made." width="1920" height="1080" data-path="images/LangGraph/Human-in-the-Loop-HILT-Architectures/Implementing-Interruption-Points/interruption-points-overview-diagram.jpg" />
</Frame>

Real-world example: delivery confirmation
Robbie pauses before leaving a package—waiting for a signature or an instruction such as “leave it at the back door.” That signature is an interruption point: the delivery workflow halts until a human provides a decision.

<Frame>
  <img src="https://mintcdn.com/kodekloud-c4ac6d9a/s58V3Wk57W0ne4D5/images/LangGraph/Human-in-the-Loop-HILT-Architectures/Implementing-Interruption-Points/delivery-process-interruption-points-overview.jpg?fit=max&auto=format&n=s58V3Wk57W0ne4D5&q=85&s=08cd8972c595f37e150f5e32f00b8249" alt="The image depicts an overview of interruption points in a delivery process, showing a person with a package, an hourglass, a signature requirement, and a house, with a note about leaving the package by the back door." width="1920" height="1080" data-path="images/LangGraph/Human-in-the-Loop-HILT-Architectures/Implementing-Interruption-Points/delivery-process-interruption-points-overview.jpg" />
</Frame>

How LangGraph implements interruption points
LangGraph uses conditional edges that check flags in the graph state (for example, `user_confirmed == True`). The execution pauses until a corresponding flag is set. Input can arrive via a UI, webhook, or API event; once received, the graph resumes along the matching edge. This event-driven approach keeps the design clean and auditable.

Implementation workflow (high level)

1. Define the graph state to include fields that store the data needing review.
2. Create an interruption node that represents the human review step.
3. Pause execution using the `interrupt` function—this saves state and emits a payload for the front end.
4. Resume the graph when human input is returned, updating the state and continuing execution.

Steps to implement interruption points

| Step                     | What to do                                                              | Example / Notes                                |
| ------------------------ | ----------------------------------------------------------------------- | ---------------------------------------------- |
| Define graph state       | Store the data that will be presented to a human reviewer.              | `{"some_text": "draft email body"}`            |
| Create interruption node | Add a node that pauses and waits for input.                             | A node named `human_review_node`               |
| Pause with `interrupt`   | Use `interrupt()` to save state and send payloads to UI/webhook.        | See the code example below                     |
| Resume and branch        | On input, update state and choose the next edge (approve/retry/cancel). | Conditional edges: `if approved -> send_email` |

Example node implementation
The following Python example shows a simple interruption node that stops the graph, sends text to a reviewer, and resumes with the revised text.

```python theme={null}
from typing import TypedDict
from langgraph.types import interrupt

class State(TypedDict):
    some_text: str

def human_review_node(state: State) -> State:
    # Pause the graph and send the text to the UI for review.
    revised_text: str = interrupt({
        "text_to_review": state["some_text"]
    })

    # Resume the graph with the revised text.
    return {
        "some_text": revised_text
    }
```

How the pause works

* When `interrupt(...)` executes, the current graph execution stops and the runtime persists the current state.
* A payload is emitted to configured endpoints (UI, API, dashboard, or webhook).
* The external system presents the content to a human for approval, editing, or cancellation.
* Once a response arrives, the runtime resumes execution from the same node and returns the user-provided value.

Front-end integration
When the graph pauses, the front end should present the draft or decision with explicit choices (approve, edit, cancel). The UI sends the result back through an API event or webhook so LangGraph can continue.

<Frame>
  <img src="https://mintcdn.com/kodekloud-c4ac6d9a/s58V3Wk57W0ne4D5/images/LangGraph/Human-in-the-Loop-HILT-Architectures/Implementing-Interruption-Points/flowchart-integration-langgraph-api-events.jpg?fit=max&auto=format&n=s58V3Wk57W0ne4D5&q=85&s=692e908d127de00eecc6faa4f4a61c9f" alt="The image is a flowchart depicting the process of integrating with a front end, involving LangGraph execution, user actions, and sending API events such as approval, rejection, or feedback." width="1920" height="1080" data-path="images/LangGraph/Human-in-the-Loop-HILT-Architectures/Implementing-Interruption-Points/flowchart-integration-langgraph-api-events.jpg" />
</Frame>

Common use cases

* Image generation: let a user approve or refine generated images before publishing.
* Data deletion: require confirmation before wiping records.
* Legal or financial advice: require human sign-off on recommendations.

<Frame>
  <img src="https://mintcdn.com/kodekloud-c4ac6d9a/s58V3Wk57W0ne4D5/images/LangGraph/Human-in-the-Loop-HILT-Architectures/Implementing-Interruption-Points/email-generation-data-detection-use-cases.jpg?fit=max&auto=format&n=s58V3Wk57W0ne4D5&q=85&s=fd38af1abc1791f8a26a6b4fd499effc" alt="The image depicts two use cases for interruption: &#x22;Email Generation,&#x22; prompting with &#x22;Do you want to send this?&#x22; and &#x22;Data Detection,&#x22; with &#x22;Confirm before wiping records.&#x22;" width="1920" height="1080" data-path="images/LangGraph/Human-in-the-Loop-HILT-Architectures/Implementing-Interruption-Points/email-generation-data-detection-use-cases.jpg" />
</Frame>

Best practices

<Frame>
  <img src="https://mintcdn.com/kodekloud-c4ac6d9a/s58V3Wk57W0ne4D5/images/LangGraph/Human-in-the-Loop-HILT-Architectures/Implementing-Interruption-Points/best-practices-decision-points-fallbacks-flows.jpg?fit=max&auto=format&n=s58V3Wk57W0ne4D5&q=85&s=8302d13f7e8284e2b8d3470b72e24a0e" alt="The image lists three best practices with icons: make decision points clear and simple, always allow a safe fallback, and avoid blocking flows unnecessarily." width="1920" height="1080" data-path="images/LangGraph/Human-in-the-Loop-HILT-Architectures/Implementing-Interruption-Points/best-practices-decision-points-fallbacks-flows.jpg" />
</Frame>

<Callout icon="lightbulb" color="#1CB2FE">
  When designing interruption points, be explicit in the UI about what each decision means. Provide clear options (approve, edit, cancel), allow safe fallbacks, and avoid pausing the flow for trivial matters. Only interrupt where user input improves safety, trust, or personalization.
</Callout>

Concise best-practice checklist

* Make decision points clear and minimal—only pause for high-value human input.
* Provide safe fallbacks (e.g., “undo”, “retry”, or default timeouts).
* Avoid blocking flows unnecessarily—use timeouts or automated fallbacks when appropriate.
* Log all human interactions for auditability and compliance.

With well-designed interruption points, agents become cooperative partners: they ask before they act and allow humans to steer workflows. In LangGraph, this pattern is straightforward to implement using stateful nodes, conditional edges, and front-end callbacks.

Links and references

* LangGraph course: [https://learn.kodekloud.com/user/courses/langgraph](https://learn.kodekloud.com/user/courses/langgraph)
* Human-in-the-loop design patterns and best practices (general reading)

<CardGroup>
  <Card title="Watch Video" icon="video" cta="Learn more" href="https://learn.kodekloud.com/user/courses/langgraph/module/0512078c-4290-4d71-9531-0b12f54f10c6/lesson/aec3961d-bbb5-473b-9c8e-7b56a12ebd25" />
</CardGroup>
