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 Agents
Get agents to production faster with primitives for tool use, memory, and multi-step reasoning. Connect to 1000+ models through a unified model router.Tools
Give agents the ability to act. Define tools and share them across agents via MCP.Memory
Track the context that matters across sessions — from basic message persistence to SoTA observational memory that learns about your users automatically.Tool Approval
Require a human or external system to approve or reject any tool call before it executes.Workspaces
Give your agents access to filesystems, sandboxed code execution, and reusable skill files.Supervisor Agents
Split complex work across specialized agents that each handle one job. Coordinate them with a supervisor.Go to Production
Make 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 Precisely
Define exactly what happens, when, and in what order — sequential steps, parallel branches, conditional logic, and loops.Break It Down into Steps
Call 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-Loop
Any step can suspend execution, hand control to a human, and resume when input arrives.Rewind and Replay
Persist 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 Tools
Wrap 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 Fast
Run agents and workflows in Studio. Test prompts, swap models, adjust parameters — and see results instantly.Trace Every Step
Follow execution traces to see exactly where an agent stalled or made the wrong call. Record every step with timing, inputs, and outputs.Invite Domain Experts
Edit prompts and create datasets directly in the UI. Hand it to your product manager, designer, or data scientist — no code required.Collaborate with Your Team
Build 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 Evaluate
Monitor agents in production — token usage, latency, error rates, and costs. Link every metric back to traces to find the root cause.Platform pricing
Full PricingEnterprise Support
Need 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 teams
Case StudiesHow 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