Mastra raises $22M Series A led by Spark Capital $35M total raised 25,000+ GitHub stars 300,000+ weekly npm downloads In production at Brex, Sanity, Replit & PayPal Built by the Gatsby team Mastra 1.0 shipped January 2026 Mastra raises $22M Series A led by Spark Capital $35M total raised 25,000+ GitHub stars 300,000+ weekly npm downloads In production at Brex, Sanity, Replit & PayPal Built by the Gatsby team Mastra 1.0 shipped January 2026
Mastra logo
The Mastra mark. Looks calm. Spends its days wrangling agents that refuse to stop arguing with themselves.
Company Profile / Developer Tools / AI

Mastra

The open-source TypeScript framework for building AI agents that actually make it to production - from the team that built Gatsby.

25k+
GitHub stars
300k+
Weekly npm installs
$35M
Total raised
2024
Founded
Who they are now

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.

"We raised a $22M Series A to help every developer build agents."- Sam Bhagwat, Co-founder & CEO
The problem they saw

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.

The hard part of an agent was never the model. It was everything around the model - memory, tools, workflows, evals - and that part had no home in TypeScript.- The gap Mastra set out to fill
The founders' bet

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.

Sam Bhagwat
Co-founder / CEO
Author of "Principles of Building AI Agents." Previously co-founded Gatsby.
Abhi Aiyer
Co-founder / CTO
Gatsby core engineer turned agent-framework architect.
Shane Thomas
Co-founder / CPO
Leads product and developer experience across the framework.
They sold one framework to Netlify. The second one they are giving away - and charging for the parts you run in production.- The Mastra business model, in one sentence
The product

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.

A framework so complete that your favorite agent might one day use it to build its own agents. People said that as a joke. Then they kept saying it.- Developer chatter, post Series A
Milestones

From zero to default in under two years

2024
Mastra is foundedThe Gatsby trio launch an open-source TypeScript agent framework under Kepler Software, San Francisco.
Oct 2025
$13M seed roundBacked by Y Combinator, Gradient Ventures, and 120+ angels including Paul Graham, Guillermo Rauch, Amjad Masad and Balaji Srinivasan.
Jan 2026
Mastra 1.0 shipsThe framework crosses 300,000+ weekly npm downloads.
Apr 2026
$22M Series ALed by Spark Capital, total raised reaches $35M. The Mastra Platform launches the same week.
The proof

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

// growth in roughly 15 months. bars scaled for comparison, not to the same unit.
GitHub stars
25,000+
Weekly npm
300,000+
Total raised
$35M
Seed investors
120+
Team size
~34, remote
120 investors said yes to the idea. One investor said yes to the company. Both turn out to matter.- Seed vs. Series A, translated
The mission

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.

"Mastra doesn't have an office. Instead, we're spending $1.5 million of our seed funding printing and distributing our agents books."- Sam Bhagwat

A few things worth knowing

Why it matters tomorrow

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.