Player not loading? Watch on YouTube
This course builds a theme park AI agent with Mastra, an open source TypeScript framework. The project starts with a weather example in Mastra Studio at localhost:4111, then adds a custom agent using OpenAI GPT 5.1. Setup requires a supported model provider's API key. The application runs locally during development, while this example uses remote model calls and external data services.
The tutorial defines tool inputs and outputs with Zod schemas, resolves park names to IDs through the Queue-Times API, and fetches ride wait times sorted in ascending order. Firecrawl's MCP tools extract park hours and crowd information from web pages. That integration requires a separate API key, even though its MCP server starts locally through npx. Cursor helps generate code using Mastra skills and documentation.
A simulated ticket purchase demonstrates fixed workflow steps, an approval pause and a mock payment. The instructor then adds park validation and an agent-generated visit brief. Memory lessons cover local libSQL storage, recent message history and observational memory, including thread scope versus shared context across a user's conversations. The instructor identifies Gemini 2.5 Flash as the default observer and reflector model.
The final lessons test input guardrails, deploy to Mastra's hosted server and connect Slack. The instructor warns that the deployment filesystem is ephemeral, so file storage needs a remotely hosted database to persist across restarts.