> ## 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.

# Designing Human Approval Nodes

> Designing human approval nodes that pause automated workflows for human review, capture decisions, and route actions to ensure safe, auditable, and controllable automation

Human approval nodes are essential when you need explicit human oversight before an agent takes an action—examples include sending sensitive emails, updating critical records, or confirming recommendations in production systems. These nodes improve trust, control, and compliance by pausing an automated flow until a person verifies or modifies the output.

<Frame>
  <img src="https://mintcdn.com/kodekloud-c4ac6d9a/s58V3Wk57W0ne4D5/images/LangGraph/Human-in-the-Loop-HILT-Architectures/Designing-Human-Approval-Nodes/human-approval-nodes-importance-diagram.jpg?fit=max&auto=format&n=s58V3Wk57W0ne4D5&q=85&s=08b31fd0511edd096b2a2d692b94163d" alt="The image is a diagram explaining why human approval nodes matter, highlighting tasks like sending sensitive emails, updating records, and confirming recommendations." width="1920" height="1080" data-path="images/LangGraph/Human-in-the-Loop-HILT-Architectures/Designing-Human-Approval-Nodes/human-approval-nodes-importance-diagram.jpg" />
</Frame>

At a high level, a human approval node gives the user the final say before the agent proceeds. That final check reduces risk and enables safe automation in professional environments.

<Frame>
  <img src="https://mintcdn.com/kodekloud-c4ac6d9a/s58V3Wk57W0ne4D5/images/LangGraph/Human-in-the-Loop-HILT-Architectures/Designing-Human-Approval-Nodes/human-approval-nodes-flowchart.jpg?fit=max&auto=format&n=s58V3Wk57W0ne4D5&q=85&s=1a07f9e2a2a36dce6bf2cbd704efdad4" alt="The image is a flowchart explaining the importance of &#x22;Human Approval Nodes,&#x22; depicting a sequence from &#x22;Agent&#x22; to &#x22;Action Executes,&#x22; highlighting trustworthiness and control." width="1920" height="1080" data-path="images/LangGraph/Human-in-the-Loop-HILT-Architectures/Designing-Human-Approval-Nodes/human-approval-nodes-flowchart.jpg" />
</Frame>

What is a human approval node?

A human approval node is a custom LangGraph node that interrupts the graph execution, sends the generated payload to a frontend or human tasking system, waits for the reviewer’s decision, and then resumes the graph with routing based on that decision.

<Frame>
  <img src="https://mintcdn.com/kodekloud-c4ac6d9a/s58V3Wk57W0ne4D5/images/LangGraph/Human-in-the-Loop-HILT-Architectures/Designing-Human-Approval-Nodes/human-approval-node-langgraph-overview.jpg?fit=max&auto=format&n=s58V3Wk57W0ne4D5&q=85&s=9d1a370efeb29b22f9de2ac2811ebab2" alt="The image illustrates an overview of a &#x22;Human Approval Node&#x22; process, showing a connection between a LangGraph node and a human waiting for a response." width="1920" height="1080" data-path="images/LangGraph/Human-in-the-Loop-HILT-Architectures/Designing-Human-Approval-Nodes/human-approval-node-langgraph-overview.jpg" />
</Frame>

The reviewer can confirm the agent’s output, request edits, or cancel the flow. After the response is recorded, the graph routes to different branches (e.g., proceed, modify, cancel)—similar to verifying a fragile delivery address before dropping off a package.

<Frame>
  <img src="https://mintcdn.com/kodekloud-c4ac6d9a/s58V3Wk57W0ne4D5/images/LangGraph/Human-in-the-Loop-HILT-Architectures/Designing-Human-Approval-Nodes/human-approval-node-overview-illustration.jpg?fit=max&auto=format&n=s58V3Wk57W0ne4D5&q=85&s=c50a908c3f5ca501e2264a286277ade5" alt="The image is an illustration labeled &#x22;Human Approval Node – Overview,&#x22; showing a person requesting confirmation of a drop-off location with text and icons representing a fragile package and a user." width="1920" height="1080" data-path="images/LangGraph/Human-in-the-Loop-HILT-Architectures/Designing-Human-Approval-Nodes/human-approval-node-overview-illustration.jpg" />
</Frame>

Common implementation pattern (interrupt + resume)

In LangGraph, human approval nodes typically follow an interruption pattern:

* Pause at a node and send a payload (question, content, options) to the frontend or tasking system.
* Wait for the human to respond.
* Resume the graph and route according to the recorded decision.

This pattern is widely used where outputs must not be executed without human review—for example, client-facing summaries, legal or financial changes, and other sensitive operations.

Three main steps (concise example)

* Step 1 — Define the state\
  Store the content to be reviewed and the approval decision in the graph state.

* Step 2 — Pause and collect human approval\
  The approval node triggers an interrupt to the UI/human task system and waits for a response.

* Step 3 — Route based on the decision\
  A routing function reads the updated state and chooses the next edge in the graph.

Example (conceptual LangGraph approval node):

```python theme={null}
# Example LangGraph approval node (conceptual)
from typing import TypedDict
from langgraph.types import interrupt

# Step 1: Define the graph state
class State(TypedDict):
    content: str
    approval: str

# Step 2: Pause and collect human approval
def review_node(state: State) -> dict:
    # `interrupt` sends the payload to the UI/human task system and returns the selected option.
    approval = interrupt({
        "question": "Do you approve this content?",
        "content": state["content"],
        "options": ["yes", "edit", "cancel"]
    })
    # Return the update to be merged into the graph state
    return {"approval": approval}

# Step 3: Route based on the human decision
def route_after_review(state: State) -> str:
    if state.get("approval") == "yes":
        return "proceed"
    elif state.get("approval") == "edit":
        return "modify"
    return "cancel"

# `builder` is an existing graph builder instance in your LangGraph setup.
# Map the routing function's outcomes to the next node IDs in the graph.
builder.add_conditional_edges(
    "review",                # node name where review happens
    route_after_review,      # routing function reading state
    {
        "proceed": "proceed",
        "modify": "modify",
        "cancel": "cancel"
    }
)
```

This wiring—pause for input, capture the decision, then route accordingly—makes the workflow interruptible, auditable, and human-aware.

<Callout icon="lightbulb" color="#1CB2FE">
  Design the frontend to clearly display the AI-generated content, available actions (approve, request changes, cancel), and contextual metadata (who generated it, timestamps, reason). Clear UI and context reduce friction and errors.
</Callout>

<Frame>
  <img src="https://mintcdn.com/kodekloud-c4ac6d9a/s58V3Wk57W0ne4D5/images/LangGraph/Human-in-the-Loop-HILT-Architectures/Designing-Human-Approval-Nodes/front-end-design-approval-diagram.jpg?fit=max&auto=format&n=s58V3Wk57W0ne4D5&q=85&s=f51ebd1331fc253f09201b54894a56a6" alt="The image is a diagram showing a front-end design for approval, featuring sections for AI output, actionable options like &#x22;Approve&#x22; and &#x22;Request Changes,&#x22; and relevant context details. It emphasizes the importance of a clear UI for effective human-in-the-loop (HILT) interactions." width="1920" height="1080" data-path="images/LangGraph/Human-in-the-Loop-HILT-Architectures/Designing-Human-Approval-Nodes/front-end-design-approval-diagram.jpg" />
</Frame>

When the human responds, the frontend posts the result back into LangGraph and the flow resumes using the defined routing logic.

Use cases

| Use Case                                | Description                                                             |
| --------------------------------------- | ----------------------------------------------------------------------- |
| Sending personalized emails or reports  | Human reviews and approves sensitive or customer-facing communications. |
| Drafting but not finalizing conclusions | Agent prepares a draft; human edits or approves the final version.      |
| Verifying sensitive data changes        | Human confirms updates to critical records before they are applied.     |

<Frame>
  <img src="https://mintcdn.com/kodekloud-c4ac6d9a/s58V3Wk57W0ne4D5/images/LangGraph/Human-in-the-Loop-HILT-Architectures/Designing-Human-Approval-Nodes/use-cases-personalized-emails-data-verification.jpg?fit=max&auto=format&n=s58V3Wk57W0ne4D5&q=85&s=2a3c918f002bf96398e7f9a2e2ed73fb" alt="The image provides three use cases: sending personalized emails or reports, letting agents draft but not finalize conclusions, and verifying sensitive data modifications." width="1920" height="1080" data-path="images/LangGraph/Human-in-the-Loop-HILT-Architectures/Designing-Human-Approval-Nodes/use-cases-personalized-emails-data-verification.jpg" />
</Frame>

Best practices

* Minimize unnecessary friction: require approvals only when risk or uncertainty justifies them.
* Log every decision: capture user ID, timestamp, and context for auditability.
* Design for traceability: keep a clear audit trail to review why specific choices were made.
* Gradually reduce approvals where appropriate: as the system proves reliable, allow trusted users or low-risk items to skip review.

<Frame>
  <img src="https://mintcdn.com/kodekloud-c4ac6d9a/s58V3Wk57W0ne4D5/images/LangGraph/Human-in-the-Loop-HILT-Architectures/Designing-Human-Approval-Nodes/best-practices-ui-friction-logging.jpg?fit=max&auto=format&n=s58V3Wk57W0ne4D5&q=85&s=94370c7133da538f25f047c41c2d7fd0" alt="The image illustrates &#x22;Best Practices&#x22; with two arrows, highlighting minimizing friction in UI and logging decisions with timestamps and user IDs." width="1920" height="1080" data-path="images/LangGraph/Human-in-the-Loop-HILT-Architectures/Designing-Human-Approval-Nodes/best-practices-ui-friction-logging.jpg" />
</Frame>

Takeaways

Approval nodes empower humans to guide agents responsibly. For legal compliance, brand safety, or operational peace of mind, they act as a safety valve—letting you benefit from automation while maintaining human control.

<Frame>
  <img src="https://mintcdn.com/kodekloud-c4ac6d9a/s58V3Wk57W0ne4D5/images/LangGraph/Human-in-the-Loop-HILT-Architectures/Designing-Human-Approval-Nodes/takeaways-approval-nodes-key-points.jpg?fit=max&auto=format&n=s58V3Wk57W0ne4D5&q=85&s=0fd8aa0f392c8e0ae3c00dbadd0b5f5f" alt="The image is a slide titled &#x22;Takeaways&#x22; that lists three key points about the importance of approval nodes in guiding agents, acting as a safety valve, and being useful for legal and risk-sensitive workflows." width="1920" height="1080" data-path="images/LangGraph/Human-in-the-Loop-HILT-Architectures/Designing-Human-Approval-Nodes/takeaways-approval-nodes-key-points.jpg" />
</Frame>

In LangGraph, human approval nodes are another flow element—pause, collect human input, and route based on the result—making your workflows safe, auditable, and adaptable.

Links and references

* [LangGraph documentation](https://langgraph.ai/docs)
* [Human-in-the-loop (HITL) design patterns (overview)](https://en.wikipedia.org/wiki/Human-in-the-loop)

<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/33409ca8-8f6c-4388-be5c-b5ffa89bb893" />
</CardGroup>
