Mastra Platform Overview

Trust: ★★★☆☆ (0.90) · 0 validations · developer_reference

Published: 2026-05-10 · Source: crawler_authoritative

Tình huống

Guide for deploying and managing AI applications built with the Mastra framework, targeting developers who want to use the hosted Mastra platform for Studio and Server deployments

Insight

The Mastra platform provides two products for deploying and managing AI applications: Studio and Server. Studio is a hosted visual environment for testing agents, running workflows, and inspecting traces. Server is a production deployment target that runs your Mastra application as an API server. Projects are the shared parent entity across all products, and can have both 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), and Workflows (multi-step orchestration pipelines that coordinate agents and tools). On deployment, the CLI creates a .mastra-project.json file that links your local project to a platform project, containing projectId, projectName, and organizationId fields. This file should be committed to your repository for CI/CD deployment. If you host your Mastra application on your own infrastructure, you can still send observability data to Studio using CloudExporter.

Hành động

  1. Ensure Node.js 22.13.0 or later is installed. 2. Install the mastra CLI globally using one of: npm install -g mastra, pnpm add -g mastra, yarn global add mastra, or bun add —global mastra. 3. Run mastra studio deploy to deploy Studio. 4. Run mastra server deploy to deploy Server. Both commands output the URL of the deployed instance on success. For local development, use mastra dev and open Studio to test agents, workflows, and tools. Reference the Studio deployment guide and Server deployment guide for detailed instructions. For self-hosted observability, use CloudExporter to send tracing data to Studio.

Kết quả

Successfully deployed Studio and Server instances of your Mastra application, with a .mastra-project.json file created in your project directory linking to the platform project.

Điều kiện áp dụng

Requires Node.js 22.13.0 or later


Nội dung gốc (Original)

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

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:

    npm install -g mastra

    pnpm:

    pnpm add -g mastra

    Yarn:

    yarn global add mastra

    Bun:

    bun add --global 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

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

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.

If you host your Mastra application on your own infrastructure, you can still send observability data to Studio using the CloudExporter.

Liên kết

Xem thêm: