Typed agent definitions
Define typed agents with instructions, models, tools, and runtime behavior in one place, so the agent setup stays explicit and easier to maintain.
Mastra is an open-source TypeScript framework for AI agents and apps, with memory, workflows, model routing, MCP support, and observability.
Mastra is an open-source TypeScript framework for building AI-powered applications and agents. It is designed for teams that want to prototype quickly in TypeScript and move toward production with the same framework, instead of stitching together separate tools for agents, workflows, memory, and observability.
The product combines agent definitions, workflow orchestration, memory, model routing, and observability in one stack. The site positions Mastra as usable with frameworks like React, Next.js, Node, Astro, Express, SvelteKit, and Hono, or as a standalone server that can be deployed anywhere.
Define typed agents with instructions, models, tools, and runtime behavior in one place, so the agent setup stays explicit and easier to maintain.
Use a graph-based workflow engine to orchestrate multi-step processes with control flow like `.then()`, `.branch()`, and `.parallel()`, plus human-in-the-loop pauses.
Store conversation history and external context from APIs, databases, and files so agents can respond with the right information at the right time.
Track agent runs with traces, metrics, datasets, evals, and token usage to inspect behavior before and after changes.
Expose agents, tools, and structured resources through Model Context Protocol servers for systems that support MCP.
Route requests through a single interface to 90+ model providers, including OpenAI, Anthropic, and Gemini.
Add AI features to an existing product so users can build or interact with agents inside your app.
Build customer-facing assistants that answer questions, schedule appointments, send reminders, or complete tasks through chat, WhatsApp, or voice.
Create internal copilots for HR, sales, clinical documentation, or document generation where teams need domain-specific help.
Automate multi-step operational work such as deployment handling, incident debugging, or infrastructure tasks with explicit workflow control.
Let users query databases or dashboards in natural language and return answers, charts, or reports.
Mastra is an open-source TypeScript framework for building AI-powered applications and agents. The docs describe it as a way to prototype quickly and ship with confidence.
Yes. The docs say you can create a new project with a single command such as `npm create mastra@latest`, `pnpm create mastra`, `yarn create mastra`, or `bunx create-mastra`. Studio can be opened immediately after setup.
Mastra is designed to work with frontend and backend frameworks such as React, Next.js, Node, Astro, Express, SvelteKit, and Hono. It can also be deployed anywhere as a standalone server.
Mastra supports model routing through 90+ providers, including OpenAI, Anthropic, and Gemini.
Mastra offers both a hosted platform and a self-hosted Apache 2.0 option. The pricing page also mentions enterprise self-hosted licensing for teams that need controls such as RBAC, SSO, IAM, and network policy integration.