Contents
- Verdict
- What is Mastra?
- Best for, and not for
- Strengths and limits
- Pricing
- What people actually build with Mastra
- What Mastra actually costs at small-business volume
- The gotcha: serverless that never sleeps, and two undefined units
- What breaks in production, and how you find out
- What it connects to that you already run
- Mastra alternatives: what to pick instead, and when
- Migration and lock-in: can you get your work out?
- FAQ
Mastra is two things with one name, and the pricing question has two answers. The framework is free: it is a TypeScript library, its core is Apache 2.0, and you can run it on any host you already pay for. The platform is optional and starts at $0, with Starter at $25 a month and Team at $250. Our reference workload of 1,000 short runs a month fits inside the Free plan's compute allowance. The framework is worth adopting if your team writes TypeScript. The platform is worth paying for when you want hosting and traces without building them, as long as you watch the two units the pricing page never defines: observability events and connections.
What is Mastra?
Mastra is a TypeScript framework for building AI agents and applications. You define agents with instructions, a model and tools in code, and run them inside your own app or as a standalone server, with a local Studio interface for testing. The framework is open source. Separately, the company sells Mastra Platform, a hosted service for deploying those agents and collecting observability data, priced per workspace with usage allowances. The two are independent: you can use the framework and never pay Mastra anything.
Best for
TypeScript teams that want an agent framework in the language their product is already written in.
Not for
Non-developers, Python-first teams, and anyone who needs a visual builder.
Strengths
- The framework costs nothing and its core is Apache 2.0 licensed
- TypeScript throughout, so agents live in the same codebase and deployment as a web product
- Models are referenced as provider and model strings, with OpenAI, Anthropic and Google documented and a longer list published
- The platform's Free plan includes unlimited agents, users and deployments
- Every overage rate is published: memory, vCPU, connections, egress, events and storage
- A very active repository, pushed on the day we checked
Limitations
- The pricing page does not define an observability event or a connection, the two units most likely to produce overage
- A serverless project that never scales to zero can cost far more than a fixed-price always-on one
- The Free plan includes no dedicated project and keeps traces for 15 days
- Code in the repository's ee directories is under a separate enterprise licence, not Apache 2.0
- Usage alerts start on the $25 Starter plan and no spend cap is mentioned
- TypeScript only, which rules it out for teams whose data and model work is in Python
Mastra pricing
Mastra the framework is free and open source. Mastra Platform, the optional hosted service, is priced per workspace per month: Free at $0, Starter at $25, Team at $250 and Enterprise by quote. Each plan includes allowances of memory, vCPU, egress, connections and observability events, and usage beyond an allowance is billed at a listed rate. Always-on projects are sold in fixed sizes from $25 to $200 a month; serverless projects are free plus usage.
| Plan | Price | What you get |
|---|---|---|
| Framework | $0 | Open source. Apache 2.0 for everything outside the repository's ee directories, which carry a separate enterprise licence. Run it on your own infrastructure with no fee to Mastra |
| Platform Free | $0/mo | Unlimited agents, users and deployments. 100K observability events, 1 GB egress, 5 connections, 15-day trace retention, 100 GB-hours of memory, 40 vCPU-hours. No included always-on project |
| Platform Starter | $25/mo | 1 Small always-on project, usage alerts, 250K events, 10 GB egress, 10 connections, 60-day trace retention, 360 GB-hours of memory, 100 vCPU-hours |
| Platform Team | $250/mo | 1 Small and 2 Medium projects, SOC 2 report, 10M events, 100 GB egress, 50 connections, 180-day trace retention, 3,600 GB-hours of memory, 400 vCPU-hours |
| Platform Enterprise | Custom | RBAC, SSO, audit logs, custom allowances and connections, dedicated support. Contact Mastra for pricing |
| Overage and project sizes | $0.25/GB-hour | Memory $0.25 per GB-hour, vCPU $0.25 per vCPU-hour, connections $0.50 each, egress $0.10 per GB, events $10 per 100K, storage $10 per GB per project. Always-on projects: Small $25, Medium $100, Large $200 a month |
Pricing reflects public plans as of November 17, 2026 and can change. Check Mastra for the latest.
What people actually build with Mastra
Mastra's reason to exist is language. Most agent frameworks are Python libraries, and most web products are TypeScript. Mastra lets the team that builds the product build the agent, in the same repository, with the same tooling.
The builds that fit
An assistant inside an existing web product. The documentation lists integrations with Next.js, React with Vite, Astro, Express, SvelteKit and Hono. A support assistant or an in-app helper becomes another module in the app rather than a separate Python service to deploy and secure.
Inbox triage at our reference volume. An agent with a classification instruction and a couple of tools, triggered on a schedule or a webhook, handling 1,000 items a month. This is small enough to run on a host you already have, or inside the platform's Free allowance.
A tool-using agent over your own systems. Tools are defined in code and attached to an agent, so an agent can look up an order, check stock or draft a reply using functions your team already wrote.
A general-purpose working agent. The documentation describes a harness with a local workspace, shell tools and memory, which suits internal automation where the agent needs to read and write files.
A prototype that needs to be shown quickly. A single command scaffolds a first agent and Studio gives an interactive interface for trying it, which shortens the path from idea to something a colleague can test.
What it is genuinely bad at
Serving anyone who does not write TypeScript. There is no drag-and-drop builder for a business owner, and a data team that lives in Python will find its libraries on the other side of a language boundary. It also will not make architectural decisions for you: a framework supplies the parts, and the hard work of deciding what the agent should do, testing it against real cases and handling its failures is unchanged.
Bottom line: Mastra is the framework to consider when the people building the agent are the same TypeScript developers who build the product it lives in.
What Mastra actually costs at small-business volume
Separate the two products first. The framework has no price. If you run a Mastra agent inside your existing app, on hosting you already pay for, Mastra's share of your bill is zero and your costs are the host and the model tokens.
The platform is where the pricing page applies. Read on 17 November 2026, it lists Free at $0, Starter at $25 and Team at $250 per workspace per month. Free includes 100 GB-hours of memory and 40 vCPU-hours, which apply to serverless projects and sandboxes. A serverless project has 1 GB of memory and 0.5 vCPU and scales to zero, with memory and vCPU billed as used.
Take our reference workload, 1,000 triage runs a month, and assume 20 seconds of active time each, which is our assumption. That is 20,000 seconds, or 5.56 hours active. At 1 GB that is 5.56 GB-hours against an allowance of 100. At 0.5 vCPU it is 2.78 vCPU-hours against an allowance of 40. Compute is comfortably free.
The other allowance is observability events: 100K on Free. The pricing page does not say what one event is, so we cannot tell you how many a run produces. What the numbers do say is that 100,000 events across 1,000 runs is a budget of 100 events per run, and that overage is $10 per 100K, which is one hundredth of a cent per event. If your runs emit more than 100 events each, expect a small overage; measure it in the first week.
Starter at $25 is best understood as one always-on project. A Small project on its own is listed at $25 a month, and Starter includes one, plus larger allowances, usage alerts and 60-day traces. Team at $250 includes one Small and two Medium projects, which at list sizes is $25 plus two times $100, so $225 of projects, plus 10M events and a SOC 2 report.
| Option | Monthly price | What is included | At 1,000 short runs | Watch for |
|---|---|---|---|---|
| Framework only, your own host | $0 to Mastra | The open-source framework | Your hosting bill only | You build your own logging and traces |
| Platform Free, serverless project | $0 | 100 GB-hours, 40 vCPU-hours, 100K events, 15-day traces | 5.56 GB-hours and 2.78 vCPU-hours used: $0 | Events per run, which the page does not define |
| Platform Starter | $25 | 1 Small always-on project, 250K events, 60-day traces, alerts | $25 | Event overage at $10 per 100K |
| Platform Team | $250 | 1 Small and 2 Medium projects, 10M events, 180-day traces, SOC 2 report | $250 | Only cheaper than Starter above 2.5M events a month |
| Platform Enterprise | Custom | RBAC, SSO, audit logs, custom allowances | Quote | No published price |
When Team is cheaper than Starter plus overage
The gap between Starter's 250K events and Team's 10M is large, and events are the allowance a busy agent product is most likely to exceed. On Starter, each extra 100K events is $10. So Starter costs $25 plus $10 for every 100K events beyond 250K. That reaches Team's $250 when the overage is $225, which is 2.25M extra events, or 2.5M events a month in total. Below 2.5M events a month, Starter with overage is cheaper on events alone. Above it, Team is.
Self-hosting the framework is the third option and for many small teams the right one. The cost is whatever a small always-on server or serverless function costs at your existing provider, plus the time to set up your own logging. You give up the hosted traces and get a bill with no undefined units in it.
Bottom line: The Mastra framework costs nothing, 1,000 short runs a month fit in the platform's Free compute allowance, and Team at $250 only beats Starter at $25 once you pass 2.5M observability events a month.
The gotcha: serverless that never sleeps, and two undefined units
The most expensive mistake available on Mastra's platform is running an always-busy workload on a serverless project. Serverless is listed as free plus usage and scales to zero, which is ideal for occasional work. The arithmetic changes if it never gets to scale down.
A serverless project has 1 GB of memory and 0.5 vCPU. If it were active for a whole month of 730 hours and billed for its full size throughout, that would be 730 GB-hours and 365 vCPU-hours. On the Free plan, with 100 GB-hours and 40 vCPU-hours included, the overage would be 630 GB-hours at $0.25, which is $157.50, plus 325 vCPU-hours at $0.25, which is $81.25. Total: $238.75 a month. A Small always-on project, with twice the memory and twice the vCPU, is $25. The page says serverless memory and vCPU are billed as used, so a lightly loaded project may be metered below its full size and this is a ceiling rather than a forecast, but the direction is clear. Anything that needs to be awake all day, such as a chat agent with steady traffic or a process holding connections open, belongs on a fixed-size project.
The second issue is that two billable units are not defined on the pricing page. Observability events are metered at $10 per 100K beyond the allowance, and connections at $0.50 each beyond 5, 10 or 50 depending on plan. The page does not say what counts as one event or one connection. For events this matters, because an agent's trace can contain many spans per run, and a verbose agent could use its allowance several times faster than a terse one. Until Mastra documents the unit on the pricing page, the only reliable answer is your own usage figures after a few days of real traffic.
Third, guardrails arrive late. Usage alerts are listed as a Starter feature, so the Free plan, where a surprise is most likely, does not list them. The page states that usage beyond an allowance is billed at the listed rate and does not mention a spend cap or describe a hard stop on Free. Assume overage is billed, and check the workspace's usage page yourself.
Finally, storage is priced per project: $10 per GB. A serverless project includes 512 MB and a Small 1 GB. An agent that writes files to its workspace will meet that limit before it meets any other.
Bottom line: A Mastra serverless project that stays awake all month could run to about $239 in overage on the Free plan against $25 for an always-on Small project, so match the project type to how often the agent is busy.
What breaks in production, and how you find out
Start with the health of the project, because with a framework that is your supply chain. The GitHub API on 17 November 2026 showed 29,557 stars, 835 open issues and a push that same day. That is a busy, fast-moving project. Fast-moving cuts both ways: bugs get fixed quickly and interfaces change. Pin your versions, read release notes before upgrading, and keep a small set of test conversations you can re-run after every upgrade.
On the platform, trace retention sets how far back you can investigate: 15 days on Free, 60 on Starter and 180 on Team. A problem a customer reports three weeks later cannot be examined on Free. If the agent does anything a customer might dispute, either pay for retention or write your own durable record of inputs, outputs and tool calls.
Serverless projects scale to zero, which means the first request after a quiet period starts from cold. The pricing page does not give a cold-start time, so measure it. For a background triage job it does not matter. For a chat assistant a customer is waiting on, it might, and that is another reason a steady interactive workload suits an always-on project.
The failures that matter most are not Mastra's. They are the ones every agent has: a model that returns something your code did not expect, a tool that times out, a prompt change that fixes one case and breaks three. A framework gives you the places to handle these and does not handle them for you. Validate what the model returns before acting on it, give every tool call a timeout, and put a person in the loop for anything that sends money or messages on the business's behalf.
Security and compliance, as published
The pricing page places a SOC 2 report on the Team plan and RBAC, SSO and audit logs on Enterprise. It does not mention HIPAA or data residency, and we are not inferring either. If you self-host the framework, compliance is entirely a property of your own infrastructure and your model provider, which for a regulated business is often the simpler position to reason about.
Bottom line: Mastra moves quickly, so pin versions and keep re-runnable test conversations, and choose trace retention by how long after the event a customer might complain.
What it connects to that you already run
Mastra connects to things in three ways, all of them code. The first is models. A model is specified as a provider and model string, and the documentation shows OpenAI, Anthropic and Google with an API key each, pointing to a published list of supported models for the rest. Switching model is a one-line change, which is the practical protection against any single provider's price or quality changing.
The second is tools. A tool is a function you define and attach to an agent. Your CRM, calendar, order system and database are reached by writing a tool that calls them. There is no catalogue of pre-built business connectors of the kind Zapier or Make.com offer, so each integration is a small piece of code your team owns.
The third is your application. Because it is a TypeScript library, an agent can be called directly from a Next.js route, an Express handler or a Hono server, sharing your app's authentication, database access and deployment. That is the real integration advantage: no second service, no second language, no network boundary between the product and its agent.
For a small business the sensible division is the usual one. Let the Mastra agent do the reasoning and call a handful of well-tested tools. Let an automation platform such as n8n handle the plain connector work around it, where a non-developer can see what ran and fix it. And if runs get long, a job runner such as Trigger.dev can host the agent call with retries and a run history, since the agent is just a function to it.
Bottom line: Mastra integrates through model strings, tools you write and direct calls from your own TypeScript app, with no connector catalogue and no second service to run.
Mastra alternatives: what to pick instead, and when
The first fork is language. If your team is Python-first, do not choose a TypeScript framework for its features. Agno is the closest counterpart: an open-source Python framework with a free runtime you host yourself and a paid control plane starting at $150 a month. LangGraph, CrewAI and Pydantic AI are the other established Python options.
If you are in TypeScript and want the smallest possible library rather than a full framework, the OpenAI Agents SDK is deliberately minimal. If you want the agent runtime managed by a cloud you already use, Amazon Bedrock AgentCore runs agents built with any framework and bills compute by the second.
If what you need is hosting for long runs rather than a framework, Trigger.dev runs any TypeScript function with per-second billing and no duration limit, and you can run a Mastra agent inside it. And if nobody on the team writes code, none of these is the answer: a visual tool such as n8n is.
| Tool | Language | What you pay the vendor | Who it suits | Does better than Mastra |
|---|---|---|---|---|
| Mastra | TypeScript | $0 for the framework; platform $0, $25 or $250 a month | TypeScript product teams | Agent in the same codebase as the web app |
| Agno | Python | $0 for the runtime; control plane $150 a month for a live deployment | Python teams wanting to host in their own cloud | No usage metering at all on the paid plan |
| LangGraph | Python and JavaScript | Free library (August review) | Teams wanting explicit graph control | Fine-grained control over state and branching |
| OpenAI Agents SDK | Python and TypeScript | Free library (August review) | Teams wanting a minimal layer | Less abstraction to learn and maintain |
| Trigger.dev | TypeScript | $0, $10 or $50 a month as compute credit | Long or bursty runs | Per-second hosting with no duration cap |
| Amazon Bedrock AgentCore | Any framework | $0.1276 a vCPU-hour and $0.0169 a GB-hour on Runtime v2 | Teams already on AWS | Identity, memory and tool gateway as managed services |
| n8n | Visual, with code nodes | Per-execution plans (August review) | Teams without developers | A builder a non-developer can use |
Bottom line: Pick Mastra for TypeScript, Agno for Python, and a visual tool if the honest answer is that nobody on the team will maintain agent code.
Migration and lock-in: can you get your work out?
There are two separate lock-in questions, one for each product. For the platform the answer is reassuring: it is optional. The framework runs anywhere a TypeScript server runs, so leaving the platform means deploying the same code to a different host and replacing the hosted traces with your own logging. Nothing about your agents has to change. The plans are monthly per workspace, so there is no contract to see out on Free, Starter or Team.
For the framework the answer is the same as for any framework: your agents are written against its interfaces. The Agent class, the way tools are created and the way models are named are Mastra's. Moving to another framework means rewriting those definitions. The parts that carry over are the valuable ones: the instructions, the logic inside each tool, the test cases and the knowledge of what the agent should and should not do.
The licence deserves a precise statement. The repository's licence file says everything is Apache 2.0 except content under directories named ee, which is covered by a separate enterprise licence, and third-party components under their own licences. GitHub reports no single licence for the repository for that reason. Apache 2.0 is permissive: you can use, modify and ship the core commercially. The ee directories are different, and we did not read the enterprise licence's terms, so if you depend on anything under those paths, read that file before you build on it.
The habits that keep the exit cheap are ordinary good practice. Keep tools as plain functions that do not depend on framework types more than they must. Keep prompts in files rather than scattered through code. Keep model choice in configuration. Do that and a move to a different framework is a week of mechanical rewriting rather than a rebuild.
Bottom line: Leaving Mastra's platform means redeploying the same code elsewhere, and the framework's core is Apache 2.0 with only the ee directories under a separate enterprise licence.
Mastra FAQ
Is Mastra free?
The framework is free and open source. The optional hosted Mastra Platform has a Free plan at $0 a month, Starter at $25, Team at $250 and custom Enterprise pricing, per workspace, as published on 17 November 2026.
What does Mastra Platform's Free plan include?
Unlimited agents, users and deployments, 100K observability events, 1 GB of egress, 5 connections, 15-day trace retention, 100 GB-hours of memory and 40 vCPU-hours. It does not include an always-on project; compute allowances apply to serverless projects and sandboxes.
What are Mastra's overage rates?
Memory is $0.25 per GB-hour, vCPU $0.25 per vCPU-hour, connections $0.50 each, egress $0.10 per GB, observability events $10 per 100K and project storage $10 per GB per project.
What is an observability event?
The pricing page does not define it. It lists allowances of 100K, 250K and 10M events by plan and an overage rate of $10 per 100K. Check your workspace's usage after a few days of real traffic to see how many events one of your runs produces.
What licence is Mastra under?
The repository's licence file says Apache 2.0 for everything except content in directories named ee, which is under a separate enterprise licence, and third-party components, which keep their own licences.
Do I need Mastra Platform to use Mastra?
No. The framework is a TypeScript library you can run inside your own application or on any host. The platform is an optional hosted service for deployment and observability.
How much do always-on projects cost?
Small is $25 a month (2 GB memory, 1 vCPU, 1 GB storage), Medium is $100 (8 GB, 4 vCPU, 10 GB) and Large is $200 (16 GB, 8 vCPU, 100 GB). Starter includes one Small project; Team includes one Small and two Medium.
Which models does Mastra support?
Models are specified as provider and model strings. The documentation shows OpenAI, Anthropic and Google and links to a full list of supported models on Mastra's site.
When should I move from Starter to Team?
On observability events alone, when you pass about 2.5M events a month. Starter costs $25 plus $10 per 100K events beyond 250K, which equals Team's $250 at 2.5M events. Team also adds two Medium projects, 180-day traces and a SOC 2 report.
Looking at alternatives? Mastra gives a TypeScript developer the parts to build an agent and, optionally, somewhere to run it. It does not build the agent for you. Autonoly is a managed service for businesses that want the automation working without owning a codebase. If you have TypeScript developers and a product to embed agents in, Mastra is a natural fit. If you do not have developers, a framework is not the missing piece. See the Autonoly review.
