Overview
Mastra is a TypeScript-first framework for building AI agents and workflow-driven applications, created by the team behind the Gatsby web framework. Rather than stitching together separate libraries, it bundles every primitive a production agent needs: agents with tool use and memory, a graph-based workflow engine with explicit control flow, and built-in observability with tracing and evals. Developers connect to more than 1,000 models through a unified router, share tools via MCP, and ship agents inside existing React, Next.js, or Node.js apps, or as standalone Hono endpoints. The core is Apache-2.0 licensed and free to start; a managed platform adds Studio, Server, and Memory Gateway with a free Starter tier and metered Teams plan.
Key Features
- Agents with tool calling, observational memory, and multi-step reasoning out of the box
- Graph-based workflow engine supporting sequential, parallel, branch, and human-in-the-loop steps
- Unified model router with access to 1,000+ models across OpenAI, Anthropic, Google, and more
- MCP tool sharing and supervisor agents for coordinating specialized sub-agents
- Built-in observability: traces, token usage, scorers, and model-graded evals
- One-command deploy to Vercel, Netlify, or Cloudflare, or self-host anywhere Node.js runs
Pricing
| Plan | Price | For |
|---|---|---|
| Framework | $0 | Open-source Apache-2.0 core, self-hosted |
| Starter | $0 | Cloud Studio, unlimited users and deployments |
| Teams | $250/team/mo | Metered observability, CPU, egress for scale |
| Enterprise | Custom | RBAC, SSO, VPC isolation, SLA |
Comparison
Compared to LangChain, Mastra is purpose-built for TypeScript rather than Python, giving JS teams a batteries-included agent stack without leaving their language. Against CrewAI, it leans on a typed workflow engine and first-class observability instead of role-based multi-agent crews. Unlike Dify, which is a hosted low-code platform, Mastra is a developer framework you own and deploy inside your own infrastructure.