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

# Anthropic

[Anthropic](https://www.anthropic.com/) provides the Claude family of LLMs via the [Messages API](https://docs.anthropic.com/en/api/messages). Pass `anthropic.LLM()` to your agent for streaming responses and function calling.

<Info>
  Vision Agents requires a [Stream](https://getstream.io/try-for-free/) account
  for real-time transport. Get an Anthropic API key from the
  [Anthropic Console](https://console.anthropic.com/).
</Info>

## Installation

```sh theme={null}
uv add "vision-agents[anthropic]"
```

## Quick Start

```python theme={null}
from vision_agents.core import Agent, User
from vision_agents.plugins import anthropic, cartesia, deepgram, getstream, smart_turn

agent = Agent(
    edge=getstream.Edge(),
    agent_user=User(name="Friendly AI", id="agent"),
    instructions="Be nice to the user.",
    llm=anthropic.LLM("claude-sonnet-4-6"),
    tts=cartesia.TTS(),
    stt=deepgram.STT(),
    turn_detection=smart_turn.TurnDetection(),
)
```

<Warning>
  Set `ANTHROPIC_API_KEY` in your environment, or pass `api_key` directly to `anthropic.LLM(...)`.
</Warning>

## Parameters

| Name               | Type             | Default               | Description                                                                                               |
| ------------------ | ---------------- | --------------------- | --------------------------------------------------------------------------------------------------------- |
| `model`            | `str`            | `"claude-sonnet-4-6"` | Any Claude model — see [model overview](https://docs.anthropic.com/en/docs/about-claude/models/overview). |
| `api_key`          | `str`            | `None`                | Anthropic API key (defaults to `ANTHROPIC_API_KEY` env var).                                              |
| `client`           | `AsyncAnthropic` | `None`                | Bring your own Anthropic client instance instead of letting the plugin construct one.                     |
| `tools_max_rounds` | `int`            | `3`                   | Maximum multi-hop tool-calling rounds before the LLM is forced to produce a final response.               |

## Function Calling

Register Python functions with `llm.register_function` and Claude will call them when the model decides they're needed:

```python theme={null}
from vision_agents.plugins import anthropic

llm = anthropic.LLM("claude-sonnet-4-6")

@llm.register_function(
    name="get_weather",
    description="Get the current weather for a given city",
)
async def get_weather(city: str) -> dict:
    return {"city": city, "temperature": 72, "condition": "Sunny"}
```

Anthropic does not currently offer a realtime speech-to-speech model — pair `anthropic.LLM()` with a separate [STT](/integrations/stt/deepgram) and [TTS](/integrations/tts/elevenlabs) plugin for voice.

## Next Steps

<CardGroup cols={2}>
  <Card title="Build a Voice Agent" icon="microphone" href="/introduction/voice-agents">
    Get started with voice
  </Card>

  <Card title="Tools & Knowledge" icon="wrench" href="/guides/mcp-tool-calling">
    Add function calling and RAG
  </Card>
</CardGroup>
