> ## Documentation Index
> Fetch the complete documentation index at: https://praison.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Together AI

> Use Together AI's fast inference with PraisonAI Agents

## Models

Together AI provides fast, affordable access to leading open-source models. Format: `together_ai/<org>/<model-name>`

**Recommended Models:**

* **Llama 3.3**: `together_ai/meta-llama/Llama-3.3-70B-Instruct-Turbo`
* **Llama 3.1**: `together_ai/meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo`, `together_ai/meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo`
* **DeepSeek V3**: `together_ai/deepseek-ai/DeepSeek-V3`
* **DeepSeek R1**: `together_ai/deepseek-ai/DeepSeek-R1` (reasoning)
* **Qwen 2.5**: `together_ai/Qwen/Qwen2.5-7B-Instruct-Turbo`, `together_ai/Qwen/Qwen2.5-72B-Instruct-Turbo`
* **Mistral**: `together_ai/mistralai/Mixtral-8x7B-Instruct-v0.1`

## Python

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
# export TOGETHER_API_KEY=your-api-key
from praisonaiagents import Agent

agent = Agent(
    instructions="You are a helpful assistant",
    llm="together_ai/meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo"
)
agent.start("Explain neural networks")
```

### With Tools

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
# export TOGETHER_API_KEY=your-api-key
from praisonaiagents import Agent

def search_web(query: str) -> str:
    """Search the web for information."""
    return f"Search results for: {query}"

agent = Agent(
    instructions="You are a research assistant",
    llm="together_ai/meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo",
    tools=[search_web]
)
agent.start("What's happening in AI today?")
```

### Multi-Agent

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
# export TOGETHER_API_KEY=your-api-key
from praisonaiagents import Agent, Task, AgentTeam

researcher = Agent(
    instructions="You research topics thoroughly",
    llm="together_ai/meta-llama/Llama-3.3-70B-Instruct-Turbo"
)
writer = Agent(
    instructions="You write clear summaries",
    llm="together_ai/meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo"
)

task1 = Task(description="Research quantum computing", agent=researcher)
task2 = Task(description="Summarize findings", agent=writer)

agents = AgentTeam(agents=[researcher, writer], tasks=[task1, task2])
agents.start()
```

## CLI

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
export TOGETHER_API_KEY=your-api-key

# Basic prompt
python -m praisonai "Explain AI" --llm together_ai/meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo

# With temperature
python -m praisonai "Write a story" --llm together_ai/meta-llama/Llama-3.3-70B-Instruct-Turbo --temperature 0.8

# Run agents.yaml
python -m praisonai
```

## YAML

```yaml theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
framework: praisonai
topic: Research AI developments
agents:
  researcher:
    role: AI Researcher
    goal: Find latest AI developments
    instructions: You are an expert AI researcher
    llm:
      model: together_ai/meta-llama/Llama-3.3-70B-Instruct-Turbo
    tasks:
      research_task:
        description: Research the latest developments in AI
        expected_output: Comprehensive AI research report

  writer:
    role: Technical Writer
    goal: Create clear documentation
    instructions: You write clear technical content
    llm:
      model: together_ai/meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo
    tasks:
      write_task:
        description: Write a summary of the research
        expected_output: Well-written technical summary
```

## Resources

* [Together AI Models](https://api.together.ai/models) - Available models and pricing
* [Together AI Docs](https://docs.together.ai/) - Official documentation
* [Get API Key](https://api.together.ai/) - Sign up for Together AI
