Skip to main content

AI SDK vs LangGraph: A TypeScript Toolkit or a Stateful Agent Runtime?

Earendil's founder and 21st.dev outgrew the AI SDK's agent loop, and yeos.ai removed LangGraph after months of thinking more about the framework than its own logic. GitLab and Qodo carried LangGraph to production, and openstatus runs its Slack agent on the AI SDK.

Reading time
9 min read
Sources
37 cited
In this piece

GILD verdict

Choose the AI SDK for an agent inside a TypeScript web product, and LangGraph when runs must pause for people and survive restarts.

The workflow
a TypeScript team deciding whether its agent lives inside the product's request loop or in a runtime that keeps state between steps
The decisive evidence
  • Reported3 of 7 named teams adopted one; What teams report below sets out each account.
  • DocumentedLangGraph checkpointers persist each thread for resumption and human review, while the AI SDK's ToolLoopAgent runs in memory and WorkflowAgent adds durable steps on Workflow DevKit.2133
  • GILD analysisNo named team in GILD's research ran both on the same workload, so which one costs less engineering time is unresolved. GILD's calculation from published rates puts 60,000 requests a month at US$1,656 on either when self-hosted, and US$2,055.12 for LangGraph on LangSmith's smallest dedicated deployment.
The tradeoff
GitLab and Qodo built on LangGraph for runs inspected step by step; an AI SDK run fits in a request or a WorkflowAgent. LangGraph's graph and checkpoints cost design time on agents whose steps run in order, while the AI SDK leaves durable state, memory and long-run tracing to WorkflowAgent or a runtime you add.14562133
What would change the call
The call moves when a team publishes the same agent run on both, or when WorkflowAgent's open tracing and approval issues close and a named team reports months of durable runs on it.

The named accounts split on one question: does the agent need a runtime that keeps its state? GitLab and Qodo took LangGraph to production for checkpointed, step-by-step control, while yeos.ai removed it in July 2026 because the team spent more thought on LangGraph than on its own business logic. openstatus ships an approval-gated agent on the AI SDK, and Earendil and 21st.dev outgrew its loop. Both are free, and GILD's bill for 60,000 requests a month is US$1,656 on either, almost all of it model tokens.

What teams report

Failures and incidents 1

  1. EarendilOn AI SDK

    Ronacher's team used only the AI SDK's provider abstractions under an agent loop it drove itself, and he wrote on Nov 21, 2025 that he would not make that choice again, after Anthropic's web search tool kept breaking message history through the SDK.

    “The choice we made a while back was to adopt the Vercel AI SDK but only the provider abstractions, and to basically drive the agent loop ourselves. At this point we would not make that choice again.”
    Armin Ronacher, Founder, EarendilArmin Ronacher's Thoughts and Writings, , write-up

Left or turned down 2

  1. yeos.aiOn LangGraph

    yeos.ai ran its enterprise AI platform on LangGraph for months, then removed it completely and wrote plain, separately tested Python components with a light orchestration layer of its own (Jul 27, 2026).

    “Over time we found ourselves thinking more about LangGraph than about our own business logic.”
    Nicola Richli, Builder of yeos.ai, yeos.aiDEV Community, , write-up
  2. PydanticOn LangGraph

    Looking for a framework for Pydantic's Logfire work, Colvin reviewed LangGraph, CrewAI and others, rejected them as not type safe, and the team built Pydantic AI instead (Software Engineering Daily, Dec 4, 2025).

    “Started looking at them and was super disappointed by what I found. They're not type safe. I think type safety is incredibly important and only getting more important with AI's writing code.”
    Samuel Colvin, Founder, PydanticSoftware Engineering Daily, , around 13:08

Switched 1

  1. 21st.devOn AI SDK

    21st.dev started its multi-tenant agent backend on the AI SDK and migrated to the Claude Code SDK for a complete agent loop, then built sandboxes, persistent threads and approval screens itself (Apr 7, 2026).

    “…we went through this exact thing. started on vercel ai sdk, migrated to claude code sdk hoping to get the full agent loop out of the box. same conclusion - it's built for single-user cli, not multi-tenant web backends.”
    SerafimKorablev, Agent infrastructure builder, 21st.devHacker News, , post

Adopted 3

  1. GitLabOn LangGraph

    GitLab chose LangGraph as the foundation of GitLab Duo Agent Platform, and its Flow Registry compiles YAML into LangGraph flows; GitLab says that cut its own code per agentic flow by 45% (Sep 22, 2026).

    “We researched available AI frameworks and selected LangGraph, an agent runtime and low-level orchestration framework from LangChain, as the foundation for GitLab Duo Agent Platform.”
    GitLab Duo Agent Platform engineering, Engineering blog authors, GitLabGitLab blog, , write-up
  2. QodoOn LangGraph

    Qodo picked LangGraph for its coding agent's first prototype around November 2024 and kept it through production, with graph nodes for gathering context, planning, writing code and validating it (Mar 21, 2025).

    “…we settled on LangGraph for our initial proof of concept. We were pleasantly surprised to see that the framework has proven flexible and mature enough to carry us all the way to production.”
    Sagi Medina, Qodo engineering, QodoQodo blog, , write-up
  3. openstatusopenstatus built its production Slack agent on the AI SDK with Claude Sonnet and six tools, and every tool that would change data returns a draft a person confirms (Feb 27, 2026).
    “We use the Vercel AI SDK with Claude Sonnet. The agent has 6 tools:…”
    Thibault Le Ouay Ducasse, Engineer and author of the post, openstatusopenstatus blog, , write-up

Choosing between AI SDK and LangGraph

Choose AI SDK if

  • The agent is a feature inside a TypeScript web product with chat UI and streaming, as openstatus's approval-gated Slack agent is (Feb 27, 2026).
  • Your loops are tool-calling loops with approvals and stop conditions that you would rather write in plain TypeScript than as a graph. AI SDK 7's WorkflowAgent adds durable steps, though October 2026 issues report gaps in its tracing and approval resume.
  • You want one API across providers without LangChain's abstractions. aicommits replaced all its custom provider code with AI SDK 5 (Oct 17, 2025).

Choose LangGraph if

  • Agents run for a long time, pause for people, and must resume from a checkpoint, the case GitLab's Duo Agent Platform (Sep 22, 2026) and Qodo's coding agent (Mar 21, 2025) built on.
  • You need explicit control over each step, mixing fixed nodes with model-driven ones. Budget design time for the graph: yeos.ai removed LangGraph in July 2026 once its workflows proved mostly sequential.
  • Your team already uses LangChain or LangSmith, or runs the same agents in Python.

Side by side

DimensionAI SDKLangGraph
What teams reportNamed accounts only. No team in GILD's research ran both on the same workload.openstatus runs an approval-gated Slack agent on it with Claude Sonnet (Feb 27, 2026). Earendil's founder kept only its provider layer under his own loop and would not choose it again (Nov 21, 2025), and 21st.dev migrated to the Claude Code SDK for a fuller loop (Apr 7, 2026).123GitLab built Duo Agent Platform on it and says its YAML flow registry cut code per flow by 45% (Sep 22, 2026), and Qodo carried its coding agent from first prototype to production (Mar 21, 2025). yeos.ai removed it after months (Jul 27, 2026), and Pydantic's founder rejected it as not type safe (Dec 4, 2025).4567
What you payList prices in US dollars. Model tokens are extra on both.Free under the Apache 2.0 license; model tokens billed by each provider, or at provider list price through AI Gateway credits with no markup2829Free under the MIT license. LangSmith Deployment is priced on the Plus plan at US$39 a seat a month with one free small serverless deployment, then by compute in LangChain Standard Units at US$1.00 each3637
60,000 requests a month, 10 engineersGILD's calculation from published rates, Oct 28, 2026. Inputs: 60,000 requests a month, each with 10,000 input tokens, 7,000 of them read from cache and 1,000 written to it, and 2,000 output tokens, on Claude Sonnet 5.5 at US$2, US$0.10, US$2.50 and US$10 per million; one US$24 DigitalOcean droplet; no high availability, managed database or paid tracing.US$1,656 a month: US$1,632 of Claude Sonnet 5.5 tokens and US$24 for one 2-vCPU, 4 GiB server that runs the app and its state store. No license fee.161728US$1,656 a month self-hosted on the same server. On LangSmith Deployment, US$2,055.12: the same tokens, one Plus seat at US$39 and US$384.12 for the smallest dedicated deployment running all 720 hours.16171836
Level of abstractionFunctions and classes in your code: generateText and streamText loops, ToolLoopAgent, WorkflowAgent, and HarnessAgent20A low-level orchestration runtime: state graphs or a functional API with nodes, edges, and subgraphs32
Agent stateIn memory by default: ToolLoopAgent loses progress on a crash. WorkflowAgent persists each step on Workflow DevKit and resumes after restarts; October 2026 issues report no trace span for the whole run and an approval resume that fails after a user sends media91021Checkpointers persist each thread's state for resumption, human-in-the-loop, time travel, and fault tolerance; stores hold memory across threads33
Human approvaltoolApproval per tool or by function, with optional HMAC-signed approvals; durable across suspension with WorkflowAgent2122Interrupts pause a graph at any node and resume from the checkpoint33
Models46 first-party provider integrations and 58 community providers; a plain model string routes through AI Gateway, the default global provider2627Through LangChain model integrations, though LangChain itself is optional32
User interfaceuseChat, useCompletion, and useObject for React, Vue, Svelte, and Angular, plus AI Elements components23Agent Chat UI and frontend streaming helpers. AI SDK UI renders LangGraph streams through Vercel's @ai-sdk/langchain adapter; users reported adapter bugs in July and August 2026 that dropped text in CommonJS servers, broke subagent streams and mislabelled reused tool calls, each fixed within a week11121325
DeploymentAny Node.js 22 or later runtime, on Vercel or elsewhere; durable runs on Workflow DevKit2130Your own servers, or LangSmith Deployment in LangChain's cloud, hybrid, or self-hosted on Enterprise1836
TracingOpenTelemetry registered once for every call, Node.js tracing-channel events, and per-step timing, sent to Datadog, Langfuse, Braintrust, Sentry, LangSmith, or any OpenTelemetry backend24LangSmith tracing turned on with an environment variable, plus LangSmith Engine to diagnose failures35
Release cadenceApache 2.0; AI SDK 5, 6, and 7 within eleven months, with patches still published on all three lines31MIT; the latest graph code applies to every resumed thread, so each change must stay compatible with saved checkpoints34

What practitioners report, side by side

Each product's figures come from its own practitioners, for the group you pick.

Whose sources to count
Compare AI SDK with
  • LangGraph

Overall signal

All practitioners rate AI SDK +36, 11 points above LangGraph at +25. Most of the gap is in complaints, with 8 of LangGraph's 62 sources negative against 5 of AI SDK's 85.

The score counts the authors from all practitioners that take a side, one vote each with their latest view, and is how far positive votes lead negative ones, per 100 votes, so AI SDK's +36 rests on votes split 35 positive, 43 mixed and 5 negative and LangGraph's +25 on 23, 30 and 8.

A lead of a fifth of the votes reads positive and a lead of half strong positive, with the same lines below zero. The dots show each source, positive, mixed, negative. Build one pilot agent to measure the glue code and debugging time the framework adds.

Footprint on the AI Application Platform stack

They differ on five of 9 layers. AI SDK owns one that LangGraph does not. Coverage is each product's placement on this stack, as its product page shows it. Core is a job the product owns; Supports and Touches are jobs it helps with. Coverage says nothing about how well a product does them.

Layers where AI SDK and LangGraph differ
LayerAI SDKLangGraph
Model
Model gatewaySupportsTouches
Build
Tool useCoreSupports
Data
RetrievalSupportsTouches
Operate
ObservabilitySupportsTouches
Cloud deploymentTouchesSupports
The 4 layers where they match
Layers where AI SDK and LangGraph match
LayerAI SDKLangGraph
Model
Model APIsTouchesTouches
Build
OrchestrationCoreCore
Evaluate
EvaluationTouchesTouches
Operate
GuardrailsTouchesTouches

What practitioners praise

Among all practitioners, AI SDK alone has four praise themes that reach 5 sources from 3 authors. One API Across Providers and Streaming Chat & Generative UI lead, at 16 of 17 and 10 of 12. LangGraph alone has four praise themes that reach 5 sources from 3 authors. Explicit Control Flow and Checkpointing & Durable State lead, at 22 of 25 and 10 of 18.

What practitioners praise, All practitioners
Praised forAI SDKLangGraph
One API Across Providers16 of 17Not a theme in its sources
Streaming Chat & Generative UI10 of 12Not a theme in its sources
TypeScript Design & Types6 of 10Not a theme in its sources
Agent Loop, Tools & Approvals4 of 12Not a theme in its sources
Explicit Control FlowNot a theme in its sources22 of 25
Checkpointing & Durable StateNot a theme in its sources10 of 18
Production ReadinessNot a theme in its sources9 of 15
Human-in-the-Loop & Time TravelNot a theme in its sources4 of 5

Each count is the sources that praise a theme, or raise it as a concern, out of those that discuss it. A row pairs the two products when both carry a theme under the same or an equivalent name.

A count ending in "so far" has under 5 sources from 3 authors among all practitioners. "Not a theme in its sources" means GILD found no theme of that name in that product's sources.

What practitioners raise as concerns

Among all practitioners, AI SDK alone has five concern themes that reach 5 sources from 3 authors. Provider Translation Bugs and Breaking Changes Between Majors lead, at 14 of 15 and 9 of 9. LangGraph alone has three concern themes that reach 5 sources from 3 authors. Complexity & Overhead and Breaking Changes & Docs lead, at 10 of 13 and 9 of 10.

What practitioners raise as concerns, All practitioners
Raised as a concernAI SDKLangGraph
Provider Translation Bugs14 of 15Not a theme in its sources
Breaking Changes Between Majors9 of 9Not a theme in its sources
UI Hook Reliability8 of 8Not a theme in its sources
Durability & Production Gaps8 of 10Not a theme in its sources
Memory & Performance5 of 5Not a theme in its sources
Complexity & OverheadNot a theme in its sources10 of 13
Breaking Changes & DocsNot a theme in its sources9 of 10
Typing & Language SupportNot a theme in its sources4 of 5

37 sources

  1. openstatus blog: How we built our Slack agent (Feb 27, 2026)Public sourceopenstatus.dev
  2. Armin Ronacher: Agent design is still hard (Nov 21, 2025)Public sourcelucumr.pocoo.org
  3. Hacker News comment from a 21st.dev builder on moving from the AI SDK to the Claude Code SDK (Apr 7, 2026)Public sourcenews.ycombinator.com
  4. GitLab blog: How GitLab reduced code per agentic flow by 45% (Sep 22, 2026)Public sourceabout.gitlab.com
  5. Qodo blog: Why we chose LangGraph to build our coding agent (Mar 21, 2025)Public sourceqodo.ai
  6. Nicola Richli, DEV Community: Why we removed LangGraph from our AI platform (Jul 27, 2026)Public sourcedev.to
  7. Software Engineering Daily: Pydantic AI with Samuel Colvin (Dec 4, 2025)Public sourcesoftwareengineeringdaily.com
  8. Luca Becker: aicommits v1.0.0 and the move to AI SDK 5 (Oct 17, 2025)Public sourceluca-becker.me
  9. vercel/ai issue #23618: a WorkflowAgent run has no root trace span (Oct 20, 2026)Public sourcegithub.com
  10. vercel/ai issue #22013: WorkflowAgent approval resume fails after user media (Oct 4, 2026)Public sourcegithub.com
  11. vercel/ai issue #17863: the LangChain adapter drops text in CommonJS hosts (Jul 23, 2026)Public sourcegithub.com
  12. vercel/ai issue #18504: the LangChain adapter drops LangGraph subgraph namespaces (Aug 6, 2026)Public sourcegithub.com
  13. vercel/ai issue #18831: the LangChain adapter loses a tool call whose id a later LangGraph step reuses (Aug 13, 2026)Public sourcegithub.com
  14. r/vercel: Is Vercel AI SDK actually good for building real AI agents? (May 1, 2026)Public sourcereddit.com
  15. r/vercel comment on hitting limits once flows stopped being linear (Apr 15, 2025)Public sourcereddit.com
  16. Anthropic: Claude API pricing, as listed on Oct 28, 2026Public sourceplatform.claude.com
  17. DigitalOcean: Droplet pricing, 2 vCPU and 4 GiB at US$24 a month, as listed on Oct 28, 2026Public sourcedigitalocean.com
  18. LangSmith docs: Cloud platform features and deployment sizesOfficial documentationdocs.langchain.com
  19. AI SDK docs: IntroductionOfficial documentationai-sdk.dev
  20. AI SDK docs: Agents overviewOfficial documentationai-sdk.dev
  21. AI SDK docs: WorkflowAgentOfficial documentationai-sdk.dev
  22. AI SDK docs: Tools and tool callingOfficial documentationai-sdk.dev
  23. AI SDK docs: AI SDK UI overviewOfficial documentationai-sdk.dev
  24. AI SDK docs: TelemetryOfficial documentationai-sdk.dev
  25. AI SDK adapters: LangChain and LangGraphOfficial documentationai-sdk.dev
  26. AI SDK providers (46 first-party integrations)Official documentationai-sdk.dev
  27. AI SDK docs: Choosing a provider (AI Gateway as the default global provider)Official documentationai-sdk.dev
  28. vercel/ai LICENSE (Apache 2.0)Official documentationgithub.com
  29. Vercel docs: AI Gateway pricingOfficial documentationvercel.com
  30. AI SDK docs: Migration guide, AI SDK 7.0Official documentationai-sdk.dev
  31. vercel/ai releases on GitHubOfficial documentationgithub.com
  32. LangChain docs: LangGraph overview (TypeScript)Official documentationdocs.langchain.com
  33. LangChain docs: LangGraph persistenceOfficial documentationdocs.langchain.com
  34. LangChain docs: LangGraph backward compatibilityOfficial documentationdocs.langchain.com
  35. LangGraph product pageOfficial documentationlangchain.com
  36. LangChain pricing (LangSmith plans and Deployment rates)Official documentationlangchain.com
  37. langchain-ai/langgraphjs on GitHub (MIT license)Official documentationgithub.com