Prompting Guide
A well defined prompt is the difference between a voice agent that frustrates users and one that delights them. This guide covers everything from SDK basics to advanced prompting strategies.
Adding Prompts in the SDK
Use self.context.add_message() in __init__ to set your system prompt:
The role can be "system" (instructions), "user" (customer input), or "assistant" (agent responses). User messages are added automatically by the SDK.
Why Voice Agents Are Different
Voice agents operate under constraints that chatbots don’t face:
These constraints mean your prompt needs to be clearer, more structured, and more anticipatory than a typical chatbot prompt.
Prompt Building Blocks
We recommend organizing your prompt into these sections, so the agent always knows: who it is, how to behave, what it knows, what it can do, and where the edges are.
-
Role & Objective: “You are a support specialist for…”
-
Personality & Tone: “Friendly, calm, never condescending”
-
Context (if applicable): “Customer name/order details for this outbound call.”
-
Instructions / Rules: “Always verify identity before discussing accounts.”
-
Tools (if applicable): “Use
check_order_statusafter confirming order ID.” -
Conversation Flow: “Open → Diagnose → Resolve → Close.”
-
Guardrails (if applicable): “Never provide legal advice; escalate abusive callers.”
This gives the agent a clear mental model: who am I, how should I behave, what do I know, what can I do, how should the conversation go, and what are my limits?
1. Role & Objective
Start with a single, clear statement of what the agent is and what it’s trying to accomplish.
Good
Bad
The agent knows its name, company, and two primary functions.
2. Personality & Tone
Voice agents need personality. Users form impressions within seconds.
Define:
- Tone: Professional? Casual? Warm?
- Energy level: Calm? Upbeat?
- Conversational style: Formal or relaxed?
3. Context (Outbound Calls)
For outbound calls or when you have data about the user, provide it explicitly:
The agent won’t ask for information it already has.
4. Instructions / Rules
Define the agent’s general behavior. Good instructions are actionable, specific, and prioritized.
Use bullet points. A wall of text is hard to parse for both you and the LLM.
5. Tools
For each tool, specify what it does, when to use it, what info is needed, and how to handle results:
6. Conversation Flow
Describe how the conversation should unfold—not as a rigid script, but as a flexible guide.
Guide, don’t script. “When the user asks for their balance, retrieve it and share conversationally” is better than exact words to say.
Use routing between sections: → If address correct: proceed to [Schedule Delivery]
7. Guardrails
Define what the agent should never do. These are your safety nets.
Common Mistakes
Wall of Text
Problem: Massive, unstructured paragraphs.
Fix: Use headers, bullet points, clear sections.
Shouting at the Agent
Problem: ALL CAPS, excessive exclamation marks, threatening language.
Fix: Write calmly. “Never share pricing” works as well as “NEVER EVER SHARE PRICING!!!”
Contradictory Instructions
Problem: “Be concise” + “Always explain thoroughly” + “Keep under 20 words.”
Fix: Prioritize. If brevity matters most, say so.
Over-Scripting
Problem: Exact dialogues for every scenario.
Fix: Describe the goal, not the exact words. Trust the agent.
Missing the 'What If'
Problem: Only covers the happy path.
Fix: Think through: What if they don’t have the info? What if they’re angry?
Vague Tool Instructions
Problem: “Use the booking tool” with no guidance.
Fix: Be explicit about triggers, prerequisites, and error handling.
Advanced Tips
Chunk Information
Voice users can only hold so much in memory. Break up complex information:
Confirm Critical Information
For phone numbers, dates, amounts—confirm them:
Set Boundaries Gracefully
When you can’t help, be natural about it:
Checklist
Before deploying, verify:
- Clear objective: Does the agent know what success looks like?
- Defined personality: Will it sound human or robotic? Is tone appropriate?
- Structured flow: Are main conversation paths clear?
- Tool instructions: Does it know when and how to use each tool?
- Edge cases: Have you handled common edge cases (“what if” scenarios)?
- Guardrails: Are boundaries clear and appropriate?
- No contradictions: Do all instructions align?
- Readable format: Is the prompt easy to scan?
Blueprint: Complete Example
Final Thought
The best prompts feel like onboarding a new teammate. You’re not giving them a script; you’re explaining who they are, what they’re trying to achieve, how they should behave, and what tools they have. Then you trust them to handle the conversation.
Clear structure + specific guidance + room for adaptation = an agent users enjoy talking to.
Want an exhaustive, line-by-line prompt breakdown? See the dedicated guide in our cookbook: Voice Agent Prompting Guide.

