LiveKit docs › Models › LLM › Additional models › Anthropic

---

# Anthropic Claude LLM plugin guide

> How to use the Anthropic Claude LLM plugin for LiveKit Agents.

Available in:
- [ ] Node.js
- [x] Python

## Overview

This plugin allows you to use the [Claude API](https://claude.com/platform/api) as an LLM provider for your voice agents.

### Installation

Install the plugin from PyPI:

```shell
uv add "livekit-agents[anthropic]~=1.5"

```

### Authentication

The Anthropic plugin requires an [Anthropic API key](https://console.anthropic.com/account/keys).

Set `ANTHROPIC_API_KEY` in your `.env` file.

### Usage

Use Claude within an `AgentSession` or as a standalone LLM service. For example, you can use this LLM in the [Voice AI quickstart](https://docs.livekit.io/agents/start/voice-ai.md).

```python
from livekit.plugins import anthropic

session = AgentSession(
    llm=anthropic.LLM(
        model="claude-sonnet-4-6",
        temperature=0.8,
    ),
    # ... tts, stt, vad, turn_handling, etc.
)

```

### Parameters

This section describes some of the available parameters. See the [plugin reference](https://docs.livekit.io/reference/python/livekit/plugins/anthropic/index.html.md#livekit.plugins.anthropic.LLM) for a complete list of all available parameters.

- **`model`** _(str | ChatModels)_ (optional) - Default: `claude-sonnet-4-6`: Model to use. For a full list of available models and their API IDs, see the [Model options](https://platform.claude.com/docs/en/about-claude/models/overview).

- **`max_tokens`** _(int)_ (optional): The maximum number of tokens to generate before stopping. To learn more, see the [Anthropic API reference](https://platform.claude.com/docs/en/api/messages/create#create.max_tokens).

- **`temperature`** _(float)_ (optional) - Default: `1`: Sampling temperature that controls the randomness of the model's output. Higher values make the output more random, while lower values make it more focused and deterministic. Range of valid values can vary by model.

Valid values are between `0` and `1`. To learn more, see the [Anthropic API reference](https://platform.claude.com/docs/en/api/messages/create#create.temperature).

- **`parallel_tool_calls`** _(bool)_ (optional): Controls whether the model can make multiple tool calls in parallel. When enabled, the model can make multiple tool calls simultaneously, which can improve performance for complex tasks.

- **`tool_choice`** _(ToolChoice | Literal['auto', 'required', 'none'])_ (optional) - Default: `auto`: Controls how the model uses tools. String options are as follows:

- `'auto'`: Let the model decide.
- `'required'`: Force tool usage.
- `'none'`: Disable tool usage.

- **`timeout`** _(httpx.Timeout | None)_ (optional) - Default: `httpx.Timeout(5.0, read=30.0)`: Configures connect, read, write, and pool timeouts on the underlying HTTP client. Increase `read` to accommodate very large contexts or extended thinking budgets. Ignored when `client` parameter is set.

### Provider tools

Available in:
- [ ] Node.js
- [x] Python

Anthropic supports the following [provider tools](https://docs.livekit.io/agents/logic/tools.md#provider-tools) that enable the model to use built-in capabilities executed on the model server. These tools can be used alongside function tools defined in your agent's codebase.

| Tool | Description | Parameters |
| `ComputerUse` | Enable [computer use](https://docs.anthropic.com/en/docs/agents-and-tools/computer-use) to control a desktop environment. | `display_width_px` (default: 1280), `display_height_px` (default: 720), `display_number` (default: 1), `tool_version` |

```python
from livekit.plugins import anthropic

agent = MyAgent(
    llm=anthropic.LLM(model="claude-sonnet-4-6"),
    tools=[anthropic.ComputerUse(display_width_px=1280, display_height_px=720)],  # replace with any supported provider tool
)

```

## Additional resources

The following links provide more information about the Anthropic LLM plugin.

- **[Python package](https://pypi.org/project/livekit-plugins-anthropic/)**: The `livekit-plugins-anthropic` package on PyPI.

- **[Plugin reference](https://docs.livekit.io/reference/python/livekit/plugins/anthropic/index.html.md#livekit.plugins.anthropic.LLM)**: Reference for the Anthropic LLM plugin.

- **[GitHub repo](https://github.com/livekit/agents/tree/main/livekit-plugins/livekit-plugins-anthropic)**: View the source or contribute to the LiveKit Anthropic LLM plugin.

- **[Anthropic docs](https://docs.anthropic.com/en/docs/intro-to-claude)**: Anthropic Claude docs.

- **[Voice AI quickstart](https://docs.livekit.io/agents/start/voice-ai.md)**: Get started with LiveKit Agents and Anthropic.

---

This document was rendered at 2026-06-07T11:36:45.247Z.
For the latest version of this document, see [https://docs.livekit.io/agents/models/llm/anthropic.md](https://docs.livekit.io/agents/models/llm/anthropic.md).

To explore all LiveKit documentation, see [llms.txt](https://docs.livekit.io/llms.txt).