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.
Vision Agents requires a Stream account
for real-time transport. Get your Sarvam API key from the Sarvam
dashboard.
from vision_agents.core import Agent, Userfrom vision_agents.plugins import sarvam, getstream, smart_turnagent = 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-30b"), stt=sarvam.STT(language="hi-IN"), tts=sarvam.TTS(speaker="shubh"), turn_detection=smart_turn.TurnDetection(),)
Set SARVAM_API_KEY in your environment or pass api_key directly.
Sarvam-m supports “hybrid thinking” — it emits <think> reasoning blocks before the answer. The plugin automatically strips these so they don’t reach TTS.
@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"