
Mastra
The open-source TypeScript framework for building AI agents, from the team behind Gatsby.
25k
GitHub stars
Passed vercel/ai in June 2026 · Apache-2.0
4M/mo
npm downloads
@mastra/core, May 2026 — 9k in Jan 2025
$35M
Total raised
$22M Series A led by Spark Capital, Apr 2026
Thesis
- 01
Most AI app developers already write TypeScript. 72% of full-stack developers already use TypeScript; only 29% of web teams claim Python proficiency.[5] Point72 Ventures puts it bluntly: TypeScript is "becoming the language of choice for AI application development," and web developers — not ML engineers — will lead AI app implementation at scale.[6] Mastra is built for the audience that's already there, not the one a Python framework hopes to convert.
- 02
The frontier moved from rendering pages to orchestrating agents. React, Next.js, and Gatsby fought over rendering and routing. Agent code needs different primitives — steps, tools, memory, RAG, evals — and Mastra ships those as TypeScript-native APIs —
agents,workflows,memory,rag,evals— not a Python port stitched into the JS world.[3] [11] - 03
The founders shipped Gatsby. They know how to win OSS distribution. Sam Bhagwat (CEO, co-founder of Gatsby), Abhi Aiyer (CTO, ex-Netlify principal eng), and Shane Thomas (CPO, ex-Gatsby head of product) scaled Gatsby to 55k+ stars, 4k+ contributors, and $5M ARR before the Netlify acquisition.[2] [4] The same OSS distribution playbook, now running on a much larger category — every web team building any AI feature, vs. the static-site subculture that bought Gatsby.
- 04
Coding agents are the new distribution layer. ChatGPT, Cursor, and Claude Code recommend whatever has the cleanest OSS repo, the most idiomatic SDK, and the simplest install. Apache-2.0,
npm create mastra@latest, a star curve that went 1.5k → 10k in the four weeks around the YC launch and 25k by June 2026, and TypeScript-native by default is exactly the shape coding agents reach for.[13] [16]
Problem
Building a production agent in JavaScript today means stitching together five OSS libraries written for someone else.
Vercel's AI SDK is a thin streaming wrapper. LangChain.js is a port of a Python framework with the wrong idioms — chains instead of typed graphs, callbacks instead of suspend/resume. Memory, RAG, evals, and orchestration each live in their own repo, each with its own opinions, each with its own bug list.
Sam Bhagwat's framing of the gap is direct: "We noticed our friends building AI applications getting stuck debugging prompts, figuring out why their agents called (or didn't call) tools, and writing lots of custom memory retrieval logic."[10] Every senior JS engineer at every YC AI company today wants to ship an agent. The friction is real — and the only existing frameworks are either Python-shaped or too thin to matter.
The cost isn't the stitching. It's the chilling effect on what gets shipped. The team that has to integrate four libraries and write its own memory layer ships an agent in a quarter. The team that runs npm create mastra@latest ships one in an afternoon.
72%
of full-stack devs use TypeScript
vs. 29% who claim Python proficiency in web teams
98%
YoY growth in genAI projects
GitHub Octoverse 2024 · application layer is exploding
15%
YoY npm consumption growth
JavaScript ecosystem still expanding faster than any other
Why Now
Three preconditions converged in the same eighteen months.
TypeScript took the application layer, AI moved from research into product, and coding agents started picking the stack. The JS-native agent framework wasn't possible — or necessary — before now.
We noticed our friends building AI applications getting stuck debugging prompts, figuring out why their agents called (or didn't call) tools, and writing lots of custom memory retrieval logic.
Sam Bhagwat[10]
Co-founder & CEO · Mastra
There are at least as many JavaScript developers as Python developers, so now tools are increasingly catering to this widely expanded audience.
Shawn Wang[6]
swyx · Latent Space
TypeScript is becoming the language of choice for AI application development. Web developers — not ML engineers — will increasingly lead AI application implementation at scale.
Point72 Ventures[6]
Perspectives · AI Application Layer
Each precondition on its own is interesting. Together they're a new category.
TypeScript took the application layer. TypeScript adoption tripled from 12% (2017) to 34% (2023) and overtook Java to enter GitHub's top three languages. npm consumption grew 15% YoY in 2024 — the JS ecosystem is still expanding faster than any other.[6] [7] Every modern dev tool ships TS types first.
AI moved from research into product. Generative AI projects grew 98% YoY on GitHub.[7] The dominant model is no longer "a researcher writes a notebook" — it's "a Next.js engineer ships an agent feature inside a SaaS app." The audience and the tooling have inverted.
Coding agents pick the stack. Developers ask ChatGPT how to ship an agent. ChatGPT, Cursor, and Claude Code recommend whatever has the cleanest OSS repo, the most idiomatic SDK, and the most-cited examples. Apache-2.0, a one-line install, and 25k stars is exactly the surface area coding agents are tuned to surface — and the download curve confirms the loop is running: @mastra/core grew from 9k monthly downloads in January 2025 to ~4M in May 2026.[13] [16] [17]
Web developers — not ML engineers — will increasingly lead AI application implementation at scale. TypeScript is the natural language for that work.
How It Works
One framework. Six primitives. The TypeScript stack a JS engineer reaches for to ship an agent in an afternoon.
The local dev playground is where the addiction starts.
Install in one command. npm create mastra@latest scaffolds the project, drops a local dev server with traces and logs, and gives the developer an agent calling a model inside ninety seconds. That's the Vercel-era expectation — and the bar Python frameworks structurally can't meet.[13]
Production observability, day one. OpenTelemetry tracing, eval metrics, and a real-time dashboard shipped in the same package. Compatible with Datadog, New Relic, and the broader OTel ecosystem the rest of the JS world already uses.[11]
Deploy anywhere a Node runtime runs. Vercel, Cloudflare Workers, Netlify, AWS, self-hosted — whatever the team's existing JS deploy target is. The agent ships alongside the rest of the app, not as a separate Python microservice the JS engineer can't debug.
The Framework Wars Are Now About Agents
React won components. Next.js won rendering. Mastra is the bet on what comes next.
The last generation of frameworks fought over rendering and routing. The next one is fighting over agent orchestration, and the OSS distribution playbook that worked last time still fits the shape of the problem.
Different primitives. The same OSS distribution motion that worked last time.
React shipped components. Next.js shipped routes and SSR. Gatsby shipped a build pipeline. Mastra ships agent primitives — steps, tools, memory, RAG, evals. The category is different; the framework shape is recognizable: a TypeScript-first DX, opinionated primitives, and a sharp opinion about what belongs in the framework vs. outside it.[3]
The distribution motion is the part the team has run before. OSS-first, permissive license, GitHub stars as the leading indicator, paid cloud runtime as the monetization vector — Gatsby ran this play to 55k stars and $5M ARR before the Netlify acquisition.[4] Vercel ran a related play with Next.js to a $3.25B valuation.[8] LangChain ran it in Python to a $1.25B Series B in October 2025 — on a reported $12–16M of ARR, which is what the market currently pays for the category leader's monetization curve.[21] Mastra is running it again, into a category — every web team building any AI feature — that is materially bigger than the static site subculture that bought Gatsby.
The hard, non-obvious work is the part the Gatsby team has already done once: community management, contributor scaling, ecosystem building, and the painful inflection between "great OSS project" and "profitable framework company." That's the reason to underwrite the bet — not any single primitive in the SDK.
0 → 25k GitHub stars in 22 months — and past Vercel's AI SDK repo
Chart
Sampled stargazer timestamps. The repo opened Aug 2024; the YC W25 launch took it from 1.5k to 10k inside roughly four weeks (Feb–Mar 2025). Steady compounding since: 20k at the 1.0 release (Jan 2026), 24,989 on Jun 12, 2026 — edging past vercel/ai (24,824).
Source · GitHub API, stargazer sampling · Jun 12, 2026
GitHub API stargazer sampling, Jun 12 2026[16] · vercel/ai comparison[22]
The Gatsby team didn't get to 55k stars by accident, and they're not running this playbook again casually. When operators with a proven OSS distribution motion pick a category that's materially bigger than their last one, the prior is they reach a serious outcome.
Market
The densest buyer pool is every YC AI batch — and beyond that, every web team.
Inside YC, Mastra is already the JS-first default — adoption spans W25, S25, F25, and P26 batches, with companies like Autumn (S25), Fireworks AI, and dozens of others running Mastra-powered agents in production.[1] [15] The dense YC AI cohort is exactly the acquisition channel that compounds — every YC company in production is a forcing function for the next batch's choice. And the buyer pool stopped being startups-only in 2026: the Series A announcement named Salesforce, Workday, MongoDB, Brex, Indeed, and Marsh McLennan — whose Mastra-built internal search serves 100k+ employees a day — as customers.[18]
Beyond YC, the addressable market is every web team building AI features. The TypeScript developer base is 17M+ globally and growing 15%+ YoY.[6] [7] Every web team eventually ships an agent feature; very few will context-switch their stack to Python to do it. The framework that wins JS wins the application layer.
Every YC AI company is an agent framework decision in waiting. Mastra should be the answer by default — and that's how the next decade of AI application infrastructure gets written.
Traction — June 2026 update
Sixteen months after this memo: a 1.0 release, two rounds, and a ~440x download curve.
We wrote this memo in February 2025 at ~1.5k GitHub stars. The milestones since are the reason we keep underwriting the position.
@mastra/core npm downloads: 9k → 4M per month in 17 months
Chart
Monthly registry downloads, January 2025 through May 2026 (last full month). The curve is still convex — each of the last four months added more absolute volume than the entire first year. Weekly run-rate stood at ~887k in mid-June 2026.
Source · npm registry API · api.npmjs.org · Jun 12, 2026
npm registry range API[17] · weekly point-in-time[22]

Competitive landscape
Four categories of competition. Mastra is positioned against all of them.
Each category has a structural limitation — language idiom, scope depth, or vendor lock-in. Mastra's OSS + TypeScript-native + full-stack stance is the answer to all four.
Weekly npm downloads, agent-framework packages — June 2026
Chart
Vercel's ai package is the model-interface layer most frameworks (including Mastra) sit on, so its 12.4M is the ecosystem ceiling, not a direct competitor count. Among full agent frameworks, Mastra at 0.89M weekly is within 3x of LangChain's JS packages despite launching two years later — and growing faster than every bar to its left.
Source · npm registry API, week ending Jun 11, 2026
npm registry point-in-time API[22]
LangChain's gravity is Python's gravity. Vercel's scope is the UI layer. OpenAI's framework is model-vendor lock-in. The opening in the middle — TypeScript-native, full-stack, model-agnostic — is exactly where Mastra is building.
Founder deep dive
Three founders, one prior framework with 55k stars, and a chip on the shoulder about what could have gone bigger.
Founder & team
Risks & mitigations
What we're watching
References
- [1]Mastra — Product homepage
- [2]Y Combinator — Mastra company profile (W25, 30 employees, SF)
- [3]GitHub — mastra-ai/mastra (Apache-2.0, 25k+ stars, 2.2k+ forks)
- [4]GitHub — gatsbyjs/gatsby (55k+ stars, 4k+ contributors — prior OSS framework by the same team)
- [5]PureCode — TypeScript vs. Python developer demographics
- [6]Point72 Ventures — TypeScript: enterprise-ready and the ideal option for AI application development
- [7]GitHub Octoverse 2024 — TypeScript adoption, npm consumption +15% YoY, generative AI projects +98% YoY
- [8]TechCrunch / public filings — LangChain $25M Series A (Sequoia, Feb 2024); Vercel $250M Series E (Accel, May 2024)
- [9]Netlify — State of Web Development / framework popularity
- [10]Mastra Launch — YC Launch post ("If you hate Langchain, you'll love Mastra")
- [11]Mastra docs — Agents, workflows, RAG, memory, evals, model routing (90+ providers)
- [12]Netlify — State of the JAMstack 2020 (Gatsby usage at enterprises)
- [13]Mastra — npm create mastra@latest install (single-command setup)
- [14]Mastra Discord — community channel referenced in repo README
- [15]Orange Collective — internal portfolio (Mastra is in production at multiple OC portfolio companies, including Autumn; OC participated in the Oct 2025 seed)
- [16]GitHub API — mastra-ai/mastra stargazer history (24,989 stars as of Jun 12, 2026; trajectory sampled from starred_at timestamps)
- [17]npm registry API — @mastra/core monthly downloads, Jan 2025 – Jun 2026 (9,018 → 3,966,414/month)
- [18]Mastra Blog — "We raised a $22M Series A" (Spark Capital, Apr 9, 2026; $35M total; Mastra Studio, Server, Memory Gateway; Brex, Sanity, Indeed, Marsh McLennan, MongoDB, Workday, Salesforce, Replit customers)
- [19]TechNews180 — Mastra raises $13M seed (Oct 2025; YC-led, 120+ investors incl. Paul Graham, Guillermo Rauch, Amjad Masad, Gradient Ventures, SV Angel, Orange Collective)
- [20]Mastra Blog — Announcing Mastra v1 beta (Nov 6, 2025); 1.0 stable shipped Jan 21, 2026 with 300k+ weekly npm downloads
- [21]TechCrunch — LangChain hits $1.25B valuation with $125M Series B led by IVP (Oct 2025; reported ARR $12–16M)
- [22]npm registry API — weekly downloads, week ending Jun 11, 2026: ai 12.45M · @langchain/langgraph 2.56M · langchain 2.41M · @openai/agents 1.03M · @mastra/core 0.89M · llamaindex 0.12M
- [23]GitHub — openai/openai-agents-js (OpenAI Agents SDK for TypeScript, launched Jun 2025)
- [24]Vercel — AI SDK 6 announcement (Agent abstraction, tool-execution approval, DevTools, MCP support)




