The fastest way to lose trust in an agent is to let it do something irreversible on its own. Refunds, deletes and emails to customers should wait for a person. LangGraph has the two pieces you need to build that properly: an interrupt and a checkpointer.
Below is the support agent from our home page, built as a LangGraph graph and run on our machines with simple stand-ins for the model calls, so the control flow is easy to see and verify.
The graph

A supervisor routes the request. The research node calls a narrow tool to fetch the order, and retrieval looks up the refund policy. Then the action node proposes a refund and stops. Nobody drew this picture by hand: LangGraph generated it from the compiled graph.
The code
"""Support agent from the vithupro.in hero: supervisor -> specialist agents -> human approval before any refund.
Runs offline (stub logic instead of LLM calls) so the graph, checkpointing and interrupt can be verified and drawn."""
from typing import Literal, TypedDict
from langgraph.checkpoint.memory import MemorySaver
from langgraph.graph import END, START, StateGraph
from langgraph.types import Command, interrupt
class State(TypedDict, total=False):
request: str
order: dict
policy: str
decision: str
reply: str
def supervisor(state: State) -> Command[Literal["research", "retrieval"]]:
# In production this is an LLM routing call with structured output.
return Command(goto="research" if "order" not in state else "retrieval")
def research(state: State) -> dict:
# Tool call over MCP: get_order(order_id) -> a narrow, typed, read-only tool.
return {"order": {"id": "4821", "status": "delivered", "damaged": True, "amount": 2499}}
def retrieval(state: State) -> dict:
# GraphRAG lookup over the policy knowledge graph, with citations.
return {"policy": "Damaged on arrival: full refund within 7 days [policy.pdf p.3]"}
def action(state: State) -> dict:
# Irreversible step: pause the graph and wait for a person.
answer = interrupt({"proposed": f"refund_order({state['order']['id']})", "because": state["policy"]})
return {"decision": answer}
def respond(state: State) -> dict:
ok = state.get("decision") == "approve"
return {"reply": "Refund approved and issued." if ok else "A teammate will review your request."}
builder = StateGraph(State)
builder.add_node("supervisor", supervisor)
builder.add_node("research", research)
builder.add_node("retrieval", retrieval)
builder.add_node("action", action)
builder.add_node("respond", respond)
builder.add_edge(START, "supervisor")
builder.add_edge("research", "supervisor")
builder.add_edge("retrieval", "action")
builder.add_edge("action", "respond")
builder.add_edge("respond", END)
graph = builder.compile(checkpointer=MemorySaver()) # Postgres saver in production
if __name__ == "__main__":
cfg = {"configurable": {"thread_id": "ticket-4821"}}
first = graph.invoke({"request": "Order #4821 arrived damaged. I want my money back."}, cfg)
print("paused for approval:", first["__interrupt__"][0].value)
final = graph.invoke(Command(resume="approve"), cfg) # a human clicks Approve
print("reply:", final["reply"])
print(graph.get_graph().draw_mermaid())paused for approval: {'proposed': 'refund_order(4821)', 'because': 'Damaged on arrival: full refund within 7 days [policy.pdf p.3]'}
reply: Refund approved and issued.How the pause works
Inside the action node, interrupt(...) stops the run and hands a payload back to the caller: what the agent wants to do and why. The first invoke returns that payload instead of a final answer. Nothing has been refunded yet.
Because the graph was compiled with a checkpointer, its state at that moment is saved under the thread ID ticket-4821. The reviewer can come back minutes or days later. Resuming is a second invoke with Command(resume="approve"), and the graph continues from exactly where it stopped. The output under the code shows both halves: the paused proposal, then the final reply.
Making it production-ready
- Use a durable checkpointer. The sample uses
MemorySaver; in production we use the Postgres checkpointer so paused threads survive restarts. - Show the reviewer the evidence. The interrupt payload should carry what the agent found (the order, the policy clause), so approving is a decision, not a rubber stamp.
- Allow edits, not just yes or no. The resume value can carry a corrected amount or a different action.
- Log the decision. Who approved, when, and what they saw belongs in the audit trail.
- Bound the wait. When approvals can take days across deploys, we run the outer process as a durable workflow on Temporal.

Our live demo applies the same idea to code: the agent finds problems and proposes patches, and nothing is applied until you click approve.
Rule: reads can be automatic. Anything you couldn't undo with one click should go through an interrupt.


