
Mastra
The open-source TypeScript framework for building AI agents, from the team behind Gatsby.
Thesis
- 01
JavaScript is where the next ten million agent developers will build. 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 the framework built for the audience that's already there.
- 02
The framework wars are now about agents, not pages. React, Next.js, and Gatsby fought over rendering and routing. The next round is steps, tools, memory, and RAG. Mastra ships those as TypeScript-native primitives —
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] They're running the same OSS playbook on a category that's an order of magnitude larger than static site generators ever were.
- 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, 25k+ stars in twelve months, and TypeScript-native by default is exactly the shape coding agents reach for.[3] [13]
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.[3] [13]
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.
Every decade of web development has a defining framework war. The last decade's was about how a page got rendered. This decade's is about how an agent gets orchestrated — and the same OSS playbook that won the last round wins this one.
The framework primitives have changed. The distribution mechanics haven't.
The primitives are different. React shipped components. Next.js shipped routes and SSR. Gatsby shipped a build pipeline. Mastra ships steps, tools, memory, RAG, and evals. The category boundaries are different — but the framework shape is the same: a TypeScript-first DX, opinionated primitives, and a sharp opinion about what belongs inside the framework vs. outside it.[3]
The distribution is identical. OSS-first, MIT/Apache 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 the same play with Next.js to a $3.25B valuation.[8] Mastra is running it again — and the addressable market this time is every web team building any AI feature.
The team has done this before. Gatsby was an organic OSS movement before it was a company — the team has the muscle memory for community management, contributor scaling, ecosystem building, and the painful inflection between "great OSS project" and "profitable framework company." That muscle is the actual moat.
The Gatsby team didn't win the last framework war on accident, and they're not picking the next one casually. When operators who shipped 55k stars run the same playbook on a 10× larger market, the prior is they get to a serious outcome again.
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.
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.
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.
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)



