Mastra is an open-source TypeScript framework for building production AI applications and agents. It aims to give JavaScript and TypeScript developers the same first-class agent tooling that has historically been Python-centric, covering agents, workflows, memory, RAG, evaluations and observability in a single coherent stack.
Core features include graph-based workflows with control-flow primitives like .then(), .branch() and .parallel(); LLM-powered agents that reason about goals and call tools; a memory system spanning conversation history and semantic recall; and built-in tracing, logging, model-graded and rule-based evals, plus guardrails. Mastra works with Next.js, Express and Hono, deploys to Vercel, Netlify and Cloudflare, and supports 90+ model providers and MCP servers.
The founding team previously built Gatsby, the React framework used by hundreds of thousands of developers, and applied that framework-design experience to AI infrastructure. Mastra launched in October 2024 and reached its 1.0 release in January 2026, by which point it reported 300,000+ weekly npm downloads and production use at firms including Replit (Agent 3), SoftBank and Marsh McLennan.
Mastra raised a $13M seed round led by Y Combinator, with Paul Graham, Gradient Ventures, SVAngel, Orange Collective and Runa Capital, plus angels including Vercel's Guillermo Rauch, Replit's Amjad Masad, Dropbox's Arash Ferdowsi and Balaji Srinivasan. The company describes it as one of the largest post-YC cap tables in years.
The core framework is Apache 2.0 licensed and free, with enterprise features available, positioning Mastra as the default agent framework for the TypeScript ecosystem.