AI BirdView
Mastra logo

Mastra

Verified

Open-source TypeScript framework for AI agents, workflows, memory and evals

Visit Mastra →No rating yetFreemium· from $250/mo

Product preview

Mastra

What it is

Mastra is a framework for building AI agents and LLM-powered features in TypeScript. You pick a model through a router that covers more than 90 providers, write instructions, and attach tools so agents can act on your systems. Workflows add typed steps, branches and retries, and can pause for human approval before resuming. Memory includes conversation history, semantic recall, observational memory and thread storage. You can build MCP servers that expose agents and tools to other systems, run code-based or model-based evals, and trace latency, tokens and cost. Mastra runs in any Node.js-compatible environment, with deployers for Vercel, Netlify and Cloudflare, or on the Mastra Platform. The core framework is Apache 2.0. As of October 2026 the platform Starter plan is free and Teams costs $250 per month.

Key features

  • Agents with tools and a router for 90+ model providers
  • Typed workflows with branching, retries and human approval
  • Memory with semantic recall and thread storage
  • Evals, tracing and MCP server support

What we liked

  • + Built for TypeScript developers rather than ported from Python
  • + Apache 2.0 core framework
  • + Deploys to common JavaScript hosts

Worth noting

  • · Enterprise features use a separate source-available license
  • · Hosted platform has many metered line items

Editor's notes

More context from AI BirdView

Mastra is an open-source TypeScript framework that gives JavaScript developers the building blocks for AI agents: model routing, tools, workflows, memory, evals and tracing in one package. Most early agent frameworks started in Python, so Mastra's appeal is that web and full-stack teams can build agents in the same language and deploy them to the same hosts as the rest of their app. A hosted Mastra Platform adds managed observability, storage and deployment for teams that do not want to run that themselves.

What is Mastra used for?

Developers use Mastra to add agent features to products and internal tools. Common uses include:

  • Building support or sales agents that call your own APIs as tools
  • Writing multi-step workflows that branch, retry and wait for human approval
  • Giving agents memory across conversations with semantic recall
  • Exposing agents and tools as an MCP server for other assistants
  • Running evals and tracing cost, latency and tokens before and after changes
  • Switching between model providers through one interface

Who Mastra is best for

Mastra fits TypeScript and Node.js developers, Next.js teams and startups shipping AI features inside web apps. It suits teams that deploy on Vercel, Netlify or Cloudflare and want agents to live alongside their front end. Python-first data science teams will feel more at home with Python frameworks, and nontechnical users looking for a visual builder should look elsewhere.

Mastra pricing

As of October 2026, the Mastra framework is free and open source under Apache 2.0. The hosted platform's Starter plan is free with 100,000 observability events, 24 hours of CPU time, 10GB of egress and 15 days of retention, with metered charges beyond those limits. Teams costs $250 per month and raises allowances to 1 million events, 250 CPU hours and 6 months of retention, and adds SSO and SOC 2 documents. Persistent servers cost $100 per project, and gateway tokens bill at market rate plus 5.5 percent. Enterprise, cloud or self-hosted, is custom priced with RBAC, audit logs and SLAs.

Limitations to keep in mind

  • Some enterprise features are source-available under a separate Mastra license rather than Apache 2.0
  • The hosted platform meters many resources, so estimate events, CPU and storage before scaling
  • The framework moves quickly, so pin versions and read release notes
  • TypeScript only, which rules it out for Python codebases

Mastra vs alternatives

LangChain is the better choice if you want the largest ecosystem of integrations and examples, and it also offers a JavaScript version. LlamaIndex is stronger for document-heavy retrieval where parsing and indexing quality decide results. n8n suits teams that want visual automation with AI steps rather than writing code. Mastra wins when your team writes TypeScript and wants agents, workflows, memory and evals designed for that ecosystem from the start.

Tips for getting started with Mastra

Scaffold a project with the official starter and run the local development tools to inspect agent calls as you build. Start with one agent and two or three tools wired to real endpoints rather than mocks. Add a workflow with a human approval step for any action that changes data. Turn on tracing and a simple eval before you swap models, so you can compare results objectively.

Mastra FAQ

Is Mastra free?
Yes. The Mastra framework is free and open source under Apache 2.0, and the hosted platform has a free Starter plan. The Teams plan costs $250 per month.
What language is Mastra written in?
Mastra is a TypeScript framework that runs in any Node.js-compatible environment, with built-in deployers for Vercel, Netlify and Cloudflare.
Does Mastra support MCP?
Yes. Mastra lets you build MCP servers that expose your agents, tools and other resources to any MCP-compatible client.
Mastra vs LangChain: which is better?
Mastra is better for teams that want a framework designed around TypeScript, while LangChain is better if you need its larger ecosystem of integrations and community examples.

Reader reviews

From people who've used Mastra. Emails are never shown publicly.

No reviews yet. Be the first to share your experience.

Alternatives to Mastra

Other tools we like in this space.