Mastra platform
The Mastra platform provides two products for deploying and managing AI applications built with the Mastra framework:
- Studio: A hosted visual environment for testing agents, running workflows, and inspecting traces
- Server: A production deployment target that runs your Mastra application as an API server
QuickstartDirect link to Quickstart
Before you begin, ensure you have Node.js 22.13.0 or later installed.
Follow the get started guide to create your first Mastra project.
Install the
mastraCLI globally:- npm
- pnpm
- Yarn
- Bun
npm install -g mastrapnpm add -g mastrayarn global add mastrabun add --global mastraDeploy Studio with a single command:
mastra studio deployOn a successful deploy, the CLI will output the URL of your deployed Studio instance.
Deploy Server with a single command:
mastra server deployOn a successful deploy, the CLI will output the URL of your deployed Server instance.
You have now successfully deployed both Studio and Server instances of your Mastra application. The CLI created a .mastra-project.json file in your project directory.
This file links your local project to a platform project. It's auto-generated on your first deploy and contains the projectId, projectName, and organizationId. Commit this file to your repository so CI/CD knows which project to deploy to.
Key ConceptsDirect link to Key Concepts
Projects are the shared parent entity across all products. A single project can have a Studio deployment and a Server deployment. Projects belong to an Organization, which is the multi-tenant container for your team.
Your Mastra application is built from three building blocks:
- Agents: AI agents that can use tools, follow instructions, and maintain context
- Tools: Callable functions and integrations available to your agents
- Workflows: Multi-step orchestration pipelines that coordinate agents and tools
Going to productionDirect link to Going to production
Develop your project locally with mastra dev and open Studio to test your agents, workflows, and tools in a visual environment.
Once you're ready to deploy your application to production, use mastra studio deploy and mastra server deploy to push your application to the cloud.
Follow the Studio deployment guide and Server deployment guide for step-by-step instructions.