Getting started
-
Create a new Mastra project
First, create a new Mastra project using the CLI:During the setup, the system prompts you to name your project, choose a default provider, and more. Feel free to use the default settings. -
Install dependencies
To use Together AI with Mastra, install the required packages: -
Configure environment variables
Create or update your.env
file with your Together AI API key: -
Configure your agent to use Together AI
Now, update your agent configuration file, typicallysrc/mastra/agents/weather-agent.ts
, to use Together AI models:src/mastra/agents/weather-agent.ts -
Running the application
Since your agent is now configured to use Together AI, run the Mastra development server:Open the Mastra Playground and Mastra API to test your agents, workflows, and tools.
Next Steps
- Explore the Mastra documentation for more advanced features
- Check out Together AI’s model documentation for the latest available models
- Learn about building workflows and tools in Mastra