Back to products
Mastra 1.0

Mastra 1.0

Build AI agents with a modern TypeScript stack

Overview

What it is

From the team behind Gatsby, Mastra is a framework for building AI-powered apps and agents with workflows, memory, streaming, evals, tracing, and Studio, an interactive UI for dev and testing. Start building: npm create mastra@latest

Intent

I need it when

Monitor and improve agent performance over time with metrics and evaluation

Mastra's observability platform captures traces, logs, and metrics automatically. The evals system provides model-graded, rule-based, and statistical scorers to measure agent output quality. Studio displays performance dashboards and allows users to run experiments and compare agent versions.

Integrate AI agents into existing web applications without rewriting infrastructure

Mastra integrates directly with Next.js, Express, Hono, and other frameworks. Users can import agents into existing routes, use AI SDK UI for chat interfaces, and deploy alongside their app or as standalone services.

Build and deploy AI agents quickly with observability and testing built-in

Mastra provides a TypeScript framework with integrated Studio UI for building agents, built-in observability (traces, logs, metrics), and evals system for testing agent quality. Users can prototype in minutes with npm create mastra and deploy as APIs or embedded in apps.

Manage agent memory and context across conversations at scale

Mastra provides persistent memory with thread and resource scoping, automatic context recall, and token usage tracking. Memory Gateway handles input/output tokens at market rate + 5.5%, with configurable retention windows and retrieval storage.

Secure agents against prompt injection, PII exposure, and harmful content

Mastra includes built-in guardrails processors for input/output security: PromptInjectionDetector, PIIDetector, ModerationProcessor, and SystemPromptScrubber. These can block, redact, or rewrite harmful content before it reaches the model or user.

Drop

Not a fit when

  • User needs Python-first AI framework; Mastra is TypeScript/JavaScript only
  • User requires fully managed, no-code agent builder without coding; Mastra requires TypeScript development
  • User needs on-premises deployment without enterprise license; free tier is cloud-only
  • User requires real-time agent execution without observability/tracing infrastructure setup
  • User needs proprietary closed-source framework; Mastra is Apache 2.0 open-source
Commercials

Pricing

USD0 / monthly View pricing