
mastra
Mastra is the modern TypeScript framework for AI-powered applications and agents.
The Lens
By Erik Loyd, SaaS CEO and former COO/CFO of an AWS Premier Partner.
Updated Sep 2026
Mastra is a TypeScript framework for building AI agents into a web app: agents with tools and memory, workflows that can pause for a human to approve and then resume, RAG, evals and tracing. It routes to 40+ model providers through one interface and drops into a Next.js or Node app, or runs as its own server. The core is Apache 2.0, from a Y Combinator company.
Self-hosting the framework just means deploying your app. The paid layer is Mastra Platform for tracing and hosted deployment: free for 100K events and 24 CPU hours a month, then Teams at $250/mo for 1M events, 250 CPU hours, six months of retention and SSO. Enterprise is custom.
TypeScript teams who don't want to live in Python: this is the most complete option. Solo and small teams: the free framework plus the free platform tier. Compare it with langchain-ai/langchainjs for a bigger ecosystem, or Vercel's AI SDK for something lower-level.
The catch is the ee folders. RBAC, SSO, fine-grained permissions and the visual agent builder sit under a separate Enterprise license: readable, but not for production without a paid key. Mastra has rewritten that license three times this year. Know which imports you're pulling in.
Free vs Self-Hosted vs Paid
open coreFree (self-hosted): The core framework (agents, workflows, memory, RAG, MCP, evals) is Apache 2.0. Deploy it anywhere you run Node.
Enterprise features (source-available): Anything under an ee/ directory, including RBAC, SSO, fine-grained authorization and the agent/workflow builder, is under the Mastra Enterprise Edition License. You can read and test it, but production use needs a signed agreement and a license key. Self-hosted Enterprise is one flat annual fee, price on request.
Mastra Platform (hosted): Starter $0/mo with 100K observability events (then $10 per 100K), 24 CPU hours (then $0.35/hr) and 15-day retention, unlimited users. Teams $250/mo with 1M events (then $8 per 100K), 250 CPU hours (then $0.25/hr), 6-month retention, SSO and SOC 2 docs. Enterprise is custom, with RBAC, audit logs and SLAs.
The real cost: LLM tokens from whichever providers your agents call.
The core framework is free under Apache 2.0. SSO and RBAC need an Enterprise key, and hosted Teams is $250/mo.
What to do by team size
- Solo
- free; framework plus the free platform tier
- Small team
- free; add Teams at $250/mo only if you need SSO
- Medium team
- free core; budget Teams or Enterprise once you need RBAC
- Large team
- Enterprise license for SSO, RBAC and self-hosted builder
Get tools like this every Wednesday
One featured tool, three on the radar. No fluff.
A low score is not a verdict on quality. Young and niche tools start low by design. How we calculate scores
Trust Signals
License: Apache-2.0 (core) + Mastra Enterprise License (ee/)
Core framework is Apache 2.0. Everything under ee/ directories (RBAC, SSO, fine-grained auth, agent builder) is source-available: no production use without a signed agreement and license key.
Commercial use: ✗ Restricted
About
- Owner
- Mastra (Organization)
- Stars
- 28,378
- Forks
- 2,874
Explore Further
More tools in the directory
openclaw
Your own personal AI assistant. Any OS. Any Platform. The lobster way. 🦞
390.7k ★everything-claude-code
The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
268.6k ★hermes-agent
The agent that grows with you
249.6k ★