LiveKit docs › Models › LLM › Additional models › Mistral AI

---

# Mistral AI LLM plugin guide

> How to integrate Mistral AI's La Plateforme inference service with LiveKit Agents.

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

## Overview

This plugin allows you to use [Mistral AI](https://mistral.ai/) as an LLM provider for your voice agents.

### Installation

Install the LiveKit Mistral AI plugin from PyPI or npm:

**Python**:

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

```

---

**Node.js**:

```shell
pnpm add @livekit/agents-plugin-mistralai

```

### Authentication

The Mistral AI integration requires a [Mistral AI API key](https://console.mistral.ai/api-keys/).

Set the `MISTRAL_API_KEY` in your `.env` file.

### Usage

Use Mistral AI 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**:

```python
from livekit.plugins import mistralai

session = AgentSession(
    llm=mistralai.LLM(
        model="mistral-medium-latest"
    ),
    # ... tts, stt, vad, turn_handling, etc.
)

```

---

**Node.js**:

```typescript
import * as mistralai from '@livekit/agents-plugin-mistralai';

const session = new voice.AgentSession({
    stt: new mistralai.LLM({
        model: "mistral-medium-latest",
    }),
    // ... 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/mistralai.md#livekit.plugins.mistralai.LLM) for a complete list of all available parameters.

- **`model`** _(string | ChatModels)_ (optional) - Default: `ministral-8b-latest`: Which Mistral AI model to use. You can pass a string or a typed enum from `ChatModels`.

- **`temperature`** _(float)_ (optional): 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.

- **`top_p`** _(float)_ (optional): Nucleus sampling parameter.

- **`presence_penalty`** _(float)_ (optional): Penalize new tokens based on their presence in the text so far.

- **`frequency_penalty`** _(float)_ (optional): Penalize new tokens based on their frequency in the text so far.

- **`random_seed`** _(int)_ (optional): Random seed for reproducibility.

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

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

- **`max_completion_tokens`** _(float)_ (optional): The maximum number of tokens the LLM can output.

### Provider tools

The Mistral Conversations API 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 |
| `WebSearch` | Search the internet for up-to-date information. | None |
| `DocumentLibrary` | Search uploaded document collections via [Libraries](https://docs.mistral.ai/studio-api/knowledge-rag/libraries#connecting-libraries-to-agents). | `library_ids` (required) |
| `CodeInterpreter` | Write and Execute Python code in a sandboxed environment. | None |

```python
from livekit.plugins import mistralai

agent = MyAgent(
    llm=mistralai.LLM(model="mistral-medium-latest"),
    tools=[mistralai.tools.WebSearch()],  # replace with any supported provider tool
)

```

## Additional resources

The following resources provide more information about using Mistral AI with LiveKit Agents.

- **[Mistral AI STT docs](https://docs.livekit.io/agents/models/stt/mistralai.md)**: Mistral AI STT documentation.

- **[Mistral AI docs](https://docs.mistral.ai/)**: Mistral AI platform documentation.

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

---

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

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