LiveKit docs › Models › LLM › Additional models › Sarvam

---

# Sarvam LLM plugin guide

> How to use the Sarvam LLM plugin for LiveKit Agents.

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

## Overview

This plugin allows you to use [Sarvam](https://www.sarvam.ai/) as an LLM provider for your voice agents. Sarvam offers OpenAI-compatible chat completions tuned for Indian languages, with support for tool calling.

### Installation

Install the plugin:

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

```

### Authentication

The Sarvam plugin requires a [Sarvam API key](https://dashboard.sarvam.ai/).

Set `SARVAM_API_KEY` in your `.env` file.

### Usage

Use Sarvam 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 sarvam

session = AgentSession(
    llm=sarvam.LLM(
        model="sarvam-30b",
    ),
    # ... 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/sarvam/index.html.md#livekit.plugins.sarvam.LLM) for a complete list of all available parameters.

- **`model`** _(str | SarvamLLMModels)_ (optional) - Default: `sarvam-30b`: Model to use. Valid values are:

- `sarvam-30b`
- `sarvam-30b-16k`
- `sarvam-105b`
- `sarvam-105b-32k`
To learn more, see the [Sarvam documentation](https://docs.sarvam.ai/).

- **`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.

- **`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.

- **`wiki_grounding`** _(bool)_ (optional): Enables Retrieval-Augmented Generation (RAG). When set to `true`, the model retrieves relevant chunks from Wikipedia based on the user's question and uses them to ground its answer, improving factual accuracy for queries like educational, definitional, historical, and scientific questions. To learn more, see the [Sarvam documentation](https://docs.sarvam.ai/api-reference-docs/api-guides-tutorials/chat-completion/how-to/improve-response-factual-accuracy).

## Additional resources

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

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

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

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

- **[Sarvam docs](https://docs.sarvam.ai/)**: Sarvam's full docs site.

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

---

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

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