Deploy to Mastra Platform
You've been building the Theme Park agent in Studio. To share it with others, it needs to run somewhere public. In this lesson, you'll deploy it to Mastra Server, Mastra's cloud deployment product for agents. One command takes your local project to a live endpoint with routing, scaling, and infrastructure managed for you.
Before deploying, you'll explore the Swagger UI at http://localhost:4111/swagger-ui. The Theme Park agent and every other agent in this course are already exposed there as HTTP endpoints: routes for generating responses, streaming, and running workflows. Then mastra server deploy authenticates, builds a Docker image, deploys it, and prints a stable URL.
Mastra is already an HTTP server. Studio is just one way to talk to it locally. Mastra Server puts that same server on a public URL, and the Theme Park agent becomes an endpoint any service can call.
"Mastra is already an HTTP server. Studio is just one way to talk to it locally. Mastra Server puts that same server somewhere public."
— Guil Hernandez
Mentioned in the lessonDirect link to Mentioned in the lesson
Code:
Relevant Mastra docs:
Join the communityDirect link to Join the community
Ask questions:
- Discord — chat with other learners and the Mastra team
- Guil on LinkedIn — ask him questions directly
Follow Mastra: