Agent Orchestration

LangGraph: Agents That Resume, Not Restart

A linear chain runs once and forgets. LangGraph models an agent as a stateful graph that checkpoints every step, so a run can pause for a human, survive a crash, and pick up from the exact place it stopped.

Cloud X Ops TeamDevOps & SRE Consultancy
July 6, 2026
10 min read

By mid-2026 the agent question stopped being can a model call a tool and became how do we checkpoint, resume, observe and gate the thing in production. That is a platform problem, not a data-science one. LangChain's 2025 State of AI Agents report puts 57% of organisations running agents in production and names quality and reliability, not token price, as the top barrier to shipping. LangGraph is the framework most teams reach for to make that reliability real.

The shift it asks you to make is small to describe and large in consequence: stop thinking of an agent as a chain that runs top to bottom once, and start thinking of it as a graph that carries state, loops when it needs to, and can be paused and resumed like any other durable workflow.

Graphs, not chains

A chain is a straight line: prompt, model, tool, answer, done. It works right up until the agent needs to do something a straight line cannot express, loop until a check passes, branch on a decision it makes at runtime, hand control to another agent, or wait two days for a human to approve a deploy. LangGraph replaces the line with three primitives.

  • Nodes are functions or agents. Each one reads the current state and returns a partial update to it.
  • Edges connect nodes, and they can be conditional and cyclic. That single fact, edges that loop, is what lets an agent retry, reflect and branch instead of running once.
  • Shared state is a typed object every node reads and writes. A reducer decides how each update merges, append to a message list, overwrite a scalar, so state is an explicit contract, not something hidden inside a prompt.

That is the whole model, and it is deliberately low-level. LangGraph is the controllable substrate; LangSmith is the observability and deployment layer that runs on top of it. You describe the graph; the runtime handles making each step of it durable.

Watch a run pause and resume

Press Run agents below. A supervisor routes the request to a retriever that calls a tool, hands off to a coder, then reaches a reviewer that has to deploy, exactly the kind of high-risk action you never let an agent take unattended. The graph hits an interrupt(), checkpoints its state to Postgres, and holds. At that moment the process could die and lose nothing. When a human approves, the run resumes from the exact step, not from the beginning.

Agent Run · Supervisor + Durable State
user · “ship v2.3”
Supervisorrouter
retrievertooltool
coderagent
reviewerdeployagent
checkpoints · postgres
trace ls-8f3a · 1 run
$ awaiting run · press Run agents
One run, six checkpoints, a durable pause for human approval, and a single end-to-end trace

Checkpoints are the whole trick

A checkpointer saves a snapshot of the graph's state at every super-step, keyed by a thread_id. That one mechanism is where almost everything useful comes from: conversation continuity, fault recovery, time-travel debugging, and human-in-the-loop all fall out of the same saved state. Use a database-backed checkpointer such as PostgresSaver in production; InMemorySaver is for notebooks and dies with the process.

LangGraph 1.0 lets you choose how aggressively it writes those snapshots, trading write frequency for crash safety:

  • exit, checkpoint only when the run finishes. Fastest, but no mid-run recovery. Fine for cheap, idempotent work.
  • async, the default, persists a step while the next one runs. Good balance for most graphs.
  • sync, persists before the next step starts. Most durable, some overhead, the right choice for anything with irreversible side effects.
# A durable human-in-the-loop deploy gate. The run halts at interrupt(),
# its state is safe on Postgres, and it resumes from the exact step.
from langgraph.graph import StateGraph, START, END, MessagesState
from langgraph.checkpoint.postgres import PostgresSaver
from langgraph.types import interrupt, Command

def deploy(state: MessagesState):
    decision = interrupt({"action": "kubectl apply -f prod/", "risk": "high"})
    if decision != "approve":
        return {"messages": [("assistant", "Rollout cancelled.")]}
    return {"messages": [("assistant", "Applied to prod.")]}

builder = StateGraph(MessagesState)
builder.add_node("deploy", deploy)
builder.add_edge(START, "deploy")
builder.add_edge("deploy", END)

with PostgresSaver.from_conn_string("postgresql://localhost/agents") as cp:
    cp.setup()                                # first run: create checkpoint tables
    graph = builder.compile(checkpointer=cp)  # every super-step is checkpointed
    cfg = {"configurable": {"thread_id": "rollout-42"}}

    graph.invoke({"messages": [("user", "ship v2.3")]}, cfg, durability="sync")
    # -> run halts at interrupt(); the process can now safely exit

    # ...hours later, once a human approves in Slack, resume from the checkpoint
    graph.invoke(Command(resume="approve"), cfg, durability="sync")

One subtlety worth internalising: after an interrupt(), the node re-executes from its top on resume. So any side effect placed before the interrupt, charging a card, sending an email, applying a manifest, will fire a second time. Keep everything before the pause idempotent.

Checkpointing is not durable execution

A checkpointer saves state, not the running process. If the OS process dies mid-run, the run stops, the state just is not lost. To have the run pick itself back up automatically you still need a runtime: LangSmith Deployment (the managed server formerly called LangGraph Platform) or the official Temporal LangGraph plugin, which lets a durable wait cost nothing while it is paused.

Orchestration patterns that ship

Multi-agent sounds exotic; in production it is a small number of well-worn shapes, and the boring one wins most of the time.

  • Supervisor, one routing node delegates to specialist workers and synthesises their results. Every decision shows up in a trace, and the failure modes are the best understood. This is the production default; start here.
  • Router, dispatch to several specialists in parallel and merge their answers. Trades a little legibility for latency when the subtasks are genuinely independent.
  • Handoffs / swarm, peers pass control directly with Command(goto=...) instead of returning to a hub. Reach for it only when the direct transfer saves latency you can actually measure.
  • Hierarchical teams, supervisors of supervisors, for large workflows. Powerful, and the easiest way to build something nobody can debug, so earn it.

Two habits keep these out of trouble. Route by cost and role, put a stronger model on the supervisor where a wrong turn is expensive and cheaper models on the workers, that split, not prompt-golfing, is where most of the bill and latency live. And bound the cycles: a supervisor with no recursion limit and no clear termination edge will happily ping-pong between agents forever and quietly burn tokens.

The interesting failures are worth a human. The obvious ones, a crash, a retry, a two-day wait for approval, should be infrastructure. LangGraph's job is to make the boring parts durable so your engineers only see the interesting parts.

Takeaways

  • LangGraph models an agent as a stateful graph of nodes and edges over shared typed state, cycles and conditional routing included, which a linear chain simply cannot express.
  • The checkpointer is the foundation: snapshot every super-step to Postgres, keyed by thread, and resume, time-travel, memory and human-in-the-loop all fall out of that one mechanism.
  • Checkpointing is not durable execution, a crashed process needs a runtime like LangSmith Deployment or Temporal to pick the run back up on its own.
  • The barrier to production is quality, not cost, so LangSmith tracing, evals and guardrails are how an agent gets past the pilot, not optional extras.
  • Keep orchestration boring: start with a supervisor, put humans on the graph for risky actions, and route cheap versus expensive models by role.

Moving an agent from demo to production?

We build the durable, observable substrate under LangGraph agents, Postgres checkpointing, human-in-the-loop gates, LangSmith tracing and Temporal-backed recovery, so your agents survive crashes and ship with guardrails.

Productionise your agents
agents.sh
SECURE
cloudxops@agents:~$ ./trace.sh rollout-42
# Replaying one run across every node...
[OK] 6/6 checkpoints on postgres
[INFO] paused 2h14m · resumed on approve
[READY] one trace · zero lost state
$
Run durability