Skip to content
AITrendTool

Mastra

Open-source TypeScript framework for building AI agents and workflows, with memory, evals and tracing, plus a hosted platform to deploy and observe them

Mastra is an Apache-2.0 TypeScript framework for agents, workflows, memory and evals, with about 29,500 GitHub stars, paired with a hosted platform that deploys and traces what you build. The platform's Free plan includes 100,000 observability events and 15-day trace retention; Starter is $25/month and Team is $250/month per workspace, with compute, egress and events metered beyond the allowances. Best for TypeScript teams that want one framework from prototype to production; Python teams should look at LangChain or CrewAI.

Verified NOV 16, 2026 FREEMIUM Live
Starting price $25/mo

Free tier

Screenshot of Mastra

What is Mastra?

Mastra is an open-source framework for building AI agents and AI-powered applications in TypeScript. An agent is defined in code with its instructions, a model, tools and runtime behaviour; workflows compose typed steps with retries, branches, and suspend and resume; and a memory layer gives agents recent-message history, semantic recall and observational memory per thread. The same project registers its agents and workflows on one server that runs locally, deploys as a standalone server, or goes to Mastra’s hosted platform. Observability is part of the framework: traces, metrics and logs, plus evals with scorers, datasets and experiments. Agents connect to outside systems through MCP, A2A and ACP, and can run in a sandbox with a filesystem and shell.

The framework is licensed under Apache-2.0 outside its enterprise directories and has about 29,500 GitHub stars. The hosted platform is priced per workspace: Free at $0 with 100,000 observability events and 15-day trace retention, Starter at $25/month with one small dedicated project and 60-day retention, and Team at $250/month with three dedicated projects, 10 million events, 180-day retention and the SOC 2 report. Compute, egress, connections and events are metered beyond each plan’s allowances, at $0.25 per GB-hour of memory and per vCPU-hour. It competes with Python-first agent frameworks such as LangChain and CrewAI, and overlaps with durable task runners such as Trigger.dev.

Who is it for?

Mastra fits TypeScript developers who want agents, workflows, memory and evals from one framework rather than several libraries stitched together, and who would rather keep the agent code inside an existing React, Next.js or Node.js codebase. It is code-first: there is no visual builder. The Free plan and the open-source framework are enough for prototypes and side projects; a team running production agents will reach Starter or Team for dedicated projects and longer trace retention, and should estimate the five usage meters before committing. Teams working in Python should compare LlamaIndex, and teams that want to assemble agents visually should compare Dify.

  • Full-stack TypeScript developers adding agents to a Next.js or Node.js product without introducing a Python service.
  • Agent builders who need workflows that suspend for a human approval and resume, with memory that persists across threads.
  • Teams debugging agents in production who want traces, scorers and experiments in the same framework that runs the agent.
  • Teams wary of lock-in who want an Apache-2.0 framework they can self-host instead of the hosted platform.
  • Non-technical automators are not the audience; a visual tool such as Dify suits them better.

How much does Mastra cost?

Starting price: $25/mo · Free tier: yes · Model: freemium

Pricing verified NOV 16, 2026

Price history tracked from June 2026

Mastra pricing tiers, verified against the official pricing page
Plan Price Includes
Free $0 Unlimited agents, users and deployments · 100K observability events and 15-day trace retention · 100 GB-hours of memory and 40 vCPU-hours of serverless compute · 1 GB egress and 5 connections
Starter $25/mo Per workspace; includes 1 small dedicated project · 250K observability events and 60-day trace retention · 360 GB-hours of memory and 100 vCPU-hours of serverless compute · 10 GB egress, 10 connections and usage alerts
Team $250/mo Per workspace; includes 1 small and 2 medium dedicated projects · 10M observability events and 180-day trace retention · 3.6K GB-hours of memory and 400 vCPU-hours of serverless compute · 100 GB egress, 50 connections and the SOC 2 report
Enterprise Custom Everything in Team with custom allowances and connections · Role-based access control and single sign-on · Audit logs · Dedicated support

Paying for more than one AI tool? Add Mastra to the stack cost calculator and see the monthly total.

What are Mastra's key features?

  • Agents defined in code with instructions, a provider/model string, tools and runtime behaviour in one place
  • Workflows composed of typed steps with retries, branches, snapshots, and suspend and resume
  • Memory with recent-message history, semantic recall and observational memory, stored per thread
  • A harness for multi-mode agents with shared state, threads and storage
  • Built-in observability: traces, metrics and logs, plus evals with scorers, datasets and experiments
  • Sandboxed execution with a filesystem, shell commands and code execution
  • One server that registers agents and workflows, runs locally and deploys to the hosted platform or as a standalone server
  • Apache-2.0 licence for everything outside the enterprise directories, which carry their own licence

What people use Mastra for

  1. 01 Building typed AI agents in TypeScript with tools, structured output, memory and human-in-the-loop approvals
  2. 02 Orchestrating multi-step workflows with branching, suspend and resume, and scheduled runs
  3. 03 Adding agent features to an existing React, Next.js or Node.js app and exposing them over HTTP
  4. 04 Tracing, scoring and running experiments on agents to find regressions before users do
  5. 05 Connecting agents to external systems through MCP, A2A and ACP, or to people through Slack, Discord and Telegram

Pros and cons

Pros and cons of Mastra
Pros Cons
Open source under Apache-2.0 with about 29,500 GitHub stars, so the framework can run on your own infrastructure with no platform bill TypeScript only; Python teams get a more natural fit from LangChain, LlamaIndex or CrewAI
The hosted Free plan has unlimited agents, users and deployments, which is enough to ship a prototype Usage beyond the allowances is metered on five separate meters (memory, vCPU, egress, connections and observability events), so the real bill takes estimating
Agents, workflows, memory, evals and tracing come from one framework, so there is less glue code than assembling separate libraries The step from Starter to Team is tenfold, $25 to $250 a month, and the SOC 2 report only arrives at Team
Paid plans are priced per workspace, not per seat, at $25 and $250 a month Role-based access control, single sign-on and audit logs are Enterprise-only
A code-first developer tool with no visual builder, so non-technical teams will find Dify or n8n easier

What are the best Mastra alternatives?

Trigger.dev is the closest Mastra alternative in our directory: it covers the same category (AI Agents & Automation), starts at $10/mo, has a free tier.

Ranked by category overlap with Mastra, then free-tier availability, then lowest verified starting price — computed from our verified data, never from sponsorships.

Mastra alternatives with verified pricing
Alternative What it is Starting price Free tier Price verified
Trigger.dev Open-source platform for durable background tasks and long-running AI agents in TypeScript, with no timeouts, queues, retries and built-in tracing $10/mo yes Nov 11, 2026
CrewAI Open-source multi-agent framework for orchestrating collaborative AI agent teams $0 yes Nov 18, 2026
Dify Open-source LLM app platform for building agentic workflows, RAG pipelines, and AI agents with a visual no-code builder $0 yes Nov 15, 2026
LlamaIndex Open-source data framework for LLM apps, plus the commercial LlamaCloud platform for parsing, extracting, and indexing complex documents $0 yes Nov 15, 2026
LangChain Open-source frameworks for building LLM agents, plus the commercial LangSmith platform for tracing, evaluation, and deployment $39/seat/mo yes Nov 16, 2026

How people make money with Mastra

  • Build customer-facing support or onboarding agents for clients in their existing Next.js or Node.js codebase, and charge a build fee plus a monthly retainer that covers the metered hosting bill
  • Sell a vertical AI product, such as a research or back-office agent, as a flat subscription while the open-source framework keeps your own platform costs to hosting and model usage
  • Offer agent evaluation and tracing setup as a fixed-scope engagement for teams that already shipped an agent and cannot tell why it fails

Frequently asked questions

Is Mastra free?

Yes, in two ways. The framework is open source under the Apache-2.0 licence and can be self-hosted at no charge. The hosted platform also has a Free plan at $0 with unlimited agents, users and deployments, 100,000 observability events, 1 GB of egress, 5 connections and 15-day trace retention.

How much does Mastra cost?

The hosted platform is priced per workspace per month: Free at $0, Starter at $25, Team at $250, and Enterprise on a custom quote, as read on the pricing page on 2026-11-16. Usage beyond each plan's allowances is metered: $0.25 per GB-hour of memory, $0.25 per vCPU-hour, $0.10 per GB of egress and $10 per 100,000 observability events.

What do Mastra's dedicated projects cost?

Serverless projects are free plus usage and scale to zero. Always-on dedicated projects are $25 a month for Small with 2 GB of memory and 1 vCPU, $100 for Medium with 8 GB and 4 vCPU, and $200 for Large with 16 GB and 8 vCPU. Starter includes one Small project; Team includes one Small and two Medium.

Is Mastra open source?

Mostly. The repository's licence file puts everything outside directories named ee under the Apache License 2.0, while the enterprise directories, which cover features such as authentication and the agent builder editor, carry a separate enterprise licence. The repository has about 29,500 GitHub stars.

Which languages does Mastra support?

Mastra is a TypeScript framework. It integrates with frontend and backend frameworks such as React, Next.js and Node, or runs as a standalone server. There is no Python SDK, so Python-first teams usually compare LangChain, LlamaIndex or CrewAI.

Does Mastra include observability and evals?

Yes. The framework ships traces, metrics and logs, and an evals layer with scorers, datasets and experiments. On the hosted platform, observability events are counted against the plan: 100,000 on Free, 250,000 on Starter and 10 million on Team, with trace retention of 15, 60 and 180 days.

Does Mastra support MCP?

Yes. Mastra's documentation lists MCP alongside the A2A and ACP protocols for connecting agents to external systems, and channels such as Slack, Discord and Telegram for connecting agents to people. Agents can also run in an isolated sandbox with a filesystem, shell commands and code execution.