For two years the agent-framework conversation has been a Python conversation. LangGraph, CrewAI, AutoGen, the whole Python bracket — if you wrote agents, you wrote them in Python, and the JavaScript side made do with ports and wrappers. That has changed. A TypeScript team building an agent in 2026 keeps hitting the same three names, and the most useful thing to know about them up front is that they are not three answers to one question.
They sit at different layers. Mistaking that for a three-way race is the single most common way TS teams waste a week.
The layer you almost certainly start with
The Vercel AI SDK is a model-and-streaming layer, not an agent framework, and conflating the two is where the confusion begins. What it does superbly: one interface across OpenAI, Anthropic, Google, and the rest, so model="claude-opus-4-8" and a hosted Llama swap with a string; and a streaming UI story — streamText, generative UI, the redesigned useChat hook — that gets tokens onto a React or Svelte page with almost no plumbing.
What it is not is an orchestrator. Its "agent" is a tool-calling loop: the model can call tools across several steps inside one call. There is no durable state that survives a crash, no first-class long-term memory, no graph describing a multi-stage process. That isn't a gap so much as a scope decision. The AI SDK is the layer you stand an agent on. The honest question isn't whether to use it — most TS apps will — it's what, if anything, you put above it.
The batteries-included answer
Mastra, from the team that built Gatsby, is the most complete TS-native attempt at the thing Python developers mean when they say "agent framework." Agents that pick tools and iterate; a workflow engine with explicit control flow — .then(), .branch(), .parallel() — and human-in-the-loop suspend/resume; memory backed by Postgres or LibSQL; a RAG pipeline with chunking, embeddings, and reranking; and evals as first-class primitives rather than an afterthought.
Mastra doesn't compete with the Vercel AI SDK. It builds on it.
That's the tell most comparison posts miss. Mastra uses the AI SDK for model calls and streaming at its edge, then adds the orchestration, memory, and evaluation the SDK deliberately leaves out. So "Mastra vs Vercel AI SDK" is partly a category error — it's closer to "framework vs the library that framework sits on." You reach for Mastra when you want the batteries included and don't want to wire memory, workflows, and evals together by hand.
The low-level orchestration answer
LangGraph.js is the opposite of batteries-included: a low-level engine for modeling an agent as a durable state graph. Its strengths are the ones you only feel under load — execution that persists through failures and resumes from an interruption point, human-in-the-loop inspection of state mid-run, and the precise control over branching and cycles that complex multi-agent systems need. It's the same model as the Python LangGraph, in TypeScript.
And that's the catch worth saying out loud: it is a port. The JS edition follows the Python edition, which means new features land there first and arrive in langgraphjs later. Its ~3k stars against the other two's ~25k reflect that it serves a narrower, more advanced need — durable orchestration — rather than being a worse general-purpose choice.
How to actually choose
The non-obvious move is to stop treating this as a bracket and read it as a stack. Almost every real app uses the Vercel AI SDK and possibly one of the other two. The decision above the SDK is simply how much orchestration you need:
- Just streaming a model to a UI? The AI SDK alone is the whole answer. Don't add a framework you won't use.
- Want agents, memory, RAG, and evals without assembling them? Mastra, the TS-native batteries-included pick.
- Need durable, resumable, fine-grained multi-step control flow? LangGraph.js — most justified when your org already runs Python LangGraph as a service of record and wants the same graph model in both languages.
For a purely TypeScript shop chasing the latest features, the lag in the LangGraph port matters; Mastra avoids it. For a bilingual shop standardizing on one mental model across two runtimes, that same lag is a price worth paying. Either way, the framework war you thought you were refereeing turns out to be three components that mostly want to be installed together.



