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

# Cohere

> Use Cohere models with PraisonAI Agents

## Models

* **Recommended**: `command-r-plus` (best quality)
* **Fast/Cheap**: `command-r` (balanced)
* **Latest**: `command-a-03-2025` (newest)
* **Small**: `command-r7b-12-2024` (efficient)

## Python

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

agent = Agent(
    instructions="You are a helpful assistant",
    llm="command-r-plus"
)
agent.start("Explain natural language processing")
```

### With Tools

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

def search_documents(query: str) -> str:
    """Search internal documents."""
    return f"Found documents related to: {query}"

agent = Agent(
    instructions="You are a document assistant",
    llm="command-r",
    tools=[search_documents]
)
agent.start("Find documents about machine learning")
```

### Multi-Agent

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

researcher = Agent(
    instructions="You research topics thoroughly",
    llm="command-r-plus"
)
writer = Agent(
    instructions="You write clear summaries",
    llm="command-r"
)

task1 = Task(description="Research NLP techniques", agent=researcher)
task2 = Task(description="Write a summary", agent=writer)

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

## CLI

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

# Basic prompt
python -m praisonai "Explain AI" --llm command-r-plus

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

## YAML

```yaml  theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
framework: praisonai
topic: NLP research
agents:
  researcher:
    role: NLP Researcher
    goal: Research language processing techniques
    instructions: You are an expert in NLP
    llm:
      model: command-r-plus
    tasks:
      research_task:
        description: Research the latest NLP techniques
        expected_output: Comprehensive NLP research report

  writer:
    role: Technical Writer
    goal: Create clear documentation
    instructions: You write clear technical content
    llm:
      model: command-r
    tasks:
      write_task:
        description: Write a summary of the research
        expected_output: Well-written technical summary
```


Built with [Mintlify](https://mintlify.com).