MASTRA FRAMEWORK
Build Agents with
a Modern TypeScript Stack
Agents
Build AI-powered applications and agents with an all-in-one framework.

Everything You Need to Build AgentsGet agents to production faster with primitives for tool use, memory, and multi-step reasoning. Connect to 1000+ models through a unified model router.
ToolsGive agents the ability to act. Define tools and share them across agents via MCP.
MemoryTrack the context that matters across sessions — from basic message persistence to SoTA observational memory that learns about your users automatically.
Tool ApprovalRequire a human or external system to approve or reject any tool call before it executes.
WorkspacesGive your agents access to filesystems, sandboxed code execution, and reusable skill files.
Supervisor AgentsSplit complex work across specialized agents that each handle one job. Coordinate them with a supervisor.
Go to ProductionMake your agent production-ready. Add guardrails, scorers, evals, and tracing.
Workflows
Orchestrate complex, multi-step processes. Combine agents, tools, and logic in a single type-safe flow.
Control Every Step PreciselyDefine exactly what happens, when, and in what order — sequential steps, parallel branches, conditional logic, and loops.
Break It Down into StepsCall an agent or run deterministic code at each step. Use models where you need reasoning, plain functions where you don't — and keep inference costs under control.
Human-in-the-LoopAny step can suspend execution, hand control to a human, and resume when input arrives.
Rewind and ReplayPersist workflow state automatically. Suspend a workflow and resume whenever ready — or time-travel back to any step with its original context to debug or replay.
Connect Agents and ToolsWrap any agent or tool as a workflow step. Agents generate, tools execute.
Studio
Test agents, trace execution, and refine prompts together. Connect your own frontend when you're ready to ship.

Iterate FastRun agents and workflows in Studio. Test prompts, swap models, adjust parameters — and see results instantly.
Trace Every StepFollow execution traces to see exactly where an agent stalled or made the wrong call. Record every step with timing, inputs, and outputs.
Invite Domain ExpertsEdit prompts and create datasets directly in the UI. Hand it to your product manager, designer, or data scientist — no code required.
Collaborate with Your TeamBuild and test Mastra agents in Studio, then bring in non-technical domain experts to test behavior, annotate traces, create datasets, and refine prompts in the editor.

Observe and EvaluateMonitor agents in production — token usage, latency, error rates, and costs. Link every metric back to traces to find the root cause.
Platform pricingFull Pricing
Enterprise SupportNeed help?
Agent Lifecycle Support
- Planning & discovery
- Rapid prototyping
- Productionizing with evals & observability
- Hands-on training workshops
Collaboration & SLAs Support
- Architecture & design meetings
- Shared Slack support channel
- Separate service SLAs
- SLA support 8-5 Monday–Friday, 8am–6pm PST
On-prem platform deployments
- Deploy Mastra Platform on-prem or in your cloud
- Collaborate with your team in Mastra Studio with SSO and RBAC
- SRE support 8-5 Monday–Friday, 8am–6pm PST
Mastra is powering the best AI teamsCase Studies
How Replit Agent 3 creates thousands of Mastra agents every day
How SoftBank is restoring Japan's white-collar productivity using Mastra
How Sanity Built a Content Agent That Actually Understands Your CMS
How Marsh used Mastra to build Agentic Search for 100k employees