
Mastra is an open-source TypeScript framework for building production-grade AI agents and applications.
Mastra is an open-source TypeScript framework for building AI-powered applications and agents. It provides AI primitives including agents, graph-based workflows, retrieval-augmented generation, memory, evals, and observability. The framework supports 40+ LLM providers and integrates with React, Next.js, and Node.js. Core is Apache 2.0 licensed with enterprise features in separate directories.
The framework also includes Mastra Studio for observability, Mastra Server for deployment, and Mastra Memory Gateway for persistent conversational memory across any framework or language.
The AI agent framework market has five major players: AutoGen (Microsoft), CrewAI, LangChain/LangGraph, LlamaIndex, and Mastra. Mastra is the TypeScript-native specialist. Mastra has reached 300K+ weekly npm downloads, 23.8K GitHub stars, and ~4,800 Discord members within 15 months.
Growth in 15 months exceeded Gatsby first five years. Teams at Brex, Sanity, Factorial, Indeed, Marsh McLennan, MongoDB, Workday, Salesforce, and Replit use Mastra.
Mastra advantages include: (1) TypeScript-first from day one, not a Python port, (2) Built-in workflow engine with durable execution, suspend/resume, and branching, (3) OpenTelemetry observability without paid services, (4) SOTA Observational Memory scoring 94.9% on LongMemEval benchmark, (5) Team from Gatsby — proven OSS community builders who scaled to $5M ARR and were acquired by Netlify.
The team pioneered open-source framework strategy including early adoption of modern build tools, plugin ecosystems, and developer-friendly APIs.
Mastra faces several competitive challenges. The ecosystem is smaller than LangChain.js with fewer third-party integrations. The framework is newer and lacks the long production history of Python-first alternatives. Converting open-source users to paid platform subscribers remains a key monetization challenge.
Additionally, edge runtime support is weaker than LangChain.js and Python interoperability is not a primary focus.
Mastra operates an open-core model. Framework core is free under Apache 2.0. Platform products launched April 2026 with Starter free tier and $250 per team per month Teams tier. Enterprise tier includes lifecycle support, architecture review, on-premise deployment, and SLAs.
Memory Gateway has separate pricing based on memory tokens, retrieval storage, and stale thread retention. All tiers offer unlimited users and deployments.