Mastra
FreemiumOpen-source TypeScript framework for building AI agents and durable workflows, with memory, RAG, evals and an optional hosted platform.
What is Mastra?
Mastra is an Apache 2.0 licensed TypeScript framework for building AI agents and agentic workflows, created by the team behind Gatsby. It provides the pieces engineers otherwise assemble themselves: agent primitives, persistent memory, retrieval-augmented generation, workflow orchestration, evaluation harnesses and MCP support, with a local development playground for testing behaviour before deployment. Position it correctly against the no-code tools in this category. Mastra is a developer framework, not a visual builder, so it assumes TypeScript fluency and offers control rather than speed to first automation; teams wanting drag-and-drop should look elsewhere entirely. The framework itself is free to self-host under a permissive licence, with a separate managed cloud platform for deployment and observability priced independently, so evaluate the two decisions separately.
Key Features
Integrations
How to Use Mastra
✅ Best For
- TypeScript engineering teams shipping AI agents inside an existing Next.js, React or Node application rather than adopting a separate no-code platform
- Developers who want agents, memory, RAG, workflows and evals from one coherent framework instead of assembling four libraries that were never designed together
- Teams that need agent output quality measured, since built-in model-graded, rule-based and statistical evals let you track regression over time
- Organisations with data residency requirements, because the framework is fully self-hostable and enterprise deployments keep traces and prompts inside your own VPC
❌ Not For
- Non-technical users entirely, since Mastra is a code framework with no visual builder for the core workflow authoring experience
- Python-first teams, as Mastra is purpose-built for TypeScript and a Python shop is better served by frameworks in its own ecosystem
- Teams wanting prebuilt SaaS connectors out of the box, because Mastra gives you primitives and tools rather than a library of thousands of app integrations
- Anyone needing a finished product today, as building a reliable production agent is engineering work regardless of how good the framework is
Reviews
No reviews yet. Be the first to review Mastra!
Pricing
- ✓Apache 2.0 licensed
- ✓self-host anywhere
- ✓agents
- ✓workflows
- ✓memory and evals included
- ✓100K observability events
- ✓24 CPU hours
- ✓15-day retention
- ✓unlimited users and projects
- ✓1M observability events
- ✓250 CPU hours
- ✓6-month retention
- ✓multiple teams
- ✓SSO and SOC 2 docs
- ✓Custom volume and retention
- ✓RBAC
- ✓audit logs
- ✓uptime SLAs
- ✓dedicated support engineer
- ✓Flat annual fee
- ✓enterprise controls
- ✓data stays in your VPC
- ✓no per-trace or per-seat metering
Prompts to Try
Scaffold a Mastra agent that answers product questions using a RAG pipeline over our docs
Build a durable workflow that chains three agents with typed inputs and outputs
Add an eval suite that scores agent responses for factual accuracy over time
Deploy this Mastra agent as a standalone Hono server on Cloudflare Workers