Builder infrastructure
Mastra
TypeScript AI framework for agents and apps.
Mastra is an open-source TypeScript framework for building AI agents, plus a hosted platform for running and observing them. The framework covers agents, typed workflows, memory, a long-running "Harness", browser control and channel adapters; the platform adds tracing, evals, deployments and managed storage. Its distinguishing emphasis is durability - agents that run for days, with suspend/resume, snapshots, time travel and scheduled workflows as first-class documented concepts.
Vendor's own claim
What Mastra is
Vendor's own claimMastra is developer infrastructure, not a GTM application - it is the thing you build a sales agent with, not the sales agent. The framework is open source and self-hostable at no cost; the commercial product is Mastra Platform, whose metering is unusually granular. Rather than seats, it bills observability events, CPU time, data egress, memory token usage, retrieval storage, LibSQL rows written, Postgres compute hours and database storage, each with an included allowance and an overage rate. Studio users, deployments and server deployments are unlimited even on the free tier. There is also a model gateway charging market rate plus 5.5%, though bring-your-own-key is listed on every tier. An enterprise self-hosted licence is offered as one flat annual fee with no per-trace or per-seat metering and no traces, prompts or outputs leaving the customer's VPC.
What it can do
Vendor's own claim- Typed agents defined with instructions, model, tools and runtime behaviour via @mastra/core/agent
- Durable workflows with typed control flow, suspend and resume, snapshots, time travel, error handling and scheduling
- Harness for long-running and background agents - durable agents, goals, schedules, signals, agent controller
- Memory: message history, working memory, semantic recall, observational memory, memory processors, multi-user threads
- Model router using a provider/model string format across OpenAI, Anthropic and Google, with no provider SDK import required
- Observability: traces, metrics, logs, evals, experiments, scorers and datasets
- Human-in-the-loop and agent approval, guardrails and processors
- Sandbox workspace: filesystem, LSP inspection, search and indexing, skills
- Browser automation via AgentBrowser, Stagehand, Firecrawl, recording and a browser viewer
- Channel adapters for Slack, Microsoft Teams, Discord, Telegram, WhatsApp and iMessage
- Subagents, skills and A2A connections
Who it is for
Vendor's own claimTypeScript engineering teams building agentic products who want a batteries-included framework - memory, workflows, evals, observability - rather than assembling it from parts, and who value durable long-running execution. Mastra integrates with React, Next.js and Node, or deploys as a standalone server.
When to choose something else
Our readThis is a TypeScript framework and nothing else - there is no UI for a non-engineer, so a GTM team without developers cannot use it directly. The Starter allowances are small enough to be a prototype budget rather than a production one: 24 CPU hours, 100K observability events, 250MB retrieval storage and 15-day retention, after which everything meters separately. That granularity is the real risk - a single workload can accrue charges across observability events, CPU seconds, egress, memory tokens, retrieval storage, LibSQL rows, Postgres compute and database storage simultaneously, and any always-on agent adds $100 per project for a persistent 24/7 server. Teams that need SSO, multiple teams or SOC 2 documentation jump straight to $250/month, and RBAC, audit logs and uptime SLAs are Enterprise-only. Using the built-in model gateway also carries a 5.5% markup over market rate unless you bring your own key.
Implementation considerations
Our readSetup assessment: 1h
Our read: a first working agent is a single scaffold command plus a provider API key in an environment variable, so the framework itself starts fast. The hour goes on the surrounding decisions - model provider and key, storage backend, whether to self-host or use the platform, and wiring observability - before anything resembling a production deployment exists.
Prerequisites
- Node.js and a TypeScript project (package.json with "type": "module")
- npm install @mastra/core, zod, typescript, @types/node, mastra
- A model provider API key in the matching environment variable - OPENAI_API_KEY, ANTHROPIC_API_KEY or GOOGLE_API_KEY
- For the hosted platform: a Mastra Platform account
- For self-hosted enterprise features: an enterprise licence
Published pricing
From official docs| Plan | Price | Included |
|---|---|---|
| Starter | $0 / month | 100K observability events (then $10/100K); 24 CPU hours (then $0.35/hr); 15 days data retention; 10GB egress (then $0.10/GB); 100,000 memory tokens (then $10/1M); 250MB retrieval storage (then $20/GB); 1GB platform data storage |
| Teams | $250 / month | 1M observability events (then $8/100K); 250 CPU hours (then $0.25/hr); 6 months data retention; 100GB egress (then $0.10/GB); 1M memory tokens (then $10/1M); 1GB retrieval storage (then $20/GB); 100GB platform data storage |
| Enterprise | Custom pricing | Custom volume and retention; CPU as a custom add-on at $0.00008/sec |
| Self-Hosted (open source) | $0 / month | Build and host agents anywhere |
| Enterprise self-hosted licence | Custom pricing - one flat annual fee, no per-trace or per-seat metering | See official pricing |
Verify before you adopt it
- The GitHub repository URL and star count for the open-source framework
- The full list of supported model providers (the docs page's provider list link was stripped in the retrieved text)
- Enterprise pricing figures
- Social profiles and any official video
- A machine-readable OpenAPI specification was not included in the reviewed source set.