Mastra: Building the Framework for the Agent Era

After spending much of the previous decade building Gatsby, Sam Bhagwat, Abhi Aiyer, and Shane Thomas decided to build another company together.

Their first idea wasn’t Mastra.

In 2024, they started building Kepler, an AI-powered CRM. As they worked on the product, they kept running into the same problem. The models were getting better quickly, but the infrastructure developers had to actually build reliable AI applications was a mess. They tried several existing frameworks and repeatedly ended up ripping much of the code back out as they worked to make their pipelines more dependable.

It was a problem they knew unusually well.

At Gatsby, Sam was co-founder, Abhi was a principal engineer who built much of Gatsby Cloud’s infrastructure, and Shane worked across engineering and product. Together, they had helped build one of the defining JavaScript frameworks of its generation. They knew what a great developer framework felt like, how an open-source community forms around one, and how much work goes into making complicated infrastructure feel simple.

Eventually, they stopped building the CRM and started building the infrastructure they wished they’d had.

That became Mastra.

A Framework for Building With AI

Software development is going through another architectural shift. Developers are moving beyond adding chatbots to applications and starting to build software that can reason through tasks, use tools, remember context, coordinate workflows, and take action.

Building those systems requires a new set of infrastructure. Developers need ways to manage memory and context, orchestrate workflows, evaluate whether an agent is actually getting better, trace what happened when something goes wrong, and control which models and tools it uses.

Mastra brings those pieces together in an open-source TypeScript framework. Developers can build agents, connect them to tools and data, give them memory, create multi-step workflows, evaluate performance, trace behavior, and deploy applications into production.

The TypeScript piece matters. JavaScript and TypeScript sit behind an enormous share of the world’s applications, yet much of the early agent infrastructure was built for Python developers. Mastra was explicitly designed for product developers: the frontend, backend, and full-stack engineers building the applications where many of these agents will ultimately live.

Getting the Band Back Together

Building Gatsby gave Sam, Abhi, and Shane unusually relevant experience for what they’re doing now. They learned how developers choose frameworks, how APIs become conventions, how open-source communities scale, and how quickly a framework has to evolve without breaking the trust of the people building on top of it.

They also learned some things the hard way.

Sam has been candid about the lessons from Gatsby and how those experiences influenced Mastra’s design. Starting again didn’t mean repeating Gatsby. It meant getting another chance to apply everything they’d learned building it.

That experience extends beyond the founders. Mastra has recruited a number of people from the Gatsby ecosystem, concentrating a surprising amount of experience building open-source JavaScript infrastructure inside one company. Mastra itself describes the team as having spent more than a decade building open-source JavaScript.

That makes this team feel almost purpose-built for the moment. They aren’t learning how to build a developer framework, cultivate an open-source community, or navigate a rapidly changing technical ecosystem for the first time.

They’ve already spent years doing it together.

Now the underlying platform has changed.

What Comes After the Framework

The interesting question isn’t whether developers will build agents. They already are. The question is where they will build them.

Every major shift in software eventually produces a new layer of abstraction. Frameworks take complicated underlying technologies and turn them into something ordinary developers can actually use. Once developers begin building around those abstractions, the framework can become an important part of the application stack.

Mastra has the opportunity to occupy that position for agentic software.

The framework already spans many of the primitives developers need: agents, workflows, memory, evals, tracing, model routing, and human oversight. The company is also building the infrastructure to run and observe those applications in production. Mastra 1.0, released in January 2026, included work around deployment, storage, observability, and production reliability.

That creates a natural progression from helping developers build an agent to helping them understand how it behaves, improve it, and keep it running reliably.

The opportunity gets particularly interesting if agents become a standard part of software development. Millions of JavaScript and TypeScript developers won’t necessarily want to assemble memory systems, orchestration layers, model providers, observability tools, and deployment infrastructure themselves. They will want an opinionated way to put the pieces together and get to work.

That’s what great frameworks have always done.

Why We Invested

We invested in Mastra early because the combination of team, timing, and market insight felt unusually strong.

Sam, Abhi, and Shane had already spent years building developer infrastructure together. More importantly, they encountered the problem behind Mastra while trying to build an AI application themselves. They weren’t theorizing about what agent developers might need. They had tried the existing tools, struggled to make them work the way they wanted, and decided to build something better.

We also liked the scale of the ambition. Mastra isn’t being built for a small corner of the developer ecosystem. The team believes agents will become a fundamental building block of software and that millions of JavaScript and TypeScript developers will need a way to build them.

There are still plenty of unknowns about how that stack develops. Which abstractions endure, which models dominate, and what an agentic application ultimately looks like are all changing quickly.

That’s exactly why the team matters so much.

Sam, Abhi, and Shane have lived through a platform shift before. This time, they got to experience the problem as users before becoming the people building the framework to solve it.

They got the band back together. Now they get another shot at defining how developers build.

Visit Mastra at https://mastra.ai/.