The Agent ExaminerIndependent Review Authority
FrameworkOpen sourceNot yet hands-on tested

Mastra

Founded 2024 · San Francisco, USA

A modern TypeScript framework for AI agents and applications, with an optional hosted cloud.

What it is

Mastra is an open-source (Apache-2.0 core) TypeScript framework for building AI agents and applications — agents, workflows, memory, and observability — with an optional managed Mastra Cloud for deploying and observing them.

At a glance

7/7 facts sourced
Pricing
Self-hosted is free (Apache-2.0). Cloud Starter $0/mo with usage metering, Cloud Teams $250/mo, Enterprise custom; add-ons include memory at $10/1M tokens.source ↗
Hosting model
Dual — self-host the open-source TypeScript library on your own infra, or use managed Mastra Cloud.source ↗
Memory & state
Message history, working memory (persistent structured user data), semantic recall (embedding-based retrieval), and observational memory; requires a storage provider (PostgreSQL, LibSQL, or Redis).source ↗
MCP support
Nativesource ↗
Integrations
Tools and MCP servers, plus framework adapters for Next.js, React, Astro, Express, SvelteKit, and Hono, and data-source connectors.source ↗
Model providers
A model router to 90+ providers via a single provider/model API — OpenAI, Anthropic, Google, DeepSeek, Groq, Mistral, xAI, plus gateways like OpenRouter and any Vercel AI SDK model.source ↗
Open source
Yessource ↗
4.2of 5

Editorial scorecard

Overall 4.2 / 5

Our opinion — the same 0–5 rubric is applied to every platform, including Alfe. See the rubric.

Developer experience5/5
Pricing transparency & value4/5
Scalability4/5
Memory & state4/5
Integrations3/5
MCP nativeness5/5

Strengths

  • Core is open source (Apache-2.0) and free to self-host.
  • Native MCP plus a model router across 90+ providers with fallback.
  • Bundles several memory types — working memory, semantic recall, and observational memory.

Trade-offs

  • TypeScript-only, which excludes teams standardized on Python.
  • Memory requires an external storage backend (PostgreSQL, LibSQL, or Redis).
  • Mastra Cloud uses usage-based metering, making cost harder to predict than a flat fee.

Our take

Editorial opinion — not a hands-on test result

In our opinion, Mastra is one of the more polished options for TypeScript teams: the developer experience and MCP support are strengths, and the model router with fallback is genuinely useful. The trade-offs are language lock-in to TypeScript and the need to bring your own storage backend for memory. Its integration catalogue is narrower than the largest frameworks, so check that your specific connectors exist.

Sponsored

Alfe is a managed agent-hosting platform. If you want an agent hosted and running without wiring infrastructure yourself, see Alfe → (or read its dossier).

FAQ

Is Mastra free and open source?
The core is Apache-2.0 and free to self-host; enterprise directories are source-available, and Mastra Cloud has paid tiers.
Which LLM providers does Mastra support?
90+ providers via its model router, plus any model available through the Vercel AI SDK.

Compare Mastra

Sources

The Agent Examiner editorial · last updated 2026-07-01. Facts are drawn from each vendor’s own public materials; scores are our editorial opinion (methodology).

Product and company names are trademarks of their respective owners and are used here only to identify the products under discussion.