Get started / Getting started
Build your first voice agent
From zero to a live agent answering calls in four steps — set your keys, pick your models, write the agent, and dial in.
Quickstart
Four steps to your first call.
- 1
Set your API keys
Copy .env.example to .env and fill in the required keys — Clerk, Postgres, LiveKit, and your model providers.
- 2
Pick your models
Choose the STT, LLM, and TTS. Defaults work out of the box; override per-project or per-agent.
- 3
Write the agent
One import, one file. The SDK handles voice, telephony, and routing.
- 4
Make a call
Attach a number to your agent and dial in — it answers and runs the process.
Write the agent SDK
Install @voicelayer/sdk — then this is a complete agent:
import { Agent } from '@voicelayer/sdk';
export default await new Agent({
name: 'fnol-simple',
prompt: 'You are a calm First Notice of Loss intake agent.',
capabilities: ['fnol', 'inbound-sip'],
tools: {
transferToHuman: {
description: 'Transfer the caller to a human claims agent.',
run: async (_, ctx) => ctx.handoff('+1 555 012 3456'),
},
},
}).start(import.meta.url);Your default models
Every call runs a STT → LLM → TTS pipeline. These are the defaults — override per-project (BYOK) or per-agent.
Deepgram Nova-3
speech-to-text
DEEPGRAM_API_KEYOpenAI · gpt-4o
reasoning · Anthropic fallback
OPENAI_API_KEYCartesia Sonic
text-to-speech · Inworld alt
CARTESIA_API_KEYThis page lives inside the dashboard. It renders through your own components and theme system — try the theme picker in the top bar and watch the docs restyle with the product.