Agent Skills

View as Markdown

Sarvam Skills is a set of Agent Skills that teach AI coding assistants the parts of Sarvam’s SDKs they’re most likely to get wrong: method names that break convention, parameters that silently fail instead of erroring, and response fields that behave unexpectedly. Install them once and any assistant that supports the Agent Skills spec (Claude Code, Cursor, Windsurf) reads them automatically before writing Sarvam-related code.

Why skills exist

An assistant’s training data goes stale, and Sarvam’s SDK has a few patterns that don’t match what a model expects from an OpenAI-shaped client:

  • Method names that differ from convention: chat completions are client.chat.completions(...), not client.chat.completions.create(...).
  • Parameters that silently fail: output_script is ignored on sarvam-translate, and the request still returns 200.
  • Response quirks: content can be None when reasoning consumes the token budget before generating output.

Each skill is a short SKILL.md covering only these corrections, with Python and JavaScript/TypeScript snippets. For everything else (full parameter tables, voice/language catalogs, rate limits), skills link out to llms.txt, which stays current automatically.

Available skills

SkillCovers
chatChat completions with Sarvam-105B/30B: quick starts, streaming, reasoning mode, the OpenAI-compatible path, and the content=None gotcha.
speech-to-textTranscription with Saaras v3: quick starts, the Batch API for long audio + diarization, and WebSocket streaming across 23 languages.
text-to-speechSynthesis with Bulbul v3: quick starts, HTTP streaming, WebSocket, pronunciation dictionaries, and unsupported-parameter warnings.
translateTranslation with Sarvam-Translate v1 and Mayura v1: model feature differences and silent parameter failures.
voice-agentsReal-time voice agents with LiveKit and Pipecat (Python), plus a JS/TS reference for custom pipelines.
vibe-codingVendor-neutral habits for building with an agent: small steps, verification, skills over long prompts. Not Sarvam-specific; pair it with a domain skill above.

Install

$# Install every skill
$npx skills add sarvamai/skills
$
$# Install just the ones you need
$npx skills add sarvamai/skills --skill chat
$npx skills add sarvamai/skills --skill text-to-speech
$
$# Browse and pick interactively
$npx skills add sarvamai/skills --list

Then set up the SDK as usual:

$export SARVAM_API_KEY="your-api-key" # get one at dashboard.sarvam.ai
$pip install sarvamai # Python
$npm install sarvamai # JavaScript/TypeScript

Skills vs. the MCP server vs. llms.txt

All three get Sarvam knowledge in front of an assistant; pick based on when you want that to happen:

Agent SkillsMCP serverllms.txt
When it loadsOnce, installed into your project/editorLive, queried on demand while codingFetched manually when you need it
Best forBaking in SDK-specific corrections an assistant keeps getting wrongInteractive coding sessions that need current API details or want to call Sarvam APIs directlyBulk ingestion, RAG indexes, one-shot context
Setupnpx skills add sarvamai/skillsOne-time MCP client configNone (just a URL)

They’re complementary: a skill stops an assistant from writing client.chat.completions.create(...), while the MCP server or llms.txt supply the parameter tables and docs a skill deliberately leaves out.