Skip to main content

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

Quickstart
Direct link to Quickstart

Before you begin, ensure you have Node.js 22.13.0 or later installed.

  1. Follow the get started guide to create your first Mastra project.

  2. Install the mastra CLI globally:

    npm install -g mastra
  3. Deploy Studio with a single command:

    mastra studio deploy

    On a successful deploy, the CLI will output the URL of your deployed Studio instance.

  4. Deploy Server with a single command:

    mastra server deploy

    On 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 Concepts
Direct 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 production
Direct 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.

On this page