1.7 KiB
1.7 KiB
Using the Playground
The Mastra Playground provides a visual interface to test and run your workflows. Let's see your workflow in action!
Starting the Development Server
Start your Mastra development server using the mastra dev command. If you are using npm the command is:
npm run dev
You should see output like:
🚀 Mastra Dev Server starting...
📊 Studio available at: http://localhost:4111
Accessing Workflows in Playground
- Open your browser and go to
http://localhost:4111 - Click on "Workflows" in the navigation
- You should see your
contentWorkflowlisted
Testing Your Workflow
- Click on your
contentWorkflow - You'll see an input form based on your workflow's input schema
- Enter some test content in the form:
{
"content": "Machine learning is revolutionizing healthcare by enabling faster diagnoses and personalized treatments.",
"type": "article"
}
- Click "Run Workflow"
- Watch the execution progress and see the results
Understanding the Interface
The playground shows you:
- Input Schema: What data your workflow expects
- Execution Progress: Real-time updates as steps complete
- Output: The final result from your workflow
- Execution Time: How long the workflow took to run
Benefits of the Playground
- Visual Testing: Easy way to test workflows without writing code
- Schema Validation: Automatic form generation from your schemas
- Real-time Feedback: See exactly what's happening during execution
- Easy Debugging: Quickly test different inputs and view traces from workflow runs
Great! You can now visually test your workflow. Next, you'll learn how to run workflows programmatically.