What it is
Mastra is a batteries-included TypeScript framework for building AI agents and agentic apps. It bundles agents with tools, graph-style workflows, several kinds of memory, RAG, evals (scorers), MCP support and a local Studio UI for testing, and it plugs into existing Express, Hono, Fastify or Koa servers. It reached a stable 1.0 in January 2026 and has been Apache-2.0 licensed since July 2025 (enterprise features live in separate `ee/` directories).
How it works
You register agents, tools and workflows on a central Mastra instance. An agent is a model (picked with a `provider/model` string via Mastra's model router) plus instructions, tools and optional memory; a workflow is a typed chain of steps with branching, parallelism, loops and suspend/resume for human input. Run `npm create mastra@latest` to scaffold a project and open Studio to chat with agents, step through workflows and inspect traces.
Key concepts
- Agent
- A model plus instructions, tools and memory that decides which tools to call to reach a goal.
- Workflow
- A multi-step pipeline of typed steps with branching, parallel execution, loops and suspension.
- Working memory
- Persistent, structured facts about the user, app or task that the agent keeps across turns.
- Semantic recall
- Retrieves relevant older messages by meaning and re-inserts them into the prompt.
- Scorer
- An eval that grades agent or workflow outputs with model-graded, rule-based or programmatic checks.
- Studio
- A local interactive UI to test agents, run workflows and inspect traces.
Use it when
- Your product is a TypeScript/Node.js app and you want agents, workflows, memory and evals in one framework.
- You want to embed agents into an existing web server or Next.js app rather than run a separate Python service.
- You want a local playground (Studio) and built-in tracing exporters for tools like Langfuse.
Look elsewhere when
- Your team and ML stack are in Python — LangGraph, CrewAI or Pydantic AI fit better.
- You only need model calls and tool calling in the browser or a route handler — the Vercel AI SDK alone may be enough.
Who uses it
- Replit
Replit's Agent 3 generates Mastra agents and spins up thousands of Mastra agent sandboxes weekly.
Evidence: mastra.ai
- SoftBank
Satto Workspace, which turns text prompts into branded presentations, is built on Mastra agents.
Evidence: mastra.ai
- Sanity
Content agent for its CMS.
Evidence: mastra.ai
- Marsh McLennan
Internal agentic search tool used by tens of thousands of employees.
Evidence: mastra.ai
Milestones
- Mastra raised a $22M Series A led by Spark Capital and launched its commercial platform. (x.com)
- Mastra 1.0 released as stable, with server adapters, composite storage and AI SDK v6 support. (mastra.ai)
- License changed from Elastic License 2.0 to Apache 2.0. (mastra.ai)
Start learning
mastra.ai
- Mastra course ↗course
mastra.ai
mastra.ai
mastra.ai