Anatomy of a system prompt
A strong system prompt covers four areas:- Identity — Who the agent is and what it represents.
- Goal — The primary task the agent should accomplish.
- Constraints — What the agent should and should not do.
- Tone — How the agent should communicate.
system-prompt.txt
Voice-specific writing tips
System prompts for voice agents differ from those for text chatbots. Keep these in mind:Keep instructions action-oriented
Keep instructions action-oriented
Tell the agent what to do, not what to avoid. “Confirm the customer’s order number before proceeding” is clearer than “Don’t skip order confirmation.”
Use pronunciation hints for tricky terms
Use pronunciation hints for tricky terms
If your brand name or product has unusual pronunciation, spell it phonetically in the prompt. For example: “Our product is called Qwirl (pronounced ‘kwerl’).”
Specify response length
Specify response length
Voice responses should be short. Add an instruction like: “Keep each response to 2-3 sentences. Ask one follow-up question at a time.”
Define escalation behavior explicitly
Define escalation behavior explicitly
Agents work best when they know exactly when to stop trying. State the escalation condition clearly: “If you cannot answer after two attempts, transfer the call using the transfer tool.”
Using dynamic variables in the prompt
You can inject per-session data into the prompt using{{variable_name}} placeholders. These are resolved at conversation start before the agent processes anything.
prompt-with-variables.txt
Prompt size limit
The maximum system prompt size is 2 MB. If you need to supply large amounts of reference information, use the knowledge base instead — it is retrieved dynamically and does not count toward the prompt limit.Setting the prompt via API
Changes to the system prompt take effect immediately for new conversations. Conversations already in progress continue with the prompt that was active at their start.

