The agents are already shipping. Mastra is the reason they hold together.
Somewhere right now, a content agent inside Sanity is reading a CMS schema and deciding what to write next. A finance workflow at Brex is pausing to wait for a human to approve a step. A support bot at PayPal is remembering what you said three messages ago. None of these teams wrote that plumbing from scratch. They wrote it in TypeScript, on Mastra.
Mastra is an open-source framework for building AI agents, durable workflows, and retrieval pipelines - the unglamorous scaffolding that turns a clever demo into something a company can actually run. It crossed 25,000 GitHub stars and 300,000 weekly npm downloads, raised $35 million, and did it all in under two years. For a project that mostly does the boring parts well, that is a lot of attention.
AI agents were being born in the wrong language.
Here is the awkward fact at the center of the AI boom: most of the world's software runs on JavaScript and TypeScript, and almost all of the agent tooling was being built in Python. So the millions of web developers who ship the apps people actually use were told, politely, that the future would require them to learn somebody else's stack first.
The result was predictable. Demos were easy. Production was a swamp. An agent that worked beautifully in a notebook had no memory across sessions, no way to wait for a human, no traces when it failed, and no honest way to measure whether it was getting better or worse. Teams were gluing six libraries together and hoping. Most of the glue did not hold.
Three people who already shipped a framework decided to do it again.
Sam Bhagwat, Abhi Aiyer, and Shane Thomas had been here before. They built Gatsby, the React framework that a generation of front-end developers used, and watched it get acquired by Netlify. They knew what it takes to earn a developer's trust: not marketing, but the thousandth small detail working the way you expected.
Their bet was simple and slightly contrarian. If agents were going to be everywhere, they would be built by the people who already build the web - and those people speak TypeScript. So Mastra would not be a Python library with a JavaScript wrapper bolted on as an afterthought. It would be TypeScript-native, batteries included, with the production essentials in the box from day one.
One package. The whole agent stack.
Mastra's pitch is that you should not need to assemble an agent out of spare parts. Agents combine LLM reasoning with tools, plan their own steps, and iterate until they reach an answer. Around them, the framework hands you the things teams usually rebuild badly.
Workflows
Durable, graph-based flows with loops, branching, error handling, and the ability to pause and wait for a human. Long-running operations, written declaratively.
Memory
Conversation history plus working and semantic memory, with retrieval from APIs, databases, and files - so agents stop forgetting what you told them.
RAG
Retrieval-augmented generation with vector store integration and semantic recall, grounding answers in your own knowledge base instead of the model's guesses.
Evals & Observability
Built-in scoring, OpenTelemetry traces of every step, and integrations with Langfuse, Braintrust, Arize and LangSmith. You can finally see why the agent did that.
There is also an optional hosted layer - Mastra Cloud, with a Studio for testing agents and dashboards for observability and deployment. The framework is free and open. The place you run it at scale is where the business lives.
From zero to default in under two years
Stars are nice. Production is the real verdict.
Plenty of AI projects collect GitHub stars the way some people collect parking tickets - involuntarily and without much meaning. Mastra's more interesting number is who is shipping it. Teams at Brex, Sanity, Replit, PayPal, and Marsh McLennan have Mastra agents running in production, not in a slide deck.
Sanity used it to build a content agent that understands structured CMS data well enough to actually help write content - the kind of task that sounds trivial until you try it and discover the agent has no idea what a "portable text block" is. The funding story tells you something too: a $13M seed spread across 120+ believers, then a single conviction lead, Spark Capital, writing the $22M Series A.
Mastra by the numbers
Make TypeScript the default home for agents.
Mastra's stated goal is to be the leading open-source TypeScript agent framework, with development, observability, and deployment all included. Underneath that is a worldview: the next platform shift belongs to agents, and it should belong to the developers who already build the web - not a separate priesthood.
The culture matches the thesis. There is no office; the team of around three dozen is fully remote. And in a move that tells you exactly who they are building for, Mastra spent about $1.5 million of its seed round printing physical copies of its book on building agents and mailing them out. An AI company's most famous marketing spend was, of all things, paper.
A few things worth knowing
- The founders previously built Gatsby.js, acquired by Netlify.
- Tony Kovanen, a Next.js cocreator, is a founding engineer.
- The legal entity behind Mastra is named Kepler Software.
- It competes with mostly Python-first tools - LangChain, LangGraph, CrewAI, PydanticAI - by being TypeScript-native.
- The whole framework is open source; the money comes from the hosted Cloud layer.
The boring parts decide who wins.
Go back to those agents still running quietly in production - the one inside Sanity, the workflow at Brex, the bot remembering your last message at PayPal. Two years ago, each of those teams would have stitched that together by hand, and most would have given up before launch. The model was never the hard part. The memory, the traces, the human-in-the-loop pause, the eval that tells you the truth - that was the swamp.
Mastra's quiet bet is that as agents go from novelty to infrastructure, the winner will not be whoever has the cleverest demo. It will be whoever makes the unglamorous parts dependable, in the language most developers already speak. The agents are already shipping. Increasingly, the reason they hold together has a name, and it is written in TypeScript.