Self-hostable workflow automation with AI Agent nodes and an agent builder
Mastra
TypeScript agent framework with a local Studio and a deployable Node build

Details about Mastra
Short verdict: Mastra is an Apache-2.0 TypeScript framework for agents, tools, workflows and memory, with a local Studio and a mastra build command that turns the project into a Node server you can deploy anywhere. Our weather agent ran with the AI SDK's mock model and no API key, and the dev server had Studio up in 2.5 s. The trade-offs: the default project template is a full agent harness with shell and file tools rather than a hello world, the CLI sends usage analytics to PostHog unless you opt out, and a few enterprise directories are source-available rather than open source. It suits TypeScript teams shipping agents inside Node apps; Python shops will find LangGraph or CrewAI closer to home.
How we reviewed it: On 12 November 2026 we installed Mastra (@mastra/core 1.83.0, mastra CLI 1.39.0) on a shared 4-core Linux machine with Node.js 22.23.4. We ran create-mastra, installed the default template and the docs' minimal package set, and built the same spec we used for LangGraph and CrewAI: a weather agent with one get_weather tool and a scripted model that calls the tool and then answers. We logged outbound requests and traced network calls during the build. We did not use a model key, sign in to the Mastra platform or deploy, so platform features and prices come from Mastra's own pages.
What you get for $0
| Price | Framework free. Mastra's hosted platform: Free $0, Starter $25 a month, Team $250 a month, Enterprise custom. |
|---|---|
| License | Apache-2.0, except directories named ee/ (for example @mastra/core/auth/ee and agent-builder/ee), which fall under the Mastra Enterprise Edition License: readable and testable, but production use needs a written agreement and a license key. |
| Version | @mastra/core 1.83.0, released 12 November 2026, during our test; 1.0 shipped on 20 January 2026. 27 stable releases in the last 90 days, per npm. |
| Stack | TypeScript on Node.js 22.13+, Zod schemas, AI SDK model interfaces. |
| Models | A model router that takes strings such as openai/<model> or anthropic/<model> and reads the matching API key from the environment, or any AI SDK model object. |
| Project health | 3,166,080 npm downloads of @mastra/core in the week of 2 to 8 November 2026 (1,243,022 for the CLI); 29,477 GitHub stars. |
What we found
The default template is an agent harness with shell access
npx create-mastra takes flags for a model provider (mastra, openai, anthropic, google or xai), an API key, skills for coding agents and git. Without --template or --empty it downloads a GitHub template called Agent Harness. GitHub's tarball host is blocked on our test network, so the wizard waited until we stopped it; we cloned the same repository with git instead. The template is not a toy: its agent gets a local workspace folder, a shell sandbox, web search and fetch, memory, task tracking and recurring schedules, with file deletes set to require approval and up to 100 steps per request. Installing it took 40.0 s with an empty npm cache: 396 packages and 447 MB. The docs' minimal set (@mastra/core, mastra, zod, TypeScript) took 25.0 s, 368 packages and 337 MB, and @mastra/core with Zod alone 16.3 s, 146 packages and 160 MB.
Our test agent: four small files, and a type error
Mastra defines tools with createTool (an id, a description, Zod input and output schemas, an execute function) and agents with new Agent, registered on a Mastra instance. For the model we used MockLanguageModelV4 from the AI SDK's ai/test module with two scripted replies. agent.generate() made 2 model calls, ran the tool and returned "It is sunny and 21 C in Lisbon." in 110 to 127 ms; importing @mastra/core/agent took 0.53 s (median of five). The code ran under Node's built-in TypeScript support, but tsc rejected the AI SDK's own mock as a model type, so typed tests need a cast. Mastra warned that with no storage configured it falls back to an in-memory store.

Studio runs on your machine
npx mastra dev bundled the project and was ready in 2.5 s, serving Studio and a REST API from the same local port; /api/agents listed our agent and its tool. Unlike LangGraph, whose Studio is a page on LangChain's site, Mastra's Studio is served by your own dev server. The port comes from the PORT variable, not a --port flag, which the CLI rejected.
mastra build gives you a server, and the CLI reports usage
npx mastra build took 18.2 s and wrote .mastra/output, a Node server started with node .mastra/output/index.mjs; it runs its own npm install into that folder, so the output was 215 MB. While tracing network calls we saw the CLI look up us.i.posthog.com and open 2 connections to it; with MASTRA_TELEMETRY_DISABLED=1 there were none. Mastra's CLI reference documents this: the CLI sends OS, Mastra and Node versions; servers send a component-count snapshot at startup and, when observability is configured, token counts per model every 15 minutes; and Studio collects browser analytics. It says no prompts or responses are sent. The agent run itself made no outbound requests.
Platform pricing is public
Per the pricing page on 12 November 2026, prices are per workspace each month. Free ($0) includes unlimited agents, users and deployments, 100,000 observability events, 40 vCPU-hours, 100 GB-hours of memory and 15-day trace retention. Starter ($25) adds one small always-on project and 250,000 events; Team ($250) one small and two medium projects, 10 million events, 180-day retention and a SOC 2 report; Enterprise adds SSO, RBAC and audit logs. Overage is $0.25 per vCPU-hour, $0.25 per GB-hour of memory and $10 per 100,000 events.

Output and build
| Measurement | Mastra | LangGraph | CrewAI |
|---|---|---|---|
| Framework install, empty cache | 16.3 s; 146 packages; 160 MB | 8.5 s; 38 packages; 89 MB | 48.9 s; 137 packages; 950 MB |
| Import time (median of 5) | 0.53 s | 0.67 s | 2.28 s |
| Same weather agent, scripted model | 110-127 ms; 41 lines in 4 files | 8-11 ms; 37 lines | 44-51 ms; 39 lines |
| Outbound requests from the agent run | 0 | 0 | 8 telemetry attempts |
| Production build | 18.2 s; 215 MB server folder | None (your own server, or Agent Server) | None (crewai run or AMP) |
Single runs on one machine; the LangGraph and CrewAI numbers come from their reviews. With a real model, network latency will dominate the run time.
What you still have to build
A model key: the router strings need the provider's key in the environment.
Storage: configure LibSQL, Postgres or another adapter, or memory and traces vanish on restart.
Hosting for the built server, or a Mastra platform plan.
A review of the template's shell and file tools before exposing the agent to users.
Pros and cons
Pros
One TypeScript package for agents, tools, workflows and memory, with Zod-typed tools.
Local Studio ready in 2.5 s, and a build command that outputs a deployable Node server.
Public platform prices with a $0 tier.
Fast release cadence: 27 core releases in 90 days.
Cons
CLI usage analytics on by default.
The default template pulls 396 packages and gives the agent shell access.
Enterprise directories are source-available, not open source.
The AI SDK's own mock model fails Mastra's TypeScript types.
How Mastra compares
LangGraph also has a JavaScript version, but its tooling centers on Python and its Studio runs on LangSmith; choose it for checkpointed, step-level control. CrewAI is Python-only and models agents as roles in a crew; choose it if your team writes Python and wants multi-agent setups fast. The OpenAI Agents SDK is a lighter TypeScript and Python option tied to OpenAI's platform. For visual building, Dify and n8n are self-hostable alternatives. See all AI agents.
Who should use Mastra
TypeScript teams that want agents, workflows and their debugging UI inside the same Node codebase as their product, with a path to hosting at a published price, are Mastra's best fit. Python teams, and anyone who needs every component under an OSI license, should weigh the alternatives first.
FAQ
Is Mastra free?
The framework is free under Apache-2.0, except a few enterprise directories that need a license for production use. Mastra's hosted platform has a $0 plan, Starter at $25 a month and Team at $250 a month, as of 12 November 2026.
Does Mastra work with Python?
No. Mastra is a TypeScript framework for Node.js 22.13 or later. For Python, look at LangGraph or CrewAI.
Do I need Mastra Cloud to deploy?
No. mastra build writes a Node server to .mastra/output that you can run anywhere with node .mastra/output/index.mjs. The platform is optional hosting with observability.
Does Mastra collect telemetry?
Yes, by default. In our test the CLI contacted PostHog during mastra build; Mastra documents CLI, server and Studio analytics without prompt content. Set MASTRA_TELEMETRY_DISABLED=1 to turn it off.
Can I test a Mastra agent without an API key?
Yes. Pass an AI SDK mock model such as MockLanguageModelV4 from ai/test as the agent's model. It ran our tool call end to end, though TypeScript flagged the type, so add a cast in typed tests.


