Build voice agents
in TypeScript
A TypeScript SDK, signed webhooks and a documented REST API. Built by developers, for developers.
npm install hmsovereign
# or
pnpm add hmsovereign
# or
bun add hmsovereignFive minutes from install to first call
Install the SDK
Add the hmsovereign package to your project.
npm install hmsovereign
# or
pnpm add hmsovereign
# or
bun add hmsovereignInitialize the client
Use your organization API key from the dashboard.
import { HMSSovereign } from "hmsovereign"
const client = new HMSSovereign({
apiKey: process.env.VOICEDOCK_API_KEY!,
})
// List existing assistants
const assistants = await client.assistants.list()
console.log(`You have ${assistants.length} assistants`)Create your first assistant
Configure provider, voice, and system prompt.
const assistant = await client.assistants.create({
name: "Customer Support",
first_message: "Hi, how can I help you today?",
llm_config: {
provider: "openai",
model: "gpt-5.4-mini",
messages: [
{
role: "system",
content: `You are a helpful support agent
for an e-commerce store. Be concise.`,
},
],
},
stt_config: {
provider: "deepgram",
model: "nova-3-general",
language: "nl",
},
tts_config: {
provider: "elevenlabs",
voice_id: "ukiwGs47sHyibruHJ1vg",
},
})Start a call
Trigger an outbound call or accept an inbound one.
// Outbound call
const call = await client.calls.create({
destination: "+31612345678",
assistant_id: assistant.id,
})
// Status updates arrive on your webhook
console.log(call.call_id)Endpoints you'll actually use
A small, focused API. No abstractions to fight. Prefer to work from an AI assistant? Our MCP server lets you create and manage assistants, numbers and calls from Claude or another MCP client.
/api/v1/assistantsList your assistants/api/v1/assistantsCreate a new assistant configuration/api/v1/calls/outboundInitiate an outbound call/api/v1/calls/{id}Fetch call details and transcripts/api/v1/numbersList your phone numbersSubscribe to what matters
Answer tool calls, follow call status and receive the full transcript after the call, all over one signed webhook channel.
assistant-requestIncoming call — return the assistant config to handle it
status-updateCall lifecycle updates (in-progress, ended, ended-with-error)
tool-callsAssistant invoked a tool — your handler runs here
end-of-call-reportFinal transcript, recording URL, analysis on hangup
Ready to dive in?
Read the full docs or grab the SDK from npm.