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,097
npm downloads a week
2.3Mup 9% on the week before
Latest release
@mastra/core@1…5 days ago
Releases in 90 days
9about 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.

01M2M3MSepNovJanMarMayJulOct24 September 2025: 160,400 downloads a week1 October 2025: 180,051 downloads a week8 October 2025: 190,021 downloads a week15 October 2025: 218,270 downloads a week22 October 2025: 227,422 downloads a week29 October 2025: 219,983 downloads a week5 November 2025: 228,219 downloads a week12 November 2025: 227,708 downloads a week19 November 2025: 245,347 downloads a week26 November 2025: 272,294 downloads a week3 December 2025: 261,607 downloads a week10 December 2025: 313,789 downloads a week17 December 2025: 312,882 downloads a week24 December 2025: 242,238 downloads a week31 December 2025: 135,839 downloads a week7 January 2026: 200,451 downloads a week14 January 2026: 299,975 downloads a week21 January 2026: 347,462 downloads a week28 January 2026: 381,512 downloads a week4 February 2026: 416,253 downloads a week11 February 2026: 423,111 downloads a week18 February 2026: 432,735 downloads a week25 February 2026: 477,754 downloads a week4 March 2026: 532,754 downloads a week11 March 2026: 546,850 downloads a week18 March 2026: 536,068 downloads a week25 March 2026: 580,546 downloads a week1 April 2026: 603,975 downloads a week8 April 2026: 572,965 downloads a week15 April 2026: 659,191 downloads a week22 April 2026: 729,547 downloads a week29 April 2026: 778,098 downloads a week6 May 2026: 823,168 downloads a week13 May 2026: 979,109 downloads a week20 May 2026: 947,938 downloads a week27 May 2026: 913,194 downloads a week3 June 2026: 958,877 downloads a week10 June 2026: 1,029,293 downloads a week17 June 2026: 1,150,516 downloads a week24 June 2026: 1,047,149 downloads a week1 July 2026: 1,091,419 downloads a week8 July 2026: 1,059,102 downloads a week22 July 2026: 1,214,310 downloads a week29 July 2026: 1,319,849 downloads a week5 August 2026: 1,367,036 downloads a week12 August 2026: 1,381,687 downloads a week26 August 2026: 1,536,853 downloads a week2 September 2026: 1,674,093 downloads a week28 September 2026: 2,068,878 downloads a week5 October 2026: 2,259,874 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