Durable agent orchestration

How to use
LangGraph.

Designing stateful agent workflows that require explicit control flow, durable checkpoints, streaming, recovery, memory, and human-in-the-loop decisions.

What it isopen-source orchestration framework and runtime for long-running stateful agents Workflows2 UpdatedSeptember 2026

LangGraph is a open-source orchestration framework and runtime for long-running stateful agents. Designing stateful agent workflows that require explicit control flow, durable checkpoints, streaming, recovery, memory, and human-in-the-loop decisions. This guide covers the whole path in one place: official access, a first session that produces something reviewable, the checks that make output trustworthy, and the permissions worth limiting before you connect real work.

Troiana principle

AI should make the work easier to inspect. If the workflow removes the source, the owner, or the review step, redesign the workflow.

01

Access & setup

Find, install, and sign in to LangGraph

Get into the official LangGraph experience with the right account and a setup you understand.

  1. 01

    Start at https://www.langchain.com/langgraph and confirm the domain before entering account or payment information.

  2. 02

    Availability: LangGraph is installed as Python or JavaScript packages and may be run locally or with documented deployment services.

  3. 03

    A supported development runtime, chosen model and tool integrations, and a production persistence layer for durable execution or human review.

  4. 04

    Sign in with the account you intend to keep using, then review plan, data, notification, and permission settings.

  5. 05

    Run one low-risk test task before connecting sensitive files, repositories, or workspace data.

  • Use official download pages.
  • Review permissions during setup.
  • Keep installers and applications updated.
02

First session

Your first useful LangGraph session

Learn the interaction loop using a small task with a clear outcome.

  1. 01

    Define minimal serializable state, node responsibilities, transitions, start and end conditions, and error outcomes.

  2. 02

    Implement deterministic and model-driven steps separately and make any external side effects idempotent.

  3. 03

    Compile with a checkpointer and invoke the graph with a stable thread ID.

  4. 04

    Test state history, failure recovery, replay, and resume behavior before adding production actions.

  • State the outcome before the background.
  • Provide the real source material.
  • Review the result before expanding the task.
03

Quality control

Check the quality of LangGraph output

Establish that an autonomous run did the right thing, not merely that it finished.

  1. 01

    Define what the run should achieve and what it must never touch before granting it a single tool.

  2. 02

    Read the full execution trace: which tools were called, with what arguments, and in what order.

  3. 03

    Verify the side effects directly in the target system rather than trusting the agent's own report of success.

  4. 04

    Confirm failures surfaced as failures — a silent retry loop or a swallowed error is more dangerous than a crash.

  5. 05

    Re-run the same task and compare: an agent that behaves differently across identical runs is not yet production-ready.

  • Verify side effects in the system of record, not in the agent's summary.
  • Require human approval for any irreversible or outward-facing action.
  • Log every tool call so a run can be reconstructed afterwards.
04

Privacy & permissions

Use LangGraph safely

Bound what an autonomous system can reach before you let it run unattended.

  1. 01

    Enumerate every tool, credential, and system the agent can reach, and remove the ones it does not need.

  2. 02

    Require explicit human approval for irreversible actions: sending, publishing, paying, deleting, or deploying.

  3. 03

    Run against non-production data until behaviour is predictable across repeated runs.

  4. 04

    Set hard limits on spend, iterations, and runtime so a failure loop cannot run unbounded.

  5. 05

    Treat anything the agent reads from the web or a document as data, never as instructions it may follow.

  • Durable replay can repeat model calls or external effects unless nodes are designed carefully. Protect persisted state, isolate tenants and threads, use idempotency, control checkpoint retention, and test every interruption and resumption path.
  • Follow your organisation's approved-use policy.
  • Never treat fluent output as authorization to act.
05

Core workflows

Step-by-step ways to use LangGraph for the work it does best.

Each workflow below has its own outcome, steps and review checkpoints.

Workflow 01

Design a durable LangGraph workflow

Model a long-running task as explicit state, nodes, transitions, checkpoints, and recoverable side effects.

Outcome: Build a stateful workflow that can resume safely after interruption without silently repeating consequential work.

  1. 01

    Define a JSON-serializable state schema, start and end conditions, node responsibilities, reducers, and invariant checks.

  2. 02

    Separate deterministic logic, model calls, and external side effects into small nodes or tasks with explicit error outcomes.

  3. 03

    Compile with a persistent checkpointer, assign stable thread IDs, and make side-effecting operations idempotent.

  4. 04

    Test success, branch conditions, node failure, process restart, replay, concurrent resume, and state migration scenarios.

  5. 05

    Inspect state history and traces, then document retry ownership, checkpoint retention, schema versions, and recovery procedures.

What good use looks like

  • Keep state serializable and minimal.
  • Make side effects idempotent.
  • Test resumption, not only first execution.

Workflow 02

Add human review to a LangGraph action

Interrupt a graph before a sensitive action and resume from persisted state after an authorized decision.

Outcome: Ensure consequential actions cannot run until a reviewer approves or safely edits their exact arguments.

  1. 01

    Place the interrupt immediately before the side effect and construct a review payload with action, arguments, impact, and source context.

  2. 02

    Persist the graph with a production checkpointer and bind each execution to authenticated user, tenant, and thread identifiers.

  3. 03

    Allow explicit approve, edit, or reject outcomes and validate edited arguments again before the action node runs.

  4. 04

    Test delayed review, rejection, duplicate decisions, expired authorization, process failure, replay, and attempted cross-thread access.

  5. 05

    Record the reviewer and decision separately from sensitive state, monitor pending interrupts, and rehearse recovery from the last checkpoint.

What good use looks like

  • Interrupt before the effect.
  • Revalidate edited arguments.
  • Prevent cross-tenant state access.
06

Official references

Check the current product documentation.

Features, plan limits, availability, and data controls change. These official pages are the starting points used for this guide.

Explore the Troiana AI Hub →