Mastra
Mastra is a TypeScript framework for building AI-powered applications and agents, made by Mastra AI. The core is licensed under Apache 2.0, with enterprise features under a separate Mastra Enterprise License. It includes agents, graph-based workflows, memory and evaluations, and a managed platform starts free with a Teams plan at $250 a month.
Facts checked on against the sources listed at the end of this page.
- Pricing
- Open sourcePaid from $250 a month for Teams
- Open source
- YesApache-2.0 (core), Mastra Enterprise License (ee directories)
A good fit for
- TypeScript teams building agents and workflows in one framework
- Projects that want to self-host under a permissive license
- Teams that want built-in evals and observability
- Apps that need to pause a workflow for human approval
Not a good fit for
- Python projects: Mastra is TypeScript
- Teams that need every feature under one license: some code is under the Mastra Enterprise License
- Predictable hosted costs: the managed platform bills overage on events and CPU hours
Mastra pricing
The framework is free to self-host under Apache 2.0. The managed Mastra platform has Starter, Teams and Enterprise plans billed by events and CPU hours.
| Plan | Price | What you get |
|---|---|---|
| Starter | $0 a month | 100K events of observability, then $10 per 100K. 24 CPU hours, then $0.35 an hour. 15 days of data retention. |
| Teams | $250 a month | 1M events, then $8 per 100K. 250 CPU hours, then $0.25 an hour. 6 months of retention, SSO and SOC 2 documentation. |
| Enterprise | Custom pricing | Custom volume and retention, RBAC, audit logs, support and uptime SLAs. |
| Self-hosted | $0 a month | Open source agents, workflows and observational memory. Enterprise self-hosting is custom priced. |
Prices in USD, checked on 6 October 2026. Current prices on mastra.ai.
Main features
- Model routing
- Connect to 40+ providers through one standard interface.
- Agents
- LLM-driven agents that call tools for complex tasks.
- Workflows
- A graph-based engine for multi-step processes.
- Human in the loop
- Suspend and resume runs with state persistence.
- Context management
- Conversation history, data retrieval and observational memory.
- MCP servers
- Model Context Protocol support.
- Evals and observability
- Built-in evaluations and observability tools.
About Mastra
Mastra is a TypeScript framework that covers the pieces an agent app needs: model routing to 40+ providers through one interface, agents that use tools, and a graph-based workflow engine for multi-step processes.
It also provides suspend and resume with saved state for human in the loop work, context management with conversation history and observational memory, an MCP server implementation, and built-in evaluations and observability.
Mastra was part of Y Combinator's W25 batch, according to its repository. The code is dual licensed: Apache 2.0 for the core and the Mastra Enterprise License for code in ee directories.
- Made by
- Mastra AI
- Free plan
- The self-hosted framework is free. The managed Starter plan is $0 a month with 100K events and 24 CPU hours included.
- Available on
- TypeScript, Mastra platform, Self-hosted
Mastra alternatives
Getting started
Create a project with the CLI.
npm create mastra@latest
Questions about Mastra
Is Mastra open source?
The core framework is licensed under Apache 2.0. Code in ee directories falls under the Mastra Enterprise License.
Is Mastra free?
Yes to self-host. The managed platform also has a free Starter plan with 100K events and 24 CPU hours included.
How much does the Mastra platform cost?
Teams is $250 a month. Enterprise is custom priced.
What language is Mastra written for?
TypeScript. The core package is @mastra/core on npm.
Mastra vs Vercel AI SDK: what is the difference?
The AI SDK is a toolkit for provider access, streaming and UI hooks. Mastra adds workflows, memory, evals and a managed platform on top of the agent layer.
Sources and links
Work on Mastra? Claim this listing. Something wrong or out of date? Suggest a correction. Stats come from the public GitHub and npm APIs and update every day.