Mastra
The leading TypeScript agent framework·mastra.ai
Mastra is an open-source TypeScript framework for building AI-powered applications and agents. It provides AI primitives including agents, workflows, workspaces, memory, MCP servers, observability and evals for TypeScript and JavaScript developers. It integrates with frontend and backend frameworks like React, Next.js and Node, or can be deployed anywhere as a standalone server.
What it's for
Features 16
- Authoring of Model Context Protocol (MCP) servers
- Browser automation via AgentBrowser, Stagehand, and Firecrawl
- Built-in deployers for Vercel, Netlify, and Cloudflare
- Built-in observability: traces, metrics, logs, evals, experiments, scorers, datasets
- Channel adapters for Slack, Microsoft Teams, Discord, Telegram, WhatsApp, and iMessage
- Graph-based workflow engine with .then(), .branch(), and .parallel() control flow
- Guardrails to process inputs/outputs and help prevent prompt injection
- Harness for coordinating multi-mode agents with shared state and storage
- Human-in-the-loop workflow suspend/resume with persisted execution state
- Mastra Studio for monitoring, iterating, and collaborating on agents
- Model routing across 90+ AI providers through one standard interface
- Observational memory, semantic recall, and working memory for agents
- Persistent agent workspace filesystem and sandboxing
- Standalone server powered by Hono, or integration with existing servers
- Subagents support and A2A/ACP agent-to-agent protocols
- Typed agents combining models, tools, instructions, and runtime behavior
At a glance
Integrations
Complianceself-reported
Pricing
The Mastra Platform's Starter and Teams tiers charge a flat monthly base fee plus numerous metered overage rates (observability events, CPU time, data egress, gateway token markup of market rate + 5.5%, memory tokens, storage, database compute). Enterprise tiers on both the platform and self-hosted license tracks are custom-quoted.
Self-hosted cloud-platform starter tier with usage-based overages.
100K observability events, 24 CPU hours, 15 days data retention, 1GB platform data storage
Multiple teams, SSO, and SOC 2 docs
1M observability events, 250 CPU hours, 6 months data retention, 100GB platform data storage, multiple teams, SSO, SOC 2 docs
Quote-based custom pricing; contact sales.
Custom volume and retention
Build and host agents anywhere under the Apache 2.0 open-source license.
Licensed under the Mastra Enterprise License; custom pricing via sales.