Mastra is a TypeScript framework for building agents and AI applications. It was designed for the JavaScript ecosystem, with direct integration into web frameworks such as Next.js, Astro, Hono and Express.
What it is for
- Agents with tools, memory and instructions in TypeScript
- Workflows with chained steps, branches and state control
- Evaluations (evals) and execution observability
- RAG, subagents, sandboxes and connections to MCP servers
- Agent APIs inside a web product or Node.js service
How it works
- The developer declares agents, tools, workflows and memory
- A Mastra server exposes the agents and flows to the application
- Mastra Studio provides a local interface to test and debug
- Storage and memory persist conversation context
- Built on top of the Vercel AI SDK, with support for multiple model providers
License and maintenance
- Open-source core under the Apache 2.0 license;
ee/directories have a separate enterprise license - Active development with frequent releases in 2026
- The company offers managed platform, observability and studio services
Strengths
- End-to-end TypeScript with a good developer experience
- Natural integration with Next.js and other web stacks
- Agent, workflow, memory and eval features in the same framework
Limitations
- Does not serve teams working mainly in Python
- Smaller ecosystem than older frameworks
- Some advanced features are part of the commercial offering
