Creating Your AI Persona
The most important part of your AI agent is the instructions (system prompt). This defines who the agent is, what they do, and how they behave.Writing Effective Instructions
Your instructions should include:1. Identity & Role
2. Goal & Context
3. Tone & Style
4. Handling Scenarios
5. Boundaries
Complete Example
Voice Selection
Realtime Mode Voices
In Realtime Mode, choose from preset voices optimized for low-latency conversations. The default voice isalloy.
Check available voices via GET /v1/voices/builtin.
Realtime Mode voices are optimized for ultra-low latency and natural conversation. They work best for English but can handle other languages with proper instructions.
Legacy Mode: Full Voice Library
Legacy Mode gives you access to hundreds of built-in voices plus voice cloning:- Large voice library with voices across different styles and tones
- Voice cloning: Upload audio samples to clone any voice
- Multiple languages supported
- Custom voice IDs: Use any voice from our library
GET /v1/voices/builtin and GET /v1/voices.
Language & Dialect Control
Realtime Mode
- Auto-detection: Works automatically but best with explicit instructions
- Instruction-based: Tell the AI “Speak only in Spanish” or “Respond in French”
Legacy Mode
- Full control: Set
stt_languagefor speech recognition - 36+ languages: en-US, en-GB, en-AU, es-ES, es-MX, fr-FR, de-DE, and more
- Dialect-specific: Choose British English (
en-GB) vs American (en-US)
Temperature & Creativity
Control how creative or focused your AI is:- 0.0-0.3: Very focused, consistent responses (good for confirmations)
- 0.4-0.7: Balanced (default, good for most use cases)
- 0.8-1.0: Creative, varied responses (good for sales, engaging conversations)
First Sentence
Set the opening line to control how the call starts:Best Practices
Do This
- Be specific: Include exact scenarios and how to handle them
- Set boundaries: Define what the AI should and shouldn’t do
- Use variables: Use
{{variable}}syntax for personalization - Test thoroughly: Try different scenarios before going live
- Iterate: Refine instructions based on real call transcripts
Avoid This
- Vague instructions: “Be helpful” is too generic
- Conflicting goals: Don’t ask the AI to both sell and not be pushy without clear boundaries
- Missing context: Provide relevant information about the customer or situation
- Too long: Keep instructions focused, around 200-500 words
Next Steps
Voice Library
Browse available voices and learn about voice cloning.
Function Calling
Give your AI tools to interact with your systems mid-call.