Mastra
Updated
TL;DR: Mastra (by Mastra; category: Agent framework). An open-source TypeScript framework for building AI agents, multi-step workflows and retrieval apps, with memory, evals and tracing built in. Teams use it to give an agent tools, chain steps with human approvals, and see exactly what each run did. Around it Mastra now sells a hosted platform for deploying agents, a model gateway (Nov 19, 2026) with one key, one bill and spend caps per key, and Mastra Factory, an open-source setup that takes software issues from GitHub, Linear or Jira through plan, review and done with a cloud coding agent. Pricing: Framework free: Apache 2.0 except code in ee/ directories, which has its own license (GitHub LICENSE.md). Hosted platform per workspace: Free $0 (unlimited agents and users, 100K observability events, 10 GB egress, 5 connections); Starter $25/month (1 small dedicated project, 250K events); Team $250/month (3 projects, SOC 2 report, 10M events); Enterprise custom (SSO, RBAC, audit logs). Overage $0.25 per GB-hour of memory or vCPU-hour, $10 per 100K events, $0.10 per GB egress (mastra.ai/pricing, checked Nov 25, 2026).. Best for: TypeScript developers building agents into their own app.
BuildersAgent frameworkMastra
An open-source TypeScript framework for building AI agents, multi-step workflows and retrieval apps, with memory, evals and tracing built in. Teams use it to give an agent tools, chain steps with human approvals, and see exactly what each run did. Around it Mastra now sells a hosted platform for deploying agents, a model gateway (Nov 19, 2026) with one key, one bill and spend caps per key, and Mastra Factory, an open-source setup that takes software issues from GitHub, Linear or Jira through plan, review and done with a cloud coding agent.
Features and pricing are based on Mastra's official site and docs (vendor claims), not our own testing. Our take is labeled separately below.
- Audience: people building software and AI agents
- Pricing (vendor's published price): Framework free: Apache 2.0 except code in ee/ directories, which has its own license (GitHub LICENSE.md). Hosted platform per workspace: Free $0 (unlimited agents and users, 100K observability events, 10 GB egress, 5 connections); Starter $25/month (1 small dedicated project, 250K events); Team $250/month (3 projects, SOC 2 report, 10M events); Enterprise custom (SSO, RBAC, audit logs). Overage $0.25 per GB-hour of memory or vCPU-hour, $10 per 100K events, $0.10 per GB egress (mastra.ai/pricing, checked Nov 25, 2026).. Prices change, so verify on the official site.
- Official site: https://mastra.ai
- Source / changelog: https://mastra.ai/pricing
The Builder Brief Take
Who it's for
- TypeScript developers building agents into their own app
- Small product teams that want workflows, memory and traces in one framework
- Teams that need per-key spend caps across model providers
Who should skip it
- Python teams (look at LangGraph or Pydantic AI)
- People who do not write code (start with n8n)
- Anyone wanting a stable 1.0 software factory today
Where it works
- Support agent: Answer order or account questions from your own database with approvals before refunds.
- Approval workflows: Chain steps with a human sign-off in the middle.
- Model gateway: One key and bill for many model providers with spend limits.
Pros and cons
Pros
- Framework free and mostly Apache 2.0
- Built-in memory, evals and tracing
- Free hosted tier with unlimited agents and users
- Gateway with failover and per-key caps
Cons
- Factory not yet 1.0
- Some features under a separate ee license
- TypeScript only
- We have not tested it
The move: getting started with Mastra
- Pick one narrow agent job
- Build it locally first
- Add an approval step
- Read twenty traced runs
- Move to hosting only when needed
How it helps
Who: A developer or small product team writing TypeScript who wants to build an agent into their own app and needs workflows, memory and a record of every run without stitching five libraries together.
- Pick one narrow agent job with a clear done check, such as answering order-status questions from your own database.
- Build it locally with the open-source framework and give the agent only the tools that job needs.
- Put a human approval step in the workflow before anything that sends, refunds or deletes.
- Turn on tracing and evals and read twenty real runs before you call it working.
- Only move to the paid platform or gateway once you need hosted deploys, team access or one bill across model providers.
Result: One working agent inside your own product, with approvals and traces you can show a teammate, built on code you own.
Why it matters
Editorial assessment: Mastra is one of the main choices for TypeScript teams, alongside the Vercel AI SDK, and the framework itself costs nothing. The newer pieces are where the money is: the gateway is a convenience with real controls (per-key spend caps are worth having), and Factory is ambitious but pre-1.0. If you write Python, look at LangGraph or Pydantic AI instead. If you don't write code at all, this isn't for you; an agent builder like n8n is the better start.
Mastra alternatives
- OpenAI Agents SDK: OpenAI's open-source framework for building agents in Python (Python 3.10+) or TypeScript: agents with instructions, tools, guardrails and handoffs, plus sandbox agents that work in a container over long jobs, realtime and voice agents, sessions for conversation history, human-in-the-loop approvals and built-in tracing. Provider-agnostic: works with OpenAI's Responses and Chat Completions APIs and, per the README, 100+ other LLMs.
- LangGraph: Open-source library from LangChain for building stateful, long-running agents as graphs: you define the steps, the state passed between them, checkpoints that let a run pause and resume, and points where a human approves before the agent continues. LangChain's paid LangSmith platform adds tracing, evaluation and hosted Agent Servers for running LangGraph agents in production.
- CrewAI: Open-source Python framework for orchestrating role-based teams of agents (for example a researcher, a writer and a reviewer) that work through tasks together, plus a hosted platform with a visual editor, an AI copilot, tracing, guardrails and human-in-the-loop steps for running those workflows.
- LangChain: The most widely used open-source framework for building LLM apps and agents, in Python and JavaScript, with integrations for hundreds of model providers, databases and tools. Its agent layer is built on LangGraph, the same company's lower-level runtime for long-running, stateful agents. Around the free framework LangChain sells LangSmith: tracing and evals to see what each agent run did, hosted Agent Servers, Fleet (agents built in plain language, no code) and Engine, which scans traces for failures and proposes fixes.
- LlamaIndex: Open-source Python and TypeScript framework for building agents and question-answering apps over your own documents and data, with connectors for many file types, databases and model providers. The same company runs LlamaParse, a paid cloud service for parsing and extracting data from complex documents, and LiteParse, a free local parser for simpler ones.
- AutoGen: Open-source framework from Microsoft for multi-agent applications.
Recent changes
- 2026-11-25: Recent releases: Mastra Gateway (Nov 19), one API key for 500+ models with automatic failover between providers, per-key spend limits (hourly to lifetime), allowed-model lists and a US or EU region lock; and new Mastra Factory capabilities (Nov 18): intake from GitHub, GitLab, Linear, Jira and Incident.io, custom stages with human approvals, a cloud coding agent and microVM workspaces. Mastra says Factory is not yet a 1.0 release. Vendor-documented; not tested by us. Source
Putting it to work? Get a starter stack for your job in about a minute with the Stack Picker, or see how done-with-you setup works if you want help.
Get changes in your inbox
New AI tools, honest reviews and playbooks. One email a week.
Almost done. Confirm your email in the beehiiv tab we just opened.
That email does not look right. Try again.
Free. Unsubscribe anytime.Make an AI tool? List your tool on Builder Brief. Free listings get the same editorial review as paid ones.