Skip to main content
19 min read

Durable Agents with LangGraph and LangSmith

Part 6: State that survives crashes, approvals that expire, evaluations that gate releases, and an authenticated streaming API.

👉

Recap

Part 5 turned the investigation into a team.

A deterministic intake routes the question. Three specialist workers with read-only tools run in parallel. An independent reviewer reconciles their findings. The one write action waits for the reviewer and a human to approve it.

Part 5 ended with three gaps:

  • Every checkpoint lives in memory. A process restart loses every paused approval and every run in flight.
  • An approval waits forever. There is nothing that expires it.
  • Lastly, nothing catches prompt regression. Suppose we deleted the reviewer's instruction to judge whether the evidence supports the proposed action. All 81 tests from Parts 1 to 5 would still pass, since they use scripted models, which do not read prompts, so no test could notice that.

This part closes these gaps. State moves to Postgres and survives a crash. Approvals expire by policy, and every decision goes into an audit table. Evaluations check the nodes that a prompt change can break, and a gate fails the build when their scores fall below the thresholds. The team also gets an authenticated API that streams its progress and pauses for approval.

Prerequisites: Parts 1 to 5 of this series. You can read them below:

First Steps Towards a Production-Ready Agent with LangChain
Part 1: Tools, structured output, runtime context, and tracing, in one small agent.
Middleware-Driven Context Engineering in LangChain
Part 2: Dynamic prompts, memory, compression, and isolation with middleware
Agent Harness with LangChain Middleware and Jev
Part 3: Retries, fallbacks, routing, guardrails, permissions, and the first human-in-the-loop interrupt.
Planning and Verification Loops with LangGraph and Jev
Part 4: Plans, independent verification, stuck detection, budgets, and loops that stop when the task is done.
Multi-agent orchestration with LangGraph
Part 5: Parallel specialist workers, shared state, and a reviewer that reconciles their findings.

Note on the reference project:

The code and project setup are attached below as a zip file. Extract it and run uv sync to get going.

Download the zip file below:

Published on Oct 14, 2026