Mastra

TypeScript framework for AI agents and apps from the team behind Gatsby — agents, graph workflows, memory, RAG, evals, MCP and A2A.

Mastra is a TypeScript framework for AI-powered applications and agents, built by the founders of Gatsby (YC-backed). Agents use tools and memory; a graph workflow engine (.then(), .branch(), .parallel()) supports suspend and resume for human-in-the-loop; model routing reaches dozens of providers. RAG, evals/scorers and observability are built in, along with MCP servers and client, and A2A in both directions. Embed it in React, Next.js or Node apps or run it as a standalone server; Studio helps develop and debug locally. Licensing is open-core: the framework is Apache-2.0, while ee/ features fall under the Mastra Enterprise License (free for development, paid in production). The managed Mastra Platform offers hosting with a free Starter tier.

When to use

  • TypeScript AI applications and agents
  • Agent workflows that need evals and observability built in
  • Embedding agents in React, Next.js or Node apps
  • Rapid prototyping in a TypeScript stack

When not to use

  • Python-only teams
  • Plain JavaScript projects that won't adopt TypeScript
  • You want every feature under an open-source license (ee/ features are commercial)

At a glance

Pricing
Open core
Deployment
Self-hosted
Difficulty
Intermediate
License
Apache-2.0
Languages
typescript
Use cases
agent orchestration, workflow automation, rag pipeline, typescript ai
Last verified
2026-10-20 (official documentation)

Works well with

Alternatives in this category

See all 10 tools in Agent Frameworks — Building AI Agents →

⚖️ Compare Agent Frameworks

Sources

v7.0