Vercel AI SDK vs LangChain / LangGraph
Vercel AI SDK and LangChain / LangGraph side by side: what each one is, verified plan pricing and install commands where we have them, and the full review of each.
Vercel AI SDK
EssentialThe TypeScript toolkit for building AI apps. Unified API across OpenAI, Anthropic, Google. Streaming, tool calling, structured output, multi-step agents. 27K+ GitHub stars.
LangChain / LangGraph
Most popular LLM framework. 100K+ GitHub stars. Chains, RAG, vector stores, tool use. LangGraph adds stateful multi-agent workflows with cycles and persistence.
At a glance
| Field | ||
|---|---|---|
| Category | AI Frameworks | AI Frameworks |
| Website | sdk.vercel.ai | langchain.com |
| Pricing | AI SDK - free and open source (Apache-2.0); Vercel AI Gateway (the default when you pass a model string) - free tier with $5/month credit on Free Tier eligible models, then pay-as-you-go credits at provider list rates with zero markup; bring-your-own-key on the paid tier; Provider packages such as @ai-sdk/openai or @ai-sdk/anthropic - billed by each provider on your own API key | LangChain and LangGraph libraries - free and open source (MIT); LangSmith Developer - $0/seat per month: 1 seat, up to 5k base traces/mo, then pay as you go; LangSmith Plus - $39/seat per month: up to 10k base traces/mo, unlimited seats, 1 free small serverless deployment, then pay as you go; LangSmith Enterprise - custom pricing, self-hosted and hybrid deployment, custom SSO, support SLA; Usage beyond plan allowances is metered in LangChain Standard Units (1 LSU = $1) |
| Install | npm install ai or npm install @ai-sdk/openai @ai-sdk/anthropic @ai-sdk/google or npx skills add vercel/ai | pip install -U langchain or pip install -U langgraph or npm install langchain @langchain/core |
| Models | Pass a provider/model string such as anthropic/claude-opus-5.5 or openai/gpt-6-astra to route through Vercel AI Gateway by default, or import a provider package (OpenAI, Anthropic, Google, xAI, Azure, Amazon Bedrock, Mistral, DeepSeek, Groq and more) to call it directly. HarnessAgent also runs agent harnesses such as Claude Code and Codex through the same stream primitives. | Model-agnostic: install a provider package (langchain-openai, langchain-anthropic, Google Gemini, AWS Bedrock, Azure, OpenRouter and many more) and pick a model with init_chat_model, for example init_chat_model("google_genai:gemini-3.7-flash"). New model names work without a LangChain update because provider packages pass them straight to the provider's API. |
| Last verified | October 25, 2026 | October 26, 2026 |
In Depth
Vercel AI SDK
The Vercel AI SDK is the standard TypeScript library for building AI-powered applications. It provides a unified interface - write code once, swap between OpenAI, Anthropic, Google, or any provider. Key features: streaming chat responses, structured JSON output with Zod schemas, tool calling with automatic execution, and multi-step agent loops. The `ai` core package handles the LLM interaction, `@ai-sdk/react` provides React hooks (useChat, useCompletion), and `ai/rsc` enables server-side streaming with React Server Components. Over 27K GitHub stars. I use it in nearly every project and built a complete course on it for this site.
LangChain / LangGraph
LangChain is the most popular framework for building LLM applications, with over 100K GitHub stars. It provides abstractions for chains (sequential LLM calls), RAG (retrieval-augmented generation with any vector store), tool use, and output parsing. LangGraph extends it with stateful, graph-based workflows - agents that can loop, branch, and persist state across interactions. A more recent addition is 'Deep Agents' for long-running autonomous tasks. LangSmith provides observability and tracing. The ecosystem is massive - integrations with every model provider, vector database, and tool imaginable. I cover LangChain in my AI Agent Frameworks course.
FAQ
Answers taken from each tool's verified fact sheet, with the date it was last checked.
How much does Vercel AI SDK cost?
As of October 25, 2026: AI SDK - free and open source (Apache-2.0); Vercel AI Gateway (the default when you pass a model string) - free tier with $5/month credit on Free Tier eligible models, then pay-as-you-go credits at provider list rates with zero markup; bring-your-own-key on the paid tier; Provider packages such as @ai-sdk/openai or @ai-sdk/anthropic - billed by each provider on your own API key. Source: AI SDK introduction, AI SDK providers and models, vercel/ai README, vercel/ai releases, ai package changelog, @ai-sdk/workflow 2.0.0 release, Vercel AI Gateway pricing.
How do I install Vercel AI SDK?
Official install commands as of October 25, 2026: npm install ai or npm install @ai-sdk/openai @ai-sdk/anthropic @ai-sdk/google or npx skills add vercel/ai.
Which models does Vercel AI SDK use?
As of October 25, 2026: Pass a provider/model string such as anthropic/claude-opus-5.5 or openai/gpt-6-astra to route through Vercel AI Gateway by default, or import a provider package (OpenAI, Anthropic, Google, xAI, Azure, Amazon Bedrock, Mistral, DeepSeek, Groq and more) to call it directly. HarnessAgent also runs agent harnesses such as Claude Code and Codex through the same stream primitives.
How much does LangChain / LangGraph cost?
As of October 26, 2026: LangChain and LangGraph libraries - free and open source (MIT); LangSmith Developer - $0/seat per month: 1 seat, up to 5k base traces/mo, then pay as you go; LangSmith Plus - $39/seat per month: up to 10k base traces/mo, unlimited seats, 1 free small serverless deployment, then pay as you go; LangSmith Enterprise - custom pricing, self-hosted and hybrid deployment, custom SSO, support SLA; Usage beyond plan allowances is metered in LangChain Standard Units (1 LSU = $1). Source: LangSmith pricing, Install LangChain (Python), Install LangChain (JavaScript), Install LangGraph, LangChain models, langchain 1.4.0 release, langchain-core 1.7.0 release, langgraph releases, langgraphjs releases, LangChain license (MIT).
How do I install LangChain / LangGraph?
Official install commands as of October 26, 2026: pip install -U langchain or pip install -U langgraph or npm install langchain @langchain/core.
Which models does LangChain / LangGraph use?
As of October 26, 2026: Model-agnostic: install a provider package (langchain-openai, langchain-anthropic, Google Gemini, AWS Bedrock, Azure, OpenRouter and many more) and pick a model with init_chat_model, for example init_chat_model("google_genai:gemini-3.7-flash"). New model names work without a LangChain update because provider packages pass them straight to the provider's API.
