Skip to main content

Get started

Mastra is a TypeScript framework for building AI agents and applications. Create your first agent with a single command and start building.

Quickstart
Direct link to Quickstart

Run this command to create a general-purpose agent harness with a local workspace, shell tools, memory, task tracking, web access, and recurring schedules. It also installs Mastra skills for your installed coding agent, so you can start prompting and editing it:

npm create mastra@latest

You can open Studio immediately, which is an interactive UI for your Mastra project.

Integrate with your framework
Direct link to Integrate with your framework

Add Mastra to an existing project, or create a new app with your preferred framework:

For other frameworks, see the integration guides.

Templates
Direct link to Templates

Browse templates for complete Mastra projects you can clone and adapt.

Use cases
Direct link to Use cases

Embed agents in your product

Add AI capabilities to your platform so your users can build or interact with agents.

Used by Replit, Fireworks, Medusa

Customer-facing assistants

Build agents that handle inquiries, schedule appointments, send reminders, and answer questions via chat, WhatsApp, or voice.

Used by Vetnio, Lua

Templates: Docs Chatbot, Customer Support and Refund Agent

Software factories

Coordinate coding agents to turn issues into tested code and pull requests. Let people review plans and changes before they're merged.

Used by Mastra.

Get started with Mastra Factory.

Internal copilots

Help employees work faster with AI that understands your domain, such as HR queries, clinical documentation, sales prep, or document generation.

Used by Factorial, Counsel Health, Cedar, SoftBank

Templates: Chat with PDF, Google Sheet Analysis, Organization Intelligence, Company Brain with SurrealDB

Regulated and back-office operations

Automate work where a wrong answer is expensive and someone has to sign off, such as identity checks, invoice matching, policy comparison, and vendor due diligence.

Templates: KYC and Customer Onboarding, Accounts Payable Invoice Processing, Insurance Policy Checking, Vendor Risk Questionnaire

Data analysis agents

Let users query databases and dashboards in natural language. Connect to your data sources and return answers, charts, or reports.

Used by Index, PLAID Japan

Templates: Chat with Database, CSV to Questions, GenUI Data Explorer

Research and knowledge synthesis

Answer questions from the web, from internal documents, or from a shared knowledge base, with citations you can check.

Templates: Deep Search, Web Research Agent

Content automation

Generate, transform, and manage structured content at scale for a content management system, knowledge base, or documentation system.

Used by Sanity

Templates: Chat with YouTube, Flash Cards from PDF

DevOps and engineering automation

Automate deployments, debug production issues, manage infrastructure, and handle on-call workflows.

Used by StarSling

Templates: GitHub PR Code Review, Browser Agent, Security Incident Triage and Response

Sales and go-to-market workflows

Turn customer conversations into structured tasks or generate investment memos. You can also automate outreach sequences.

Used by Kestral, Orange Collective, WorkOS

Templates: Customer Feedback Summarization, Lead Qualification, Competitor Monitor

Video

A quick tour of the Mastra platform shows how the pieces fit together.

On this page