Step 1: Create a new Mastra project
First, create a new Mastra project using the CLI:Step 2: Install dependencies
To use Together AI with Mastra, install the required packages:Step 3: Configure environment variables
Create or update your.env file with your Together AI API key:
Step 4: 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
Step 5: Run the application
Since your agent is now configured to use Together AI, run the Mastra development server:Next steps
- Explore the Mastra documentation for more advanced features.
- See the serverless models catalog for the latest available models.
- Learn about building workflows and tools in Mastra.