Intermediate

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

DeveloperMastra (Kepler Software, Inc.)
TypeCode
LanguagesTypeScript
Open sourceYes
LicenseApache-2.0
First releaseOctober 2024
Suggested levelIntermediate
Use casesmulti-agent, workflows, RAG, chatbot
Self-hostableYes
Business modelFreemium
Cloud offeringYes
Multi-agentYes
MCP supportYes
Bring your own modelYes
Official siteOfficial site · Documentation · Repository

GitHub

Repositorymastra-ai/mastra
GitHub stars29,006
Forks3,031
Latest code activityOctober 22, 2026
Latest releasemastracode@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

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

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.