Skip to content

Mastra

TypeScript framework for agents and workflows, with memory, RAG, evals, tracing and a local Studio for testing.

Reviewed by Sheela · Updated

View on GitHub Open source

Our rating

4.4/5

TypeScript's most complete agent toolkit, released at a pace that rewards teams who pin versions and read changelogs.

What it is

Mastra is an agent framework for TypeScript from the team behind Gatsby. It covers agents, typed workflows with retries and branching, memory, retrieval, evals and tracing in one package.

Mastra Studio is a local web UI for testing agents, watching tool calls and changing model settings. Workflows can pause for human input and resume later. MCP support is built in.

The core moved from the Elastic License to Apache 2.0 in July 2025. Enterprise features in ee/ folders, such as RBAC and SSO, are under a separate commercial license.

Our review

Mastra puts agents, typed workflows, memory, retrieval, evals and tracing into one TypeScript package, and for a Node or Next.js team that integration is the reason to choose it. The workflow engine, with retries, branching and pauses for human input, fills the gap that LangGraph fills in Python, and Studio shows tool calls and traces locally instead of in logs.

The pace is both the strength and the hazard. @mastra/core went from 1.72.0 on 30 September to 1.79.0 on 21 October 2026, seven minor releases in three weeks. Reviewers at MakerStack and on DEV Community report that breaking changes are not rare and third-party tutorials lag the API, and there are about 600 open issues.

Two defaults are worth knowing. Studio loads PostHog analytics unless MASTRA_TELEMETRY_DISABLED is set. And in October 2026 a high-severity advisory showed that @mastra/server up to 1.75.0 let one unauthenticated query string pollute the whole Node process, leaking data between users; it was patched in 1.76.0, so anyone serving Mastra over HTTP should be on a current release.

The licence is open core. The framework is Apache 2.0, but auth, the agent builder and editor features in ee/ folders are source-available and need a paid licence in production. Mastra's hosted platform charges $250 a month for Teams with 1M observability events and 250 CPU hours, and adds 5.5% to model token prices, a margin that matters more than the platform fee at volume.

Where it earns its place

  • A four-engineer Next.js SaaS team

    Add a support agent that reads the help centre and opens tickets

    Define the agent and its tools in TypeScript, use Mastra's RAG for the help centre and a workflow with a human-approval step before ticket creation. The framework is free; pin @mastra/core because minor releases land weekly.

  • A platform engineer at a fintech

    Run multi-step document workflows that must survive failures and wait for reviewers

    Use typed workflows with retries, branching and suspend/resume, storing state in Postgres rather than the in-memory default. SSO and RBAC around it fall under the Enterprise licence, priced as a flat annual fee.

  • An engineering manager budgeting a hosted agent backend

    Decide between Mastra's platform and self-hosting

    Teams costs $250 a month for 1M observability events, 250 CPU hours and 100 GB egress, then $8 per 100K events and $0.25 per CPU hour; an always-on server is $100 per project. Tokens bill at market rate plus 5.5%, so at high model spend self-hosting the open-source core is usually cheaper.

Before you commit

Setup
npm create mastra@latest scaffolds a project and opens Studio locally; Node 22.18 or later runs the TypeScript files directly. First agent in minutes, though the docs give no time estimate.
Integrations
Model providers, MCP client and server, Vercel AI SDK UI and CopilotKit for front ends, Postgres, LibSQL and vector stores for memory, and trace exporters such as PostHog.
Data and privacy
Self-hosted, data stays in your stores, but Studio sends PostHog usage analytics by default (set MASTRA_TELEMETRY_DISABLED=1). Hosted platform retention is 15 days on Starter and 6 months on Teams; Teams provides SOC 2 documents and SSO. Patch @mastra/server to 1.76.0 or later for GHSA-8982-g8xm-3x5h.
Cost at scale
Open-source core is free; you pay model providers and hosting. Hosted Teams is $250 a month plus overages and a 5.5% token markup; RBAC, audit logs and SLAs are Enterprise, priced on request.
Limits
About 600 open issues, frequent breaking changes, an in-memory store unsuited to production, and production use of ee/ features requires a licence. Python teams have no equivalent; LangGraph or Pydantic AI cover that side.

What's good

  • Agents, workflows, memory, RAG, evals and tracing in one typed package
  • Local Studio for tool calls and traces
  • Workflows pause for human input and resume
  • Built-in MCP client and server support

What's not

  • Seven minor core releases in three weeks; breaking changes reported
  • Studio sends PostHog analytics unless disabled
  • RBAC, SSO and auth features in ee/ need a commercial licence
  • Hosted platform marks up model tokens by 5.5%

Best for

TypeScript and Next.js teams building agents and AI workflows.

Alternatives

Mastra: common questions

Is Mastra worth it?
TypeScript's most complete agent toolkit, released at a pace that rewards teams who pin versions and read changelogs. We rate it 4.4 out of 5.
How much does Mastra cost?
Core is free under Apache 2.0; code in ee/ folders needs a Mastra Enterprise licence in production. Mastra's hosted platform: Starter $0, Teams $250/month, Enterprise custom; self-hosted Enterprise is a flat annual fee.
What are the downsides of Mastra?
Seven minor core releases in three weeks; breaking changes reported; studio sends PostHog analytics unless disabled; rBAC, SSO and auth features in ee/ need a commercial licence; hosted platform marks up model tokens by 5.5%.
Who is Mastra best for?
TypeScript and Next.js teams building agents and AI workflows.
How much does Mastra cost for a team or in production?
Open-source core is free; you pay model providers and hosting. Hosted Teams is $250 a month plus overages and a 5.5% token markup; RBAC, audit logs and SLAs are Enterprise, priced on request.
Is Mastra safe for company data?
Self-hosted, data stays in your stores, but Studio sends PostHog usage analytics by default (set MASTRA_TELEMETRY_DISABLED=1). Hosted platform retention is 15 days on Starter and 6 months on Teams; Teams provides SOC 2 documents and SSO. Patch @mastra/server to 1.76.0 or later for GHSA-8982-g8xm-3x5h.
What are the best Mastra alternatives?
The closest alternatives we have reviewed are LangGraph, OpenAI Agents SDK and Google Agent Development Kit (ADK).

Answers checked Oct 23, 2026.

Make Mastra? Show this rating on your siteMastra rated 4.4 out of 5 on ReviewRamble