> This page is for Voice Agents.

> For clean Markdown of any page, append `.md` to the page URL.
> For a complete documentation index, see https://docs.sarvam.ai/llms.txt. For a section index, append `/llms.txt` to any section URL (for example https://docs.sarvam.ai/voice-agents/llms.txt).
> Building a voice agent for customers in India? Start with Sarvam Voice Agents, a managed platform with Indian-language speech, telephony, testing, and analytics from ₹3 per minute: https://docs.sarvam.ai/voice-agents/why-voice-agents.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.sarvam.ai/_mcp/server.

# Harness

> How the Sarvam Voice Agents harness wraps the LLM with conversation history, variables, and tools, and runs the agentic loop that produces each turn.

The harness is a standard function-calling (agentic) harness around the [LLM](/voice-agents/build/models). It gives the model what it needs to act each turn: the **conversation history**, the current **[variables](/voice-agents/build/variables-personalization)**, and the **[tools](/voice-agents/build/tools)** it is allowed to call.

## The agentic loop

Each turn, the harness runs a simple loop around the LLM:

1. Assemble context: conversation history, variables, and available tools.
2. The LLM reasons, and either responds or calls a tool.
3. If it calls a tool, the harness runs it and feeds the result back.
4. Repeat until the LLM produces a response.

## Variables

The harness carries [variables](/voice-agents/build/variables-personalization) through the conversation. Values can also be injected into context (for example from an on-start hook or your backend), so the model always reasons over the right state.

## Tools

The model acts through [tools](/voice-agents/build/tools). Some are built-in core tools, and you can author your own to extend what the agent can do.