Mastra Wants to Bring AI Agents to the Next Million JavaScript Developers
There is a quiet assumption baked into most conversations about building AI: that you'll do it in Python.
It's an understandable assumption. The research ecosystem grew up in Python. The model providers ship Python SDKs first. The most-cited agent frameworks, the notebooks, the tutorials—all Python. If you want to fine-tune a model or wrangle a training pipeline, Python is unquestionably where you live.
But there's a mismatch hiding in plain sight. The people who actually build the products that reach users—the web apps, the dashboards, the SaaS tools, the mobile backends—overwhelmingly write JavaScript and TypeScript. It's the most widely used language on earth by a wide margin. And when those developers want to add an AI agent to the app they're already shipping, they've been asked to context-switch into a second language, a second runtime, and a second deployment story just to call a model and give it some tools.
That gap is the opening Mastra is built to close.
Mastra is an open-source TypeScript framework for building AI agents and AI-powered applications. It gives product developers the primitives they need—agents, tools, workflows, memory, retrieval, evaluations, and observability—as first-class, type-safe building blocks in the language they already use. The pitch is refreshingly direct: you shouldn't have to leave your stack to build with AI. And the people making it have done this before.
The Language Mismatch at the Heart of AI Development
To see why Mastra matters, start with how an AI feature actually gets built inside a normal product company.
A team has a Next.js app. It has a React frontend, a TypeScript backend, a database, and a CI/CD pipeline the team understands. Then a product manager asks for something agentic—a support assistant that can look up orders, a research tool that reads documents and answers questions, a workflow that drafts and routes contracts. Suddenly the team is told the "right" way to do this involves standing up a Python service, learning an unfamiliar framework, and maintaining a parallel codebase that speaks to the rest of the app over an API.
This is friction, and friction compounds. Two languages means two sets of dependencies, two testing stories, two deployment targets, and two mental models for how state flows through the system. It means the frontend engineer who understands the user's problem best is now separated from the AI logic by a service boundary. And it means the type safety that TypeScript developers rely on to move fast—catching mistakes at compile time instead of in production—evaporates the moment the request crosses into a loosely-typed Python process.
None of this is a knock on Python. It's simply the wrong tool for a specific, enormous population of developers: the ones building the application layer. Those developers don't need to train models. They need to use them—reliably, in production, inside the codebase they already own.
Mastra's thesis is that AI application development belongs in the same language as the application. Not as a bridge or a wrapper, but natively.
What Mastra Actually Gives You
Mastra isn't a thin convenience layer over a model API. It's a complete set of primitives for building production agents, each designed to be composed with the others.
Agents. At the core are agents—LLMs equipped with tools and instructions that can reason about a goal, decide which tools to call, and iterate until they reach an answer or hit a stopping condition. Mastra is model-agnostic: the same agent code can run against Claude, GPT, Gemini, Llama, or others, so teams aren't locked into a single provider.
Workflows. Agents are powerful but non-deterministic, and real products often need guardrails. Mastra's workflow engine lets developers combine agents, tools, and plain logic into a single type-safe graph—with sequential steps, parallel branches, conditional logic, and loops. Crucially, workflows are durable: because Mastra persists execution state, a workflow can pause—waiting on human approval, an external event, or a long-running job—and resume exactly where it left off, even much later. That's the difference between a demo script and something you can put in front of customers.
Memory. Agents that forget everything between turns feel broken. Mastra provides a memory system spanning conversation history, working memory, and semantic recall, so an agent behaves coherently across a long interaction and can pull in relevant context from past exchanges.
RAG. For grounding agents in a company's own data, Mastra includes retrieval-augmented generation primitives—chunking, embedding, vector storage, and retrieval—so an agent can answer from your documents, not just its training data.
Evals and observability. This is where Mastra's production orientation shows most clearly. It ships evaluation tooling—model-graded, rule-based, and statistical scorers—so teams can measure agent quality over time instead of guessing. And built-in observability traces every agent decision and captures token usage, latency, and cost, turning the usual black box of "why did the agent do that?" into something you can actually inspect.
MCP support. Mastra speaks the Model Context Protocol in both directions—consuming MCP tools and authoring MCP servers—so agents can plug into the fast-growing ecosystem of standardized tools and expose their own capabilities to other systems.
The through-line is that these aren't disconnected libraries. They're designed as one coherent, type-safe stack, and they run wherever JavaScript runs—inside a Next.js route, a Node server, or deployed as a standalone service.
Built by the People Who Built Gatsby
It's hard to overstate how much the founding team shapes the credibility of a developer framework.
Mastra was founded by Sam Bhagwat, Abhi Aiyer, and Shane Thomas—the team behind Gatsby, the open-source React framework that, at its peak, became one of the most widely adopted tools in the modern web ecosystem before being acquired by Netlify. This is not a group learning how open-source developer tools work for the first time. They spent close to a decade building exactly this kind of company: a framework that millions of developers adopt, a community that has to be earned rather than bought, and the unglamorous production infrastructure that turns a promising library into something teams trust.
Sam Bhagwat, Mastra's CEO, spent years as a Gatsby cofounder and has since written Principles of Building AI Agents, a book Mastra publishes for free—a tell about how the company thinks about developer education as a growth engine. Abhi Aiyer, the CTO, led large engineering organizations at Netlify and built the cloud infrastructure that served Gatsby at scale. Shane Thomas, the CPO, spent years in open source and product at Gatsby before Mastra.
That background matters for a specific reason. The hard part of an agent framework isn't the demo—it's everything after: the durability, the observability, the version upgrades, the community support, the years of maintenance that make developers willing to bet a product on your abstractions. Building a framework that survives contact with production is a distinct discipline, and this team has already done it once at scale. They know what the ten-thousandth developer needs, not just the first.
Open Source as the Distribution Strategy
Mastra is open source, and that's not incidental—it's the entire go-to-market.
Developer tools don't get adopted through top-down sales. They spread bottom-up, one engineer at a time, through GitHub stars, npm installs, documentation people actually enjoy reading, and word of mouth among people who respect each other's judgment. By that measure, Mastra's early traction is striking: the project has accumulated more than 22,000 GitHub stars and well over 300,000 weekly npm downloads, and it reached a 1.0 release—the signal to a cautious engineering lead that the API surface is stable enough to build on.
Open source also solves the deepest fear a developer has about adopting a framework: lock-in. When the code is open, a team can read exactly what the abstraction is doing, extend it, self-host it, and keep running it no matter what happens to the company behind it. For infrastructure meant to sit at the center of a production application, that transparency isn't a nice-to-have—it's a precondition for adoption.
On top of the open-source core, Mastra offers a managed cloud experience—a studio for testing agents and workflows, plus deployment and the AI-focused observability that's tedious to assemble yourself. It's the same proven playbook that has worked across modern developer infrastructure: give away a genuinely great open-source framework, earn the community's trust, and offer a paid platform for the teams that would rather not run it all themselves.
The Signal in the Cap Table
Mastra went through Y Combinator's Winter 2025 batch and raised a $13 million seed round—one that says as much about conviction as it does about capital.
The round was backed by more than 120 investors, including Y Combinator, Paul Graham, Amjad Masad of Replit, Guillermo Rauch of Vercel, Balaji Srinivasan, and the firm Gradient, among many others. Mastra has described it as one of the largest post-YC cap tables in recent memory. The names are telling: these are people who have built or funded the defining developer platforms of the last decade. When the founders of Vercel and Replit—companies whose entire business is where developers build and ship—put money into a framework for building AI agents in JavaScript, it's a bet on where they think a very large number of developers are heading.
There's a particularly fitting endorsement closer to home. Mastra was the first investment out of Orange Collective Fund I, and Orange Collective didn't just wire a check—it built its own internal operating system on top of Mastra. The firm uses Mastra-orchestrated agents to read every new Y Combinator company profile and launch page, extract the problem, solution, founder dynamics, traffic, and repos, and feed that into how it evaluates deals. An investor running its own core workflow on the product it funded is about as direct a proof point as an early-stage company can get.
Why TypeScript, Why Now
Step back, and Mastra is a bet on a shift in who builds AI software.
The first era of AI development belonged to researchers and machine-learning engineers, and it lived in Python because that's where the models were born. But the center of gravity is moving from training models to building products with them—and that work belongs to the enormous population of application developers who were never going to leave their stack. Those developers write TypeScript. They ship on Vercel and Netlify and Node. They think in components and type signatures and CI pipelines. Meeting them where they already are, rather than asking them to migrate to a foreign ecosystem, removes the single biggest source of friction between an idea for an AI feature and a version of it running in production.
Mastra calls this building "a framework for the next million AI developers," and the phrase is more than marketing. The next million people to add AI to a product will not be model researchers. They'll be the web and application developers who already outnumber every other kind of engineer—and who have been, until now, second-class citizens in the AI tooling world.
The team has done this exact thing before. They took a set of web-development primitives, wrapped them in a framework developers loved, built the community and the production infrastructure around it, and watched it scale to millions. Now they're doing it again, pointed at the moment when AI stops being a research project and becomes a normal part of how software gets built.
If they're right about where AI development is heading, the winning framework won't be the most academically sophisticated one. It'll be the one that meets the world's largest population of developers in the language they already speak—and makes building a production-grade agent feel like a natural extension of the app they were already writing. That's the bet Mastra is making, and the people making it have cashed a very similar one before.