Mastra: a TypeScript framework for AI agents and workflows
Mastra is an open-source framework for building AI agents, workflows and AI-powered apps entirely in TypeScript. It is aimed at web developers who would rather stay in the JavaScript ecosystem than switch to Python.
Data as of October 22, 2026
Key figures
| Developer | Mastra (Kepler Software, Inc.) |
|---|---|
| Type | Code |
| Languages | TypeScript |
| Open source | Yes |
| License | Apache-2.0 |
| First release | October 2024 |
| Suggested level | Intermediate |
| Use cases | multi-agent, workflows, RAG, chatbot |
| Self-hostable | Yes |
| Business model | Freemium |
| Cloud offering | Yes |
| Multi-agent | Yes |
| MCP support | Yes |
| Bring your own model | Yes |
| Official site | Official site · Documentation · Repository |
GitHub
| Repository | mastra-ai/mastra |
|---|---|
| GitHub stars | 29,006 |
| Forks | 3,031 |
| Latest code activity | October 22, 2026 |
| Latest release | mastracode@0.48.0 (October 21, 2026) |
GitHub activity checked on October 22, 2026.
What Mastra actually does
Mastra bundles the building blocks of an AI product into one framework. An AI agent receives a goal, decides which tools to use through tool calling, and loops until it has a final answer. When you need tighter control, the workflow engine lets you spell out each step yourself, with sequential steps, branches and parallel runs. The framework also handles conversation history, retrieval over your own data (known as RAG) and a so-called observational memory.
Two features matter a lot once you ship. First, suspend and resume: an agent or workflow can pause to wait for a person’s approval and pick up exactly where it stopped, the human-in-the-loop pattern. Second, built-in evals and observability that help you measure answer quality over time. Mastra can also expose your agents and tools as an MCP server, and coordinate several agents through subagents.
Who it is for
Mastra targets TypeScript developers. In practice, it suits a team that already runs a Next.js or Node.js app and wants to add an assistant, a support agent or an internal automation without changing languages. Expect an intermediate learning curve: you should be comfortable with npm, environment variables and an API key.
Getting started
The official docs recommend the project scaffolder, npm create mastra@latest, which asks for a project name and a model provider. Once the dev server is running, a local interface called Mastra Studio lets you try agents, workflows and tools in the browser. Templates and an online course are available if agents are new to you.
Strengths, limits and alternatives
Strengths. Pure TypeScript, agents and workflows in one place, pause-and-resume, built-in evals, Apache 2.0 for the core.
Limits. It is a young project: version 1.0 of the core package shipped in January 2026 and the APIs keep moving. The dual license means you should check that you aren’t running an “ee” feature in production without a license. Pull requests are limited to collaborators, so the community mostly contributes through bug reports.
Alternatives. If you want a lightweight toolkit rather than a full framework, the Vercel AI SDK is leaner. On the Python side, LangGraph gives similar control over workflows and Agno takes a platform approach. To compare them all, see our AI agent frameworks overview.
Official site: mastra.ai.
Frameworks of the same type
- Agno · multi-agent, workflows, RAG
- Amazon Bedrock Agents / AgentCore · multi-agent, RAG, workflows
- BeeAI Framework · multi-agent, workflows, RAG
- Google Agent Development Kit (ADK) · multi-agent, workflows, chatbot
- Haystack · RAG, chatbot, workflows
- LangChain · chatbot, RAG, workflows
Frequently asked questions
Is Mastra free?
The framework is open source and free, and you can host it anywhere. As of October 22, 2026, the company also sells a cloud offering with a free Starter tier, a Teams tier at $250 per month and custom Enterprise pricing. Model calls are still billed by the model providers.
What license does Mastra use?
The core framework is Apache 2.0. Code in directories named “ee” falls under a separate enterprise license: you can read it and use it for development, but production use requires a license.
Do I need Python to use Mastra?
No. Mastra is built for TypeScript and plugs into React, Next.js or Node.js. That is its main appeal for web teams that don't want to maintain a separate Python service.
Can Mastra switch between model providers?
Yes. Its model router gives you one interface for OpenAI, Anthropic, Google and other providers, so you can change models without rewriting your agent.
Data sources
- github.com
- github.com
- mastra.ai
- mastra.ai
- registry.npmjs.org
- GitHub — Repository metadata: GitHub
Data as of October 22, 2026
Report an error
Does a figure, a date or a fact look wrong? Tell us: every report is checked.