> ## 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.

# Anthropic Claude

> Use Anthropic Claude models with PraisonAI Agents

## Models

* **Recommended**: `claude-3-5-sonnet-20241022` (best balance)
* **Fast/Cheap**: `claude-3-5-haiku-20241022` (fastest, affordable)
* **Advanced**: `claude-3-opus-20240229` (highest capability)
* **Latest**: `claude-sonnet-4-5`, `claude-haiku-4-5` (newest)

## Python

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

agent = Agent(
    instructions="You are a helpful assistant",
    llm="claude-3-5-sonnet-20241022"
)
agent.start("Explain quantum computing simply")
```

### With Tools

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

def calculate(expression: str) -> str:
    """Evaluate a math expression."""
    return str(eval(expression))

agent = Agent(
    instructions="You are a math assistant",
    llm="claude-3-5-haiku-20241022",
    tools=[calculate]
)
agent.start("What is 25 * 17 + 89?")
```

### Multi-Agent

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

analyst = Agent(
    instructions="You analyze data and find insights",
    llm="claude-3-5-sonnet-20241022"
)
reporter = Agent(
    instructions="You write clear reports",
    llm="claude-3-5-haiku-20241022"
)

task1 = Task(description="Analyze market trends", agent=analyst)
task2 = Task(description="Write executive summary", agent=reporter)

agents = AgentTeam(agents=[analyst, reporter], tasks=[task1, task2])
agents.start()
```

## CLI

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

# Basic prompt
python -m praisonai "Explain AI" --llm claude-3-5-sonnet-20241022

# With temperature
python -m praisonai "Write a story" --llm claude-3-5-sonnet-20241022 --temperature 0.8

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

## YAML

```yaml  theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
framework: praisonai
topic: Analyze business strategy
agents:
  analyst:
    role: Business Analyst
    goal: Analyze market opportunities
    instructions: You are an expert business analyst
    llm:
      model: claude-3-5-sonnet-20241022
    tasks:
      analysis_task:
        description: Analyze current market trends and opportunities
        expected_output: Detailed market analysis report

  strategist:
    role: Strategy Consultant
    goal: Develop actionable recommendations
    instructions: You create strategic business plans
    llm:
      model: claude-3-5-haiku-20241022
    tasks:
      strategy_task:
        description: Create strategic recommendations based on analysis
        expected_output: Strategic action plan
```


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