Mastra

Mastra

Mastra is an Apache 2.0 TypeScript framework for building AI agents and applications on the Node/Next.js stack. It ships typed agents, a graph-based workflow engine with .then()/.branch()/.parallel() control flow and human-in-the-loop suspension, durable memory with observational memory and semantic recall, plus a Hono-powered server and Mastra Studio for local testing. A model router gives one interface to 90+ providers (OpenAI, Anthropic, Google, xAI), and you can author or consume MCP servers. Built-in observability covers traces, metrics, evals/scorers and datasets, so teams can regression-test agent behavior before it hits production. Built for AI engineers and full-stack TypeScript developers who want primitives over a black-box builder. Self-host free, or use Mastra Cloud: Starter free, Teams $250/mo, Enterprise custom.

Coding
Visit website
Added on
Nov 4, 2026
TypeScriptAgentsWorkflowsMCP servers90+ providersObservabilityEvalsSemantic memoryApache 2.0
Product information

Everything worth knowing about Mastra

The complete picture — from everyday features to the technical detail builders and IT folks dig for.

Core features

What it actually does

Agents
Define typed agents in one place — instructions, model, tools, and runtime behavior. Point them at any model via a provider/model string and let the loop reason until it hits a final answer.
Workflows
Graph-based orchestration with explicit control flow (.then(), .branch(), .parallel()), retries, and human-in-the-loop suspension. State persists to storage, so a workflow can pause indefinitely and resume exactly where it stopped.
Observability
Traces, metrics, logs, evals, datasets, and signals in one place. Inspect every model call, tool call, and handoff on a searchable timeline, then score runs against repeatable checks before shipping changes.
Memory
Observational memory, semantic recall (topK retrieval), and thread-aware storage so agents keep coherent context across long-running sessions instead of forgetting what happened three turns ago.
Studio
Local-first UI at localhost:4111 for building, testing, and managing agents, workflows, and tools. Unlimited users and deployments on every paid cloud tier — no per-seat nickel-and-diming.
Technical capabilities
Model routing
One standard interface across 90+ providers (OpenAI, Anthropic, Gemini, xAI and more). Mastra reads provider env vars automatically; bring your own key or pay market rate + 5.5% through the gateway.
MCP + deployers
Author Model Context Protocol servers exposing agents and tools, and ship to any Node.js runtime — standalone Hono server or built-in deployers for Vercel, Netlify, and Cloudflare.
Must watch videos
An App That Changes Itself for Every Customer - Raphaël Titsworth-Morin, Defang
10:32
Tutorial10:32
An App That Changes Itself for Every Customer - Raphaël Titsworth-Morin, Defang
What if your customers could change your app themselves? Raphaël Titsworth-Morin, senior developer and evangelist at Defang, shows an experiment where they can, with a Mastra agent that lives inside the deployment. When you deploy software into your customers' own cloud accounts, each of them wants something a little different. One team wants due dates on its to-dos, another wants a kanban board. That feedback usually comes back to you, and you decide whether it makes sense for everyone. You'll learn how to move that loop into the customer's own environment, with boundaries on what can change. Users send feedback from inside the app, and an admin sees all of it on one board. A Mastra agent with a working copy of the Git repository turns the feedback into changes in a sandbox. The admin previews them and decides what goes to production. If you just bundle a coding agent and let it rip, the admin approving its changes has little reason to trust them. Mastra gives you more control, so you can keep files like authorization code off limits and add a review agent that pushes back. He also explains where the Ouroboros comes in. Defang's open-source CLI deploys Docker Compose apps to clouds like AWS, GCP and Azure. Recorded at the TypeScript AI Conference in London, July 23, 2026, presented by Mastra. 🔗 MENTIONED IN THIS TALK Defang: https://defang.io Defang CLI on GitHub: https://github.com/DefangLabs/defang Defang samples: https://github.com/DefangLabs/samples 📚 MASTRA RESOURCES https://mastra.ai https://x.com/mastra_ai https://mastra.ai/community/discord https://github.com/mastra-ai Learn Mastra: https://mastra.ai/learn https://mastra.ai/books/principles-of-building-ai-agents https://mastra.ai/books/patterns-of-building-ai-agents WHAT IS MASTRA Mastra is an open-source TypeScript framework designed for building and shipping AI-powered applications and agents with minimal friction. It supports the full lifecycle of agent development — from prototype to production. CHAPTERS 00:00 Intro 00:19 From Docker Compose to any cloud 00:58 Deploying into your customers' cloud accounts 01:32 Where AI fits in deployment 02:44 A to-do app users can reshape 03:31 Feedback goes to a Mastra agent 04:36 How it works 05:31 Why not just ship a coding agent 06:11 Guardrails for what ships 06:45 One baseline, adapted per customer 07:24 An app that deploys itself 09:15 The full user flow 09:45 Adaptable deployments
How Frontleap Built an AI Platform That Helps Distributors Process 3× More Orders
1:55
Tutorial1:55
How Frontleap Built an AI Platform That Helps Distributors Process 3× More Orders
Frontleap is building AI order management for manufacturers and distributors, where a single order can take up to 24 hours to prepare. Bruno Marchand, Head of GTM, explains how Frontleap wants to change it and how the team uses Mastra to build agents that work alongside employees and turn their feedback into business rules—so order knowledge doesn’t stay stuck in one person’s head. Read the full case study: https://mastra.ai/customers/frontleap Frontleap: https://www.frontleap.com/ 📚 MASTRA RESOURCES Website: https://mastra.ai X: https://x.com/mastra_ai Discord: https://mastra.ai/community/discord GitHub: https://github.com/mastra-ai Learn Mastra: https://mastra.ai/learn Principles of Building AI Agents: https://mastra.ai/books/principles-of-building-ai-agents Patterns of Building AI Agents: https://mastra.ai/books/patterns-of-building-ai-agents WHAT IS MASTRA Mastra is an open-source TypeScript framework designed for building and shipping AI-powered applications and agents with minimal friction. It supports the full lifecycle of agent development, from prototype to production.
Anyone can hack anything now! (This Week In AI)
35:02
Tutorial35:02
Anyone can hack anything now! (This Week In AI)
Security had a rough week. Two old PHP bugs combined into a critical remote code execution flaw that leaked before the patch; GitLab disclosed a 12-year-old hole in self-managed servers; the private keys behind eight eMudhra certificates proved breakable; and LiteLLM shipped credential-stealing malware for the second time. Railway, which runs part of the Mastra platform, had a security incident that exposed environment variables, and Abhi explains what happened and what to do if you deploy there. The model releases kept coming too: GPT-6.1 Terra, DeepSeek V4.1 Flash, Kimi K3.1 Pro, MiniMax M3.1 Flash and Meta's Muse Spark Open. Shane and Abhi also cover Anthropic's S-1 filing, Claude Duet, Block's Dessa voice model, Thariq leaving Anthropic, Chroma joining Replit, and a round of quick hits. AI Agents Hour is a weekly livestream by Mastra CPO Shane Thomas and CTO Abhi Aiyer. Mondays at 12 PM Pacific. 📚 READ MORE Anthropic S-1: https://x.com/anthropicai/status/2114705042817110293 Anthropic Public Benefit Fund: https://x.com/anthropicai/status/2111881963657412903 DeepSeek V4.1 Flash 1017: https://x.com/deepseek_ai/status/2111375640717033777 DeepInfer: https://x.com/deepseek_ai/status/2112476496283775135 Kimi K3.1 Pro: https://x.com/Kimi_Moonshot/status/2113680705855373791 MiniMax M3.1 Flash: https://x.com/minimax_ai/status/2112150867868541221 Muse Spark Open: https://x.com/AIatMeta/status/2110779754274292212 Claude Duet: https://x.com/claudeai/status/2112984664256241837 Devin Oncall: https://x.com/cognition/status/2110790097369010292 Dessa: https://x.com/jack/status/2113697902916751661 Eleven Realtime: https://x.com/ElevenLabs/status/2112550782063247521 PHP security release: https://x.com/thephpf/status/2112633155631108544 AI agents in bank accounts: https://x.com/axios/status/2113268208371126348 Railway preliminary report: https://x.com/Railway/status/2113671961624682722 1Password for Agents: https://x.com/1password/status/2113276767582498943 Claude formal verification: https://x.com/AnthropicAI/status/2113390212911083894 Thariq leaves Anthropic: https://x.com/trq212/status/2113844051938054167 Sunil Pai leaves Cloudflare: https://x.com/threepointone/status/2113705370090905937 Chroma joins Replit: https://x.com/trychroma/status/2113677289334706274 tsc-ts: https://x.com/ctatedev/status/2111272070768185787 bun lint: https://x.com/bunjavascript/status/2110692261508079721 Flint: https://x.com/richardsocher/status/2112944385415426249 📚 MASTRA RESOURCES Mastra: https://mastra.ai Mastra on X: https://x.com/mastra_ai Mastra Discord: https://mastra.ai/community/discord Mastra GitHub: https://github.com/mastra-ai Learn Mastra: https://mastra.ai/learn Principles of Building AI Agents (Book): https://mastra.ai/books/principles-of-building-ai-agents Patterns for Building AI Agents (New Book): https://mastra.ai/books/patterns-of-building-ai-agents WHAT IS MASTRA? Mastra is an open-source TypeScript framework designed for building and shipping AI-powered applications and agents with minimal friction. It supports the full lifecycle of agent development—from prototype to production. You can integrate it with frontend and backend stacks (e.g., React, Next.js, Node) or run agents as standalone services. If you're a JavaScript or TypeScript developer looking to build an agentic or AI-powered product without starting from first principles, Mastra provides the scaffolding, tools, and integrations to accelerate that process. ⏱️ CHAPTERS 00:00 Cold open 00:25 Intro 00:44 Anthropic files its S-1 02:26 Anthropic's Public Benefit Fund 03:10 GPT-6.1 Terra 04:34 DeepSeek V4.1 Flash 05:13 DeepSeek open sources DeepInfer 06:35 Kimi K3.1 Pro 09:20 MiniMax M3.1 Flash 09:43 Meta's Muse Spark Open 10:51 Claude Duet and proactive agents 12:15 Devin Oncall 13:21 Dessa, a voice model without an LLM 15:19 Eleven Realtime 16:09 Security had a bad week 17:35 Critical PHP vulnerabilities 20:25 Someone is patching PHP servers with AI 20:58 Node and GitLab 21:33 eMudhra's broken certificate keys 21:57 LiteLLM compromised again 22:18 Rogue AI agents in bank accounts? 22:44 The Railway incident 26:00 Security agents 26:47 1Password for agents and formal verification 27:33 Qwen and the Alibaba bucket 29:12 Security tools you should be using 29:47 If you work in security, you're set 31:33 Thariq leaves Anthropic 32:08 Sunil leaves Cloudflare 32:22 Chroma joins Replit 32:45 Quick hits 34:11 Outro

Who uses it

Real use cases, no hype
Customer Support Agents
Answer users, complete tasks, hand off to product flows.
Multi-Step Workflow Automation
Typed, branching, resumable processes with human-in-the-loop.
Internal Company Brain
Semantic recall plus RAG over APIs, databases, and files.
AI SRE & Dev Infra
Shared agent primitives for product teams and on-call ops.
Agent Evals & Observability
Score runs, track cost/latency, catch regressions pre-prod.
MCP Server Authoring
Expose agents and tools over the Model Context Protocol.
Coding Agents
Multi-mode harness with shared state, threads, and storage.
What's great
  • TypeScript-native — no Python context switch
  • Apache 2.0 core, self-host anywhere for free
  • Observability, traces, and evals ship built-in
  • Free tier: unlimited users, projects, deployments
Technical strengths
  • Graph workflow engine with .then/.branch/.parallel and resumable HITL
  • Model router hits 90+ providers via one provider/model string
  • First-class MCP server authoring and MCP 2.0 support
Where it falls short
  • Teams plan jumps to $250/mo — steep for small teams
  • Gateway skims 5.5% markup on top of market token rates
  • Event metering at $10/100K can bite at scale
  • Young, fast-moving API surface — expect churn
Technical limitations
  • RBAC, SSO, and audit logs locked behind enterprise license
  • Node/TypeScript only — no Python or ML-native path
For technical folks

The deep-dive specs

Language / runtime
TypeScript, ES2022 modules, Node.js
Package
@mastra/core (plus @mastra/memory, @mastra/libsql, @mastra/factory)
License
Apache 2.0 for the core framework; Enterprise features source-available under the Mastra Enterprise License
Server
Standalone Hono-powered server, default port 4111; integrates with Next.js, Express, Fastify
Deployment targets
Any Node.js environment; built-in deployers for Vercel, Netlify, Cloudflare
Model providers
90+ providers through a single model router interface (OpenAI, Anthropic, Google, xAI)
Protocol support
MCP server authoring, MCP 2.0 support (spec 2026-07-28), MCP Events
Storage backends
LibSQL and Postgres (row writes, compute hours, and database storage metered separately)
Tool definition
createTool() with Zod inputSchema/outputSchema; plain object tool definitions fail silently

FAQ

Includes technical Q&A

Traffic Insights

Monthly Visits

—

November 2026

Growth Rate

0%

vs last month

Dominance

0%

in Coding

Top Country

—

Top Countries Breakdown

—

Growth Trend

Stable

Traffic has remained stable.

Honest pricing

No sneaky tiers, no “contact sales”

Here's who each plan is actually for — and where the hidden charges might hit.

Starter
Free

Individuals and side projects

  • ["Observability events: 100K events
  • then $10/100K"
  • "CPU time: 24 CPU hours
  • then $0.35/hr"
  • "Data retention: 15 days"
  • "Unlimited users
  • deployments
Teams
Most picked
$250/mo

Growing teams

  • ["Observability events: 1M events
  • then $8/100K"
  • "CPU time: 250 CPU hours
  • then $0.25/hr"
  • "Data retention: 6 months"
  • "Multiple teams
  • SSO
Enterprise
Custom

Teams at scale

  • ["Custom volume and retention"
  • "RBAC
  • audit logs"
  • "Support and uptime SLAs"
  • "Dedicated support engineer"
  • "Agent lifecycle support: planning
  • prototyping
Free
Free

Self-hosters

  • ["Apache 2.0 licensed"
  • "Build and host agents anywhere"
  • "Agents: define behavior with models
  • tools
  • memory
  • and instructions"
  • "Workflows: durable multi-step processes with typed control flow"
View Full Plans & Pricing on Mastra

Official pricing, checkout, and plan upgrades are handled directly on mastra.ai.

Reviews

What the internet actually thinks

Data refreshed weekly. No paid placements.

Trustpilot
Not reviewed yet
G2
G2
Not reviewed yet
C
Capterra
Not reviewed yet
Product Hunt
Not reviewed yet
COMMUNITY COMMENTS

Leave a Comment

Help others make informed decisions. Your honest feedback shapes the community's understanding of this tool.

Tips for commenting

  • •Be specific about features you used
  • •Share real use cases and results
  • •Mention both pros and cons
  • •Keep it honest and constructive
to leave a comment

Your comment is published immediately.

Filter:
Sort:

No comments yet

Be the first to share your experience with this tool.

Alternatives

Not quite the right fit?

Here's what else is out there.