Mastra is a framework for building and deploying AI-powered features using a modern JavaScript stack powered by the Vercel AI SDK. Integrating with Together AI provides access to a wide range of models for building intelligent agents.Documentation Index
Fetch the complete documentation index at: https://docs.together.ai/llms.txt
Use this file to discover all available pages before exploring further.
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.envfile 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