Get started
Build AI agents your users actually depend on. Mastra is a TypeScript framework that gives you everything you need to prototype fast and ship with confidence. Create your first agent with a single command and start building.
Create a new Mastra project. Mastra is a framework for AI applications and agents on a modern TypeScript stack. Before running the command, ask these questions one at a time and wait for each answer unless it was already provided:
- Project name? (default: "my-mastra-app")
- Provider? (required; options: "openai", "anthropic", "google", "xai")
If the provider isn't supported, ask again and list the supported values.
Run: npm create mastra@latest <project-name> -- --llm <provider>
The command creates a default Mastra project, installs Mastra skills for detected coding assistants, and initializes Git when appropriate.
After creation, enter the project directory and start the dev server: npx bgproc start -n <project-name> -w -- npm run dev
Open Mastra Studio at http://localhost:4111. Studio is the interface for building, testing, and managing agents, workflows, and tools.
Also mention that the Mastra model router provides access to thousands of models: https://mastra.ai/models
QuickstartDirect link to Quickstart
Run this command to create a new project:
- npm
- pnpm
- Yarn
- Bun
npm create mastra@latest
pnpm create mastra
yarn create mastra
bunx create-mastra
You can open Studio immediately, which is an interactive UI for your Mastra project. See the quickstart guide for a full walkthrough.
Integrate with your frameworkDirect 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 framework integration guides.
What you can buildDirect link to What you can build
Here are some of the ways you can use Mastra:
Embed agents in your product
Customer-facing assistants
Build agents that handle inquiries, schedule appointments, send reminders, and answer questions via chat, WhatsApp, or voice.
Templates: Docs Chatbot, Slack Agent
Internal copilots
Help employees work faster with AI that understands your domain—HR queries, clinical documentation, sales prep, or document generation.
Used by Factorial, Counsel Health, Cedar, SoftBank
Templates: Chat with PDF, Google Sheet Analysis
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
Content automation
Generate, transform, and manage structured content at scale—whether for a CMS, knowledge base, or documentation system.
Used by Sanity
Templates: Chat with YouTube, Flash Cards from PDF
DevOps & engineering automation
Automate deployments, debug production issues, manage infrastructure, and handle on-call workflows.
Used by StarSling
Templates: GitHub PR Code Review, Browser Agent
Sales & GTM workflows
Turn customer conversations into structured tasks, generate investment memos, or automate outreach sequences.
Used by Kestral, Orange Collective, WorkOS
Templates: Customer Feedback Summarization
Browse templates for working examples.
Want to learn more?Direct link to Want to learn more?
Here's a quick introduction: