Mastra
TypeScript framework for AI agents with workflows, RAG, memory, evals, and observability built in.
About
Mastra packs agents, graph-based workflows, RAG, memory, evals, and observability into one TypeScript framework, created by the team that previously built Gatsby. Workflows compose with .then, .branch, and .parallel primitives and support suspend and resume with state persistence for human-in-the-loop steps, while the built-in model router connects to more than 40 providers including OpenAI, Anthropic, and Gemini through a single interface. Context management spans conversation history, retrieval, and observational memory, MCP servers plug in as tool sources, and bundled evals plus tracing cover measurement in both development and production. The local development experience centers on Mastra Studio, a playground served at localhost:4111, and a new project is one npm create mastra@latest command away. Core framework code is Apache-2.0, while enterprise features live in separate ee directories under a commercial Mastra Enterprise License, making it an open core project. At roughly 26.7k stars and more than 17,000 commits it leads the TypeScript agent framework field, with documentation at mastra.ai/docs.
Should you use Mastra?
Pick it when
Pick Mastra when your team ships in TypeScript and wants agents, suspendable workflows, RAG, memory, and evals in one framework, with a local Studio playground for iterating before deploy.
Look elsewhere when
Skip it if your stack is Python, where pydantic-ai or agno fit better, or if you only need streaming chat and tool calls, where the lighter vercel-ai-sdk does less. Enterprise features sit under a commercial license.
Alternatives to Mastra
- Vercel AI SDK
Lighter TypeScript toolkit with UI hooks for chat front ends, but no workflow engine, evals, or memory layer, so you assemble those yourself.
- LangGraph
Lower-level graph runtime with JS and Python libraries and checkpointed state; more control over loops, less bundled RAG, evals, and studio tooling.
- Google Agent Development Kit
Also ships a TypeScript version with graph workflows and A2A, but Python is primary and the tightest integration is Gemini on Google Cloud.
- Pydantic AI
Python counterpart with type-safe agents and durable execution; pick it when the team writes Python rather than TypeScript.
Reviews (0)
Leave a Review
No reviews yet. Be the first to review!
Details
- Category
- AI Agents & Orchestration
- Price
- Freemium
- Platform
- Local/Desktop
- Difficulty
- Intermediate (3/5)
- License
- Apache-2.0
- Added
- Jul 29, 2026