Back to vendors
M

Mastra

Also known as: Mastra Studio, Mastra Platform

Visit site
Entry priceTeams from $250 a month, with a free Starter tier. Enterprise is custom.Full pricing detail

Open source TypeScript framework for agents and workflows, with the Mastra Platform for hosted Studio, observability, evals and deployment.

Mastra is an open source TypeScript framework for building AI agents and applications, released under the Apache 2.0 license and installed from npm. An agent is defined in one place with its instructions, model, tools and memory, and the model is set as a provider and model string in Mastra's model router, which reaches thousands of models. Tools are typed functions the agent can call, and Mastra also supports MCP connections, subagents, skills, sandboxes and channel integrations.

Workflows compose typed steps, retries and branches into durable multistep processes, and a harness coordinates multimode agents over shared state, threads and storage. The same harness runs Mastra Code, its coding agent. Memory gives agents durable context through message history, observational memory and semantic recall. Agents can also be given a browser, through a local Playwright-based provider or hosted browser services, with a live screencast of the session in Mastra Studio. Mastra also ships Factory, a system of specialized agents that takes software from issue to production.

The Mastra Platform hosts Studio, deployments, observability and evals. Traces record each agent run step by step alongside logs and metrics, and scorers, datasets and experiments score agent behavior across runs. The Platform has a free Starter tier, a Teams tier that adds SSO, multiple teams and SOC 2 documentation, and an Enterprise tier with RBAC, audit logs, support SLAs and on-premises or own-cloud deployment. A separately licensed self-hosted Enterprise edition adds RBAC, SSO, IAM and network policy integration and keeps traces, prompts and outputs inside the customer's VPC.

Vendor details

Canonical URL

https://mastra.ai/

Category

Agent infrastructure

Company status

independent

Use cases & customers

Target customers

developersenterprises

Deployment options

SaaSself-hosted

Integrations

Custom tools defined with createTool take a typed input schema and an execute function that can call any system. Mastra also connects to MCP servers and offers a large integrations catalog, and channel integrations cover Slack, GitHub, Microsoft Teams and WhatsApp. Traces export through OpenTelemetry and Datadog exporters, and agents and workflows on a Mastra server are reachable through a Mastra Client, custom API routes and A2A.

In practice

Your team works in TypeScript and wants its agents in the same language. Mastra is TypeScript native, giving you agents, tools, memory, and workflows in one stack that integrates with Next.js and Node.

Part of your process needs an agent's judgment and part needs deterministic steps in a fixed order. Mastra's workflows mix agent reasoning with plain code in type-safe control flow, and can pause for human approval before resuming.

You don't want to commit to one model provider or wire up evals and tracing yourself. Mastra routes across thousands of models through one interface and ships built-in scorers, guardrails, and observability.

Agentic Index coverage score

14.0 / 14 capabilities · 100%

Integrations & Tool Calling Full

Custom tools are defined with createTool, a typed input schema and an execute function that can call any system, and are passed to the agent. Mastra also connects to MCP servers and offers a large integrations catalog.

SourceMastra, mastra.ai/docs and mastra.ai/llms.txtread 2026-09-21

Workflow Orchestration Full

Workflows compose typed steps, retries and branches into durable multistep processes, with agents and tools callable as workflow steps, so fixed steps and agent steps run in one process. A harness coordinates multimode agents over shared state.

SourceMastra, mastra.ai homepage and mastra.ai/pricingread 2026-09-21

Knowledge Grounding & RAG Full

Workspace search keeps searchable content in a separate index, queried by BM25 keyword, vector or hybrid search, and content from files, databases, APIs or other application sources can be added to it. Search and indexing tools are given to the agent, so it can look up the customer's own content as it works.

SourceMastra, mastra.ai/docs/sandbox/searchread 2026-09-21

Human Oversight & Guardrails Full

A tool marked for approval pauses before it executes and a person approves or declines it, with an optional reason returned to the model; approval can be required for one tool, for every call in a request, or decided per call by a function over the tool name and arguments, and a running tool can also suspend for confirmation, so low and high risk actions can run under different autonomy modes.

SourceMastra, mastra.ai/docs/agents/human-in-the-loopread 2026-09-21

Security, Identity & Governance Full

SSO and multiple teams come with the Teams plan, RBAC and audit logs with Enterprise, and RBAC, SSO, IAM and network policy integration with the licensed self hosted edition. SOC 2 documentation is offered on the Teams plan, and a hosted trust center is published.

SourceMastra, mastra.ai/pricing and trust.mastra.airead 2026-09-21

Observability & Auditability Full

Traces record each agent run step by step, including input processors, model calls, steps and tool calls, alongside logs and metrics. On the Platform, traces are kept 15 days on Starter and six months on Teams, Enterprise adds audit logs, and OpenTelemetry and Datadog exporters are available.

SourceMastra, mastra.ai homepage and mastra.ai/pricingread 2026-09-21

Memory & State Persistence Full

Memory gives agents durable context across sessions. Working memory stores persistent, structured facts about a user such as names, preferences and goals, and semantic recall retrieves relevant past messages by meaning, both scoped by default to the resource, a stable identifier for the user or entity.

Observational memory uses background agents to keep a dense observation log that replaces raw history as it grows, scoped to the thread, and message history is stored per thread in the storage provider the developer configures. On the hosted Platform, stale threads are kept 15 days on Starter and six months on Teams, with custom retention on Enterprise.

Sourcemastra.ai/docs memory overview and mastra.ai/pricingread 2026-10-25

Deployment & Data Residency Full

The Apache 2.0 framework builds and hosts agents anywhere, and the licensed self hosted Enterprise edition keeps traces, prompts and outputs inside the customer's VPC. Enterprise also offers the Mastra Platform deployed on premises or in the customer's own cloud.

SourceMastra, mastra.ai/pricingread 2026-09-21

Prebuilt Agents, Templates & Packs Full

Mastra ships Factory, a system of specialized agents that takes software from issue to production, and Mastra Code, a coding agent running on the Mastra harness. Each is a product in its own right.

SourceMastra, mastra.ai homepageread 2026-09-21

Triggers & Channel Coverage Full

A schedule runs an agent on a cron cadence, persisted across restarts and redeploys, and on each fire Mastra sends the prompt into a thread as a signal or as a standalone run, so the agent wakes without a person starting it. The same service schedules workflows, and channel integrations cover Slack, GitHub, Microsoft Teams and WhatsApp.

SourceMastra, mastra.ai/docs/harness/schedules and mastra.ai/llms.txtread 2026-09-21

Model Flexibility & Routing Full

The developer sets each agent's model as a provider and model string in Mastra's model router, which reaches thousands of models across providers such as OpenAI, Anthropic and Google, and the Platform gateway also accepts the customer's own keys.

SourceMastra, mastra.ai/docs, homepage and mastra.ai/pricingread 2026-09-21

APIs, SDKs & MCP Extensibility Full

Mastra is a TypeScript SDK installed from npm as @mastra/core, and agents and workflows registered on a Mastra server are exposed to outside callers through a Mastra Client, custom API routes and A2A, with a full API reference.

SourceMastra, mastra.ai/docs, homepage and mastra.ai/llms.txtread 2026-09-21

Testing, Debugging & Optimization Full

Scorers, datasets and experiments score the customer's agent on named checks such as correct tool selection and correct answer, with results compared across runs. Mastra offers built in and custom scorers, gates and verdicts, and evals that run in CI.

SourceMastra, mastra.ai homepage and mastra.ai/llms.txtread 2026-09-21

Browser & Computer Use Full

Assigning a browser to an agent gives it tools to open URLs, select and interact with page elements, fill forms and read content, through the Playwright-based AgentBrowser provider that launches a local browser, and Mastra Studio shows a live screencast of the agent's session.

SourceMastra, mastra.ai/docs/browserread 2026-09-21

The Agentic Index coverage score grades every vendor Full, Partial or Not documented against the same 14 buyer facing capabilities, from public evidence only. Each capability links to how all vendors in the index score on it. How this evidence is graded

Product updates

·MCP / tool calling / APIVerified

MCP servers built with Mastra can now send events to connected clients by push, poll or webhook, instead of only answering requests. Agents receive each event in their thread as a notification, and workflows can start a run from one, so a failed deploy or a merged pull request can set work in motion. The feature is experimental, needs @mastra/mcp 2.5.0 or later, and records event traces automatically when observability is set up.

Bears on: MCP / tool calling / API

View source
·IntegrationsVerified

Mastra Connect, now in public beta, lets a Mastra platform project authorize 23 providers such as Linear, Notion, Slack, GitHub, HubSpot, Jira and Snowflake and hand agents ready made tools, almost 900 in all plus 7 hosted MCP providers. Credentials are injected through a platform proxy that records each call, and Slack, Discord and Telegram can serve as agent channels.

Bears on: Security / enterprise

View source
·Deployment / data residencyVerified

Any environment on Mastra's hosted platform can now get a Postgres database that accepts connections only from inside the same private network. It is created with one CLI command or at deploy time, placed in the environment's region and wired in automatically.

Bears on: Memory / state

View source
View all 15 Mastra updates →Tracked since Dec 2025 · Verified from public vendor sources

Pricing

Teams from $250 a month, with a free Starter tier. Enterprise is custom.

Hybrid. A monthly tier fee covers an allowance, and usage beyond it is metered on observability events, CPU time, egress, memory tokens and retrieval storage. The framework itself is free to self host.

Free tier

Included quota

The framework is free under Apache 2.0 and self hosted. Starter ($0) includes 100K observability events, 24 CPU hours, 15 day retention, 10GB egress and unlimited users, deployments and projects. Teams ($250 a month) includes 1M events, 250 CPU hours, six month retention, 100GB egress, multiple teams, SSO and SOC 2 documentation. Enterprise adds custom volume and retention, RBAC, audit logs and support SLAs.

What is public

The framework is free under Apache 2.0. The Mastra Platform publishes Starter at $0 and Teams at $250 per month, each with stated allowances and overage rates for observability events, CPU time, egress, memory tokens and retrieval storage. Enterprise is custom. A licensed self hosted Enterprise edition is priced by sales. Model usage is billed at market rate plus 5.5% through the gateway, or directly by the provider on the customer's own key.

Billing mechanics

There are two paths. Customers can self host the Apache 2.0 framework at no charge and pay their own infrastructure and model costs, or use the Mastra Platform, with a monthly tier fee plus metered usage on observability events, CPU time, egress, memory tokens and retrieval storage. A licensed self hosted Enterprise edition is sold for one flat annual fee with no per trace or per seat metering.

Cost watchouts

Platform usage is metered beyond each tier's allowance on observability events, CPU time, data egress, memory tokens and retrieval storage. A 24/7 persistent server is $100 per project. Model tokens through the Mastra gateway carry a 5.5% markup over market rate unless the customer brings its own key.

Variable cost rationale

The Platform meters observability events, CPU hours, data egress, memory tokens and retrieval storage beyond each tier's allowance, so the bill grows with trace volume, compute time and how much agents remember and retrieve. Model tokens routed through the Mastra gateway add market rate plus 5.5% on top, and a persistent server adds a flat $100 per project. Each tier's included allowance and the published overage rates bound the cost of every unit. Bringing your own model key removes the gateway markup, self hosting the free framework leaves only infrastructure and model costs, and the licensed self hosted Enterprise edition is one flat annual fee with no per trace or per seat metering.

Additional watchouts

Metering spans several dimensions, so production cost tracks trace volume and CPU time. SSO starts at Teams, while RBAC and audit logs start at Enterprise.

Overage / add-ons

On Starter, overage runs $10 per 100K observability events, $0.35 per CPU hour and $0.10/GB egress. On Teams it runs $8 per 100K events, $0.25 per CPU hour and $0.10/GB egress. Memory tokens beyond the included amount cost $10 per 1M, retrieval storage $20/GB and a persistent 24/7 server $100 per project. Gateway tokens bill at market rate plus 5.5%, or customers bring their own key.

Sales call required

Mixed (some tiers require a call)

Free / trial

Free Starter plan at $0 a month with 100K observability events and 24 CPU hours, plus the free Apache 2.0 framework

Lowest paid plan

Teams at $250 per month, plus metered usage beyond its allowance

Commercial notes

Beside the free framework, Mastra sells the hosted Mastra Platform (Starter, Teams, Enterprise) and a licensed self hosted Enterprise edition for teams that need RBAC, SSO, IAM and network policy integration with data kept in their own VPC.

Key ambiguities

Enterprise pricing for the Platform and for the licensed self hosted edition is quoted by sales. Starter and Teams publish their allowances and overage rates.

Cancellation / refund

The framework has no contract. Starter is free and Teams is self serve at $250 per month, while Enterprise and the licensed self hosted edition are contracted through sales.

Support SLA / resale

Enterprise adds a dedicated support engineer, architecture and design meetings, a shared Slack channel and SRE support, with support and uptime SLAs covering weekday business hours. On premises platform deployment is offered.

Missing data

Enterprise pricing (Platform and licensed self hosted) is not published.

Agentic Index verified 2026-10-25

Alternatives to Mastra

The closest documented capability profiles to Mastra among agent infrastructure platforms tracked by Agentic Index, ordered by similarity on the same 14 point evidence the rankings use. No vendor pays for placement.

  • Agno13.0 / 14A lighter documented profile than MastraMastra vs Agno →
  • Tray.ai13.0 / 14A lighter documented profile than Mastra
  • Kestra12.5 / 14A lighter documented profile than Mastra
  • Haystack12.0 / 14A lighter documented profile than Mastra
  • LlamaIndex12.0 / 14A lighter documented profile than Mastra
  • Pydantic AI12.0 / 14A lighter documented profile than Mastra

Similarity is computed from each vendor's Agentic Index coverage score evidence, axis by axis, not from the totals. How this evidence is graded

Contact us

Found a vendor we missed? Have feedback on the index? We'd love to hear from you.