Mastra
Also known as: Mastra AI, mastra-ai
Mastra launched in October 2024 and reached 1.0 in January 2026, crossing 300,000 weekly npm (Node.js package manager) downloads at that point. It was built by the founders of Gatsby.js, a popular React framework acquired by Netlify, which shows in the developer experience: tight TypeScript types throughout, a local dev playground for inspecting agent runs, and a CLI (command-line tool) for scaffolding. Most serious AI agent frameworks are Python-first; Mastra is built specifically for the TypeScript ecosystem from the ground up.
The framework ships with six core primitives: agents (a model plus instructions, optional tools, and optional memory running in a loop), workflows (deterministic step graphs where you control the sequence), tools (typed action definitions using Zod schemas), memory (working memory and conversation history as first-class features), evals (a built-in scoring framework for testing agent behavior), and RAG (retrieval-augmented generation pipeline support). You don't have to use all six on day one. A first Mastra agent is typically one agent, a couple of tools, and a memory store, with the rest added as the product demands it.
Mastra is model-agnostic via the Vercel AI SDK (a library for connecting to AI models) and connects to thousands of models across dozens of providers. For full-stack TypeScript teams, this is its main appeal: the same Zod schema that defines a tool's inputs types the model's structured output, the workflow state, and the API response. There's no translation layer between what the model promises and what your code expects. The enterprise tier adds RBAC (role-based access controls), SSO, and a managed cloud option, but the core framework is Apache 2.0 open-source.