
by Kepler Software Inc.
Open-source TypeScript framework for building AI agents and workflows, routing to 90+ model providers through one interface.
Mastra fits TypeScript teams who want durable agent workflows without adopting LangChain's Python-derived mental model. Built by the team that built and sold Gatsby to Netlify, it backs a 6,173-member Discord community, ships Studio for testing agents and inspecting traces, and reports production use at companies including Replit and WorkOS.
Bundling agents, durable workflows, memory, RAG, and evals in one TypeScript package with native MCP server/client support, instead of stitching several single-purpose libraries together.
Fast GitHub star growth and MCP-native design create developer mindshare, but the framework layer is easy to fork under Apache 2.0 and Vercel AI SDK plus LangGraph both compete for the same TypeScript agent developer.
Main trade-off
No Python support, so teams with mixed-language ML stacks still need a second framework for Python-side agents.
| Plan | Monthly price |
|---|---|
| Framework (self-hosted) | Free |
| Cloud Starter | Free |
| Cloud Team | $250/mo |
| Cloud Enterprise | Custom |
Self-hosting the framework is free of charge, with no per-seat charges or usage caps. The optional Mastra Cloud platform runs pay-as-you-go: Starter is free with 100K observability events (then $10/100K), 24 CPU hours (then $0.35/hour), 10GB egress (then $0.10/GB) and 15-day retention. Team is $250/month with 1M events (then $8/100K), 250 CPU hours (then $0.25/hour), 100GB egress (then $0.08/GB), 6-month retention, SSO, and SOC 2 documentation. A $100/project Server Always-On add-on keeps servers warm, and Enterprise is custom-priced with RBAC, audit logs, and SLAs.
Mastra is an open-source TypeScript framework for building AI agents, workflows, and RAG applications, backed by more than 27,000 GitHub stars as of August 2026. It bundles agent orchestration, durable multi-step workflows, persistent memory, and evals into one TypeScript-first package with native Model Context Protocol server support.
Agent primitives
Agents combine an LLM, instructions, and a set of tools in one typed definition, then reason over a goal and decide which tools to call and when to stop.
Graph-based workflows
The workflow engine uses .then(), .branch(), and .parallel() to chain and fan out steps with explicit control flow and built-in retries, so multi-step processes survive a restart.
Model routing across 90+ providers
One standard interface connects to OpenAI, Anthropic, Google, and more than 90 other model providers, so switching providers does not mean rewriting agent code.
Persistent memory
Agents keep conversation history and semantic recall across sessions instead of resetting context on every new request.
Native MCP server and client support
The MCPServer class exposes Mastra agents, tools, and workflows to any Model Context Protocol client such as Cursor or Claude Desktop, and MCPClient lets a Mastra agent call external MCP servers.
Studio dev dashboard
A local playground at localhost:4111 lets developers chat with an agent, run RAG queries, and inspect traces of every model call and tool execution before deploying.
Serverless and self-hosted deployment
Server adapters ship for Express, Hono, Fastify, and Koa, plus deployer packages for Vercel, Cloudflare Workers, and Netlify, so the same agent code runs serverless or on a long-running process.
Most users expect these and they are not currently supported.
| Tool | Price from | Free plan | Runs on | Rating |
|---|---|---|---|---|
| $250/mo | Yes | Web · Mac · Windows | -- | |
| $39/mo | Yes | Web · Mac · Windows | -- | |
| Free | Yes | Web | -- | |
| $500/mo | Yes | Web | 3.8 |
Apache License 2.0 for the core framework; Mastra Enterprise License (source-available) for ee/ directories
The framework itself is free to self-host under an open-source license. Mastra Cloud, the optional hosted platform, is pay-as-you-go with a free Starter allowance, a $250/month Team tier covering 1M observability events, 250 CPU hours, and 100GB egress before overage charges apply, and custom Enterprise pricing for RBAC, audit logs, and SLAs.
Yes. The core framework is free to self-host under an open-source license, with no seat or usage limits. The optional Mastra Cloud Starter tier is also free, capped at 100K observability events, 24 CPU hours, 10GB of data egress, and 15 days of trace retention before pay-per-unit overage rates apply.
LangChain is the default pick for Python-first teams or anyone who needs its larger catalog of niche integrations. LlamaIndex fits better when retrieval and document indexing is the entire job rather than one part of an agent. n8n is the pick for teams that want a no-code visual builder instead of writing TypeScript directly.
Neither is strictly better; they target different stacks. Mastra is TypeScript-only and ships serverless deployers for Vercel, Cloudflare Workers, and Netlify, while LangChain.js is a port of the original Python library and carries more integration breadth but more of the verbosity that comes with that port.
Most developers report a working agent prototype within a couple of hours by installing the framework, defining an agent with instructions and tools, and running it against the local Studio dashboard. Deploying to a serverless target adds one deployer package (for example @mastra/deployer-vercel) and a build step.
Mastra is a TypeScript framework, released as open source, for building AI agents, workflows, and retrieval-augmented generation applications. It was built by Kepler Software Inc., founded in San Francisco in 2024 by Sam Bhagwat, Shane Thomas, and Abhi Aiyer, the team that built the Gatsby JavaScript framework and scaled it into a multi-million dollar business before selling it to Netlify. Mastra graduated from Y Combinator's Winter 2025 batch and has raised roughly $35 million, made up of a $13 million seed round backed by Paul Graham and more than 120 other investors plus a $22 million Series A led by Spark Capital.
The framework bundles four primitives into one TypeScript-first package: agents that reason over goals and choose which tools to call, a graph-based workflow engine with .then(), .branch(), and .parallel() methods for multi-step orchestration with retries, a memory system for persistent conversation context, and built-in evals for scoring agent output over time. Rather than porting LangChain's Python-derived abstractions into JavaScript, Mastra exposes its own agents, tools, and workflows as Model Context Protocol servers that clients such as Cursor, Windsurf, and Claude Desktop can call directly, and it connects to model providers through one standard interface instead of separate provider SDKs.
Teams shipping production agents on Vercel, Cloudflare Workers, or Netlify use Mastra's server adapters for Express, Hono, Fastify, and Koa to expose agents and workflows as HTTP endpoints without hand-rolling routing. Its local Studio dashboard lets a developer chat with an agent, feed it documents through RAG, and inspect traces of model calls and tool executions before shipping. Mastra names Replit and WorkOS among the companies running it in production.
The framework itself costs nothing to self-host, released under the Apache 2.0 license, with a separate source-available Enterprise License covering advanced features kept in its ee/ directories. Mastra Cloud, the optional hosted platform, layers a pay-as-you-go Starter tier, a Team tier, and custom Enterprise pricing on top; exact figures are in the pricing FAQ below. Because Mastra runs anywhere Node.js does, the hosted platform is opt-in rather than required to ship an agent.
Mastra reached a stable 1.0 release in January 2026, after hundreds of teams ran a beta cycle in production, and followed it with a Product Hunt launch the next day that placed third for the day.
Product facts on this page (pricing, plans, integrations, compliance) are read from Kepler Software Inc.'s own pages and documentation. The verdict is Hokai's reading of them, not the vendor's claim.