Mastra is an open-source TypeScript AI agent framework with built-in memory, workflows, tools, and observability for shipping production agents.

Overview

Mastra is a TypeScript-first framework for building AI agents and workflow-driven applications, created by the team behind the Gatsby web framework. Rather than stitching together separate libraries, it bundles every primitive a production agent needs: agents with tool use and memory, a graph-based workflow engine with explicit control flow, and built-in observability with tracing and evals. Developers connect to more than 1,000 models through a unified router, share tools via MCP, and ship agents inside existing React, Next.js, or Node.js apps, or as standalone Hono endpoints. The core is Apache-2.0 licensed and free to start; a managed platform adds Studio, Server, and Memory Gateway with a free Starter tier and metered Teams plan.

Key Features

  • Agents with tool calling, observational memory, and multi-step reasoning out of the box
  • Graph-based workflow engine supporting sequential, parallel, branch, and human-in-the-loop steps
  • Unified model router with access to 1,000+ models across OpenAI, Anthropic, Google, and more
  • MCP tool sharing and supervisor agents for coordinating specialized sub-agents
  • Built-in observability: traces, token usage, scorers, and model-graded evals
  • One-command deploy to Vercel, Netlify, or Cloudflare, or self-host anywhere Node.js runs

Pricing

PlanPriceFor
Framework$0Open-source Apache-2.0 core, self-hosted
Starter$0Cloud Studio, unlimited users and deployments
Teams$250/team/moMetered observability, CPU, egress for scale
EnterpriseCustomRBAC, SSO, VPC isolation, SLA

Comparison

Compared to LangChain, Mastra is purpose-built for TypeScript rather than Python, giving JS teams a batteries-included agent stack without leaving their language. Against CrewAI, it leans on a typed workflow engine and first-class observability instead of role-based multi-agent crews. Unlike Dify, which is a hosted low-code platform, Mastra is a developer framework you own and deploy inside your own infrastructure.

Compare alternatives

Side-by-side with the 3 closest alternatives.

ToolCategoryPricingVisit
Mastra (this) code, agentsFrom $0/mo Site ↗
LangChaincode, agentsFrom $0/mo Site ↗
CrewAIagents, codeFrom $0/mo Site ↗
Difyagents, productivityFrom $0/mo Site ↗
Mastra Current

Mastra is an open-source TypeScript AI agent framework with built-in memory, workflows, tools, and observability for shipping production agents.

codeagents
From $0/mo

The most-adopted open-source framework for building LLM apps and agents, plus the LangSmith platform for tracing and deployment.

codeagents
From $0/mo

Open-source framework to orchestrate teams of collaborating AI agents. Multi-agent orchestration Read our hands-on review and compare the top AI Agents

agentscode
From $0/mo

Open-source LLM app and agent platform with a visual workflow canvas, RAG pipelines, and one-click cloud or self-hosted deployment.

agentsproductivity
From $0/mo
Editor’s Review
4.5/5
Pros
  • +TypeScript-native, no Python context switching for JS teams
  • +Bundles agents, workflows, memory, and observability in one framework
  • +Apache-2.0 open source with a free Starter cloud tier
Cons
  • Smaller ecosystem than LangChain or mature Python frameworks
  • Production scaling relies on the paid managed platform
  • TypeScript and JavaScript only

Mastra is the most complete TypeScript-native agent framework we have tested, and the free open-source core is genuinely usable in production. The managed platform adds real value for teams that need observability and deployment at scale, but costs climb once you leave the Starter tier.

See all reviews →