Integrations
Supports MCP and a model router for many models, with OpenAI, Anthropic, Google and xAI as scaffold providers. Case studies mention Slack and Teams agents, and a changelog post covers Jira and GitLab incident integrations.
TypeScript framework for building, observing and shipping AI agents

Mastra is a TypeScript framework for building AI agents, workflows and memory, with MCP support, a local Studio, built-in tracing and evals, and deployment to Mastra Cloud for teams moving from prototype to production.
Mastra is an open TypeScript framework for building AI agents and applications. It bundles the pieces that agent projects usually assemble by hand: typed agents, workflows, memory, tools, MCP support, a local server and built-in observability. The aim is to carry a prototype all the way to a production deployment without swapping stacks along the way. The framework is aimed at TypeScript developers and engineering teams who want agents embedded in real products or internal systems. Agents are declared in code with instructions, a model string and a set of tools. Workflows chain typed steps with retries and branches, so deterministic business processes can sit next to open-ended reasoning. Memory covers recent messages, semantic recall and an observational memory option, all tied to threads. A harness coordinates multi-mode agents (for example plan and build modes) with shared state and storage, and a factory package describes a group of specialized agents that move software from issue to production. In practice, a project starts with a single create command that scaffolds the app for a chosen provider (OpenAI, Anthropic, Google or xAI) and installs skills for detected coding assistants. A dev server then opens Mastra Studio locally on port 4111, where agents, workflows and tools can be built, tested and managed. The same app can be registered on one Mastra server and deployed to Mastra Cloud. A model router gives access to a large catalog of models through one interface. Observability is a central selling point. Traces show each model call, tool call and handoff on a searchable timeline, metrics follow latency, cost and tool usage, and datasets capture traces and feedback for repeatable evaluation. Evals score runs against checks before changes ship, and signals route webhook or polling events into agent threads. Among alternatives, Mastra sits with code-first agent frameworks rather than visual no-code builders. It suits teams comfortable with TypeScript who want ownership of the architecture. Published customer stories include Salesforce, MongoDB, Sanity, WorkOS and Replit, covering coding harnesses, content agents and internal agent platforms.

Supports MCP and a model router for many models, with OpenAI, Anthropic, Google and xAI as scaffold providers. Case studies mention Slack and Teams agents, and a changelog post covers Jira and GitLab incident integrations.
Typed agents, typed workflows with retries and branches, memory (recent messages, semantic recall, observational memory), a multi-mode harness, a factory of specialized agents, a local server with Studio, and observability covering traces, metrics, datasets, evals and signals.





