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

# Sarvam LLM

[Sarvam AI](https://www.sarvam.ai/) provides language models built for Indian languages. The plugin uses Sarvam's OpenAI-compatible Chat Completions endpoint and automatically strips `<think>` reasoning blocks from streamed output.

> [!NOTE]
>
> Vision Agents uses [Stream Video](https://getstream.io/video/) for real-time WebRTC transport by default. [External WebRTC transports](https://visionagents.ai/integrations/introduction-to-integrations.md#edge-transport) are supported as well. Most AI providers offer free tiers to get started.

> [!NOTE]
>
> Get your Sarvam API key from the [Sarvam
> dashboard](https://dashboard.sarvam.ai/).

> [!TIP]
>
> Sarvam also provides [speech-to-text](https://visionagents.ai/integrations/stt/sarvam.md) and
> [text-to-speech](https://visionagents.ai/integrations/tts/sarvam.md). You can use all three in the same
> agent.

## Installation

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

## Quick start

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

agent = Agent(
    edge=getstream.Edge(),
    agent_user=User(name="Sarvam Agent", id="agent"),
    instructions="Reply in Hindi or English, whichever the user speaks.",
    llm=sarvam.LLM(model="sarvam-105b"),
    stt=sarvam.STT(language="hi-IN"),
    tts=sarvam.TTS(speaker="shubh"),
    turn_detection=smart_turn.TurnDetection(),
)
```

> [!WARNING]
>
> Set `SARVAM_API_KEY` in your environment or pass `api_key` directly.

## Parameters

| Name | Type | Default | Description |
| - | - | - | - |
| `model` | `str` | `"sarvam-105b"` | Model id (`sarvam-105b`, or `sarvam-105b-conversations`) |
| `api_key` | `str` | `None` | API key (defaults to `SARVAM_API_KEY` env var) |
| `base_url` | `str` | `"https://api.sarvam.ai/v1"` | Sarvam API endpoint |

## Available models

| Model | Description |
| - | - |
| `sarvam-105b` | 105B parameter model for maximum capability |
| `sarvam-105b-conversations` | Post-trained for real-time dialogue and voice-agent use cases |

> [!TIP]
>
> Sarvam-105b supports "hybrid thinking" — it emits `<think>` reasoning blocks before the answer. The plugin automatically strips these so they don't reach TTS.

## Function calling

```python theme={null}
@agent.llm.register_function(description="Get weather for a location")
async def get_weather(location: str) -> str:
    return f"The weather in {location} is sunny and 30°C"
```

See the [Function Calling guide](https://visionagents.ai/guides/mcp-tool-calling.md) for details.

## Next steps

> [card] [Sarvam STT](https://visionagents.ai/integrations/stt/sarvam.md)
>
> Streaming speech-to-text for Indian languages

> [card] [Sarvam TTS](https://visionagents.ai/integrations/tts/sarvam.md)
>
> Streaming text-to-speech for Indian languages


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.