Skip to content

Menu

Mastra logo

Mastra

Published · Updated

AI Agents

At a glance

What it is
Mastra is an open-source TypeScript framework for building AI agents and multi-step workflows, maintained by the mastra-ai organisation on GitHub.
Price from
Free plan, paid plans from $25 a month per account Details
Best for
TypeScript teams building agents inside Next.js or Node apps; Workflows that need human approval steps
Official site
mastra.ai
Last checked
November 2026
Watch out for
Code in ee/ directories is source-available only: production use or redistribution needs an agreement with Mastra.

Mastra is an open-source TypeScript framework for building AI agents and multi-step workflows, maintained by the mastra-ai organisation on GitHub. It runs inside React, Next.js or Node.js apps, or as a standalone server.

Developers define agents that call tools and iterate toward an answer, then wire them into graph-based workflows using .then(), .branch() and .parallel(). A single model-routing interface reaches more than 40 providers. Workflows and agents can be suspended for human approval and resumed later from stored state. During development, a local Studio UI on port 4111 lets you test agents, workflows and tools.

Mastra can expose agents and tools as MCP servers and works with Vercel's AI SDK UI and CopilotKit. The licence is split: most of the code is Apache-2.0, but anything under ee/ directories falls under the Mastra Enterprise Edition License, which makes that code source-available, not open source: you can read, modify and test it, but not use it in production or redistribute it without an agreement with Mastra. Outside pull requests are not accepted; contributors are asked to file issues instead. The hosted Mastra Platform is optional. You can run the framework on your own infrastructure, and the platform mainly adds managed compute projects, observability event quotas.

Key features

Model routing
One interface covers more than 40 model providers.
Agents
LLM-driven agents pick tools and loop until they reach an answer.
Graph workflows
Multi-step processes chain with .then(), .branch() and .parallel().
Human-in-the-loop
Agents and workflows can pause for approval and resume from stored execution state.
Memory
Conversation history, retrieval from external sources and an Observational Memory feature.
MCP servers
Agents and tools can be published over the Model Context Protocol.
Studio
A local web UI for building and testing agents, workflows and tools.
Evals and observability
Built-in tooling to measure agent output and trace runs.

Pricing

As of November 2026, the framework is free under Apache-2.0, with ee/ code under the Mastra Enterprise Edition License (source-available; no production use or redistribution without an agreement). The hosted Mastra Platform is priced per workspace per month. Free is $0 with 100K observability events and no dedicated project. Starter is $25 with one Small project and 250K events. Team is $250 with two Medium projects on top, 10M events and a SOC 2 report. Enterprise is custom and adds RBAC, SSO and audit logs. Overage runs $0.25 per GB-hour or vCPU-hour, $10 per 100K events and $0.10 per GB of egress.

Best for

  • TypeScript teams building agents inside Next.js or Node apps
  • Workflows that need human approval steps
  • Switching between many model providers
  • Publishing agents as MCP servers

Limitations

  • Code in ee/ directories is source-available only: production use or redistribution needs an agreement with Mastra.
  • The project does not accept pull requests from outside collaborators.
  • Mastra describes itself as a TypeScript framework, and its quickstart expects a TypeScript setup with tsconfig.json and Node.js 22.18.0 or later to run .ts files directly.
  • The docs warn that tools defined as plain objects instead of with createTool() fail silently.

Verdict

Mastra is a solid pick for TypeScript developers who want agents, workflows and memory in one package. Check which features sit under the enterprise licence before you ship, and budget for the hosted platform if you want managed hosting and larger observability quotas.

Sources

Written from the vendor's own site and documentation, checked November 2026. We have no paid relationship that affects what this page says.

How we research: where our facts come from, how often we re-check them, and why no one can pay for a review or a verdict.

Reviews and commentsShow

Reviews

Sign in to leave a review.

Loading reviews…

Comments

Sign in to leave a comment.

Loading comments…