Skip to content

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.

By Mastra AIOpen sourceLLM Frameworks

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)
GitHub stars
29,536+678 in the last 30 days
npm downloads a week
3.3Mup 4% on the week before
Latest release
@mastra/core@1…3 days ago
Releases in 90 days
10about 3 a month

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.

PlanPriceWhat you get
Starter$0 a month100K events of observability, then $10 per 100K. 24 CPU hours, then $0.35 an hour. 15 days of data retention.
Teams$250 a month1M events, then $8 per 100K. 250 CPU hours, then $0.25 an hour. 6 months of retention, SSO and SOC 2 documentation.
EnterpriseCustom pricingCustom volume and retention, RBAC, audit logs, support and uptime SLAs.
Self-hosted$0 a monthOpen 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

Usage and activity

Weekly npm downloads of @mastra/core, last 12 months.

01M2M3M4MOctDecFebAprJunAugNov18 October 2025: 220,479 downloads a week25 October 2025: 228,550 downloads a week1 November 2025: 220,685 downloads a week8 November 2025: 233,474 downloads a week15 November 2025: 227,356 downloads a week22 November 2025: 265,169 downloads a week29 November 2025: 244,652 downloads a week6 December 2025: 292,769 downloads a week13 December 2025: 316,473 downloads a week20 December 2025: 310,475 downloads a week27 December 2025: 169,569 downloads a week3 January 2026: 139,063 downloads a week10 January 2026: 262,643 downloads a week17 January 2026: 316,059 downloads a week24 January 2026: 364,257 downloads a week31 January 2026: 396,799 downloads a week7 February 2026: 432,475 downloads a week14 February 2026: 432,061 downloads a week21 February 2026: 436,539 downloads a week28 February 2026: 502,771 downloads a week7 March 2026: 533,309 downloads a week14 March 2026: 541,592 downloads a week21 March 2026: 547,861 downloads a week28 March 2026: 608,866 downloads a week4 April 2026: 582,298 downloads a week11 April 2026: 607,225 downloads a week18 April 2026: 688,076 downloads a week25 April 2026: 737,303 downloads a week2 May 2026: 800,767 downloads a week9 May 2026: 899,286 downloads a week16 May 2026: 961,943 downloads a week23 May 2026: 970,916 downloads a week30 May 2026: 900,803 downloads a week6 June 2026: 983,362 downloads a week13 June 2026: 1,082,613 downloads a week20 June 2026: 1,091,456 downloads a week27 June 2026: 1,093,422 downloads a week4 July 2026: 1,045,410 downloads a week11 July 2026: 1,123,160 downloads a week18 July 2026: 1,245,782 downloads a week25 July 2026: 1,249,046 downloads a week1 August 2026: 1,356,322 downloads a week8 August 2026: 1,316,934 downloads a week15 August 2026: 1,483,965 downloads a week22 August 2026: 1,461,878 downloads a week29 August 2026: 1,578,171 downloads a week5 September 2026: 1,753,587 downloads a week27 September 2026: 2,004,818 downloads a week4 October 2026: 2,226,379 downloads a week31 October 2026: 2,975,875 downloads a week7 November 2026: 3,157,676 downloads a week14 November 2026: 3,293,695 downloads a week

Recent releases

Mastra alternatives

All 7 alternatives to Mastra, side by side

Getting started

  1. 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.

Mastra: pricing, features and alternatives (2026) | ScratchDB