Skip to main content

Buyer guide

When a Graph Earns Its Complexity: LangGraph or Plain Code

Pick a graph for workflows that branch, pause for people, or need to recover after a crash. For the rest, choose LangGraph's Functional API or plain code your team writes.

Reading time
2 min read
Sources
14 cited

Use LangGraph when a workflow branches, waits for a person, or must survive a crash. A straight sequence that needs none of those runs cheaper as a loop in your own code. The Functional API sits between the two, adding persistence and interrupts to ordinary functions. This guide lists the traits that justify a graph and the signs a team should write its own loop.

When you need this

  • A team is choosing a framework for its first production agent.
  • An existing LangGraph codebase feels heavier than the workflow it runs.
  • Engineers disagree about whether to adopt a framework or keep building their own.

Evaluation criteria

  1. Branching

    Does the workflow branch, loop, or fan out and merge?

    Look forA graph declares each branch explicitly, and reducers define how parallel results merge. A straight sequence with one branch does not need a graph. yeos.ai found most of its enterprise requests were sequential and removed LangGraph. A developer who used it in 8 of 10 projects replaced it in most.

  2. Durable state

    Must a run survive a crash or a long wait?

    Look forCheckpointing is the hardest capability to add later. Engineers who wrote it themselves describe ending up with their own checkpointer, and one team replaced a homegrown layer full of edge cases with LangGraph.

  3. Human approval

    Does a person need to approve or edit mid-run?

    Look forinterrupt() and resume across processes need durable state and a resume entry point, and LangGraph provides both. A workflow with no approvals gets nothing from this.

  4. The middle ground

    Can you keep your code and add the runtime?

    Look forThe Functional API adds persistence, interrupts, and streaming to ordinary functions with @entrypoint and @task, without restructuring code into a graph. LangChain also recommends its higher-level create_agent for teams that do not need low-level control.

  5. Cost of control

    What does explicit control cost per run?

    Look forIn one 27-run test, LangGraph's explicit verify-and-revise loop cut output variance by 77% but used 2.5 times the tokens and latency. Bridgewater runs its chat agent on LangGraph for persistent state but writes its coding agent as plain Python with no agentic orchestration.

  6. Debugging a large graph

    Who will debug the graph once it grows?

    Look forAirbnb chose LangGraph partly because engineers can open one run and see exactly how a decision was made. A bug spanning many state transitions was harder for yeos.ai to trace than a bug in a function. Rippling dropped a multi-agent design whose handoffs and interrupts got messy.

  7. Exit path

    Can you leave LangGraph later?

    Look forLinkedIn standardized on LangChain and LangGraph behind its own adapters so it can switch frameworks at low cost. Keep model calls and tools behind your own interfaces so you can replace the orchestration layer.

Questions to ask vendors

  1. Which of our workflows branch, wait for people, or must survive restarts?
  2. Would the Functional API give us persistence and interrupts with fewer code changes?
  3. Who on the team knows LangGraph well enough to debug it in production?
  4. If we drop the framework in a year, what would we have to rewrite?

Red flags

  • A three-step linear pipeline wrapped in a state graph.
  • Choosing a framework for its popularity when the workflow needs none of its capabilities.
  • Building checkpointing and approvals by hand after rejecting a framework that provides them.
  • Business logic coupled to graph state so tightly that it cannot be tested outside the graph.

Products in this piece

Sources

Official documentation
5
Public source
9
  1. LangChain docs: Runtimes, frameworks, and harnessesOfficial documentationdocs.langchain.com
  2. LangGraph docs: Functional APIOfficial documentationdocs.langchain.com
  3. LangGraph docs: Graph APIOfficial documentationdocs.langchain.com
  4. LangGraph docs: InterruptsOfficial documentationdocs.langchain.com
  5. LangGraph docs: PersistenceOfficial documentationdocs.langchain.com
  6. Nicola Richli (yeos.ai) on dev.to: Why We Removed LangGraph From Our AI Platform (Jul 27, 2026)Public sourcedev.to
  7. DeadLocker on dev.to: Why I Stopped Using LangGraph (Apr 23, 2026)Public sourcedev.to
  8. Ali Suleyman Topuz on dev.to: Harness, Loop, and Graph, the same agent three ways (Aug 28, 2026)Public sourcedev.to
  9. sunnydachs on dev.to: The same agent in Strands, LangGraph, and CrewAI with every LLM call recorded (Sep 21, 2026)Public sourcedev.to
  10. Brendan McManus, Michael Ran, and Santi Weight (Bridgewater): How Bridgewater Built an AI Analyst, Interrupt 26 (Jul 24, 2026)Public sourceyoutube.com
  11. Hacker News comment on replacing homegrown checkpointing with LangGraph in Pizza Bot (Sep 16, 2026)Public sourcenews.ycombinator.com
  12. Pedro Rodriguez (Airbnb): How Airbnb builds Trust for Guests and Hosts using AI Agents with LangGraph, Interrupt NYC 2026 (Sep 29, 2026)Public sourceyoutube.com
  13. Senthil Velu Sundaram and Akash Ashok (Rippling): Rippling's Playbook, Interrupt 26 (Jul 13, 2026)Public sourceyoutube.com
  14. Karthik Ramgopal and Daniel Hewlett (LinkedIn): Lessons Learned from Building LinkedIn's First Agent, QCon London 2025, transcript on InfoQ (Dec 31, 2025)Public sourceinfoq.com