How to Write an AI Voice Agent Prompt
A voice agent prompt is the script and rulebook the model follows on every call. Here is what goes in one, how Retell and Vapi structure it, and when a prompt alone stops being enough.
- published
Every voice agent has a brain, and the prompt is how you shape it. An AI voice agent prompt is the set of instructions that tells the model who it is and what it should do on a call. If you are new to voice agents generally, start with what an AI voice agent is before diving into prompt writing. If you have built agents before, see how to build an AI voice agent for the wider picture. This page stays on the prompt itself: what it is, what belongs in it, and when it stops being enough. For the parts around it, read about AI voice agent architecture and AI voice agent testing. For platform specifics, see our Retell review and our Vapi review. A good prompt is the difference between an agent that rambles and one that gets the job done. A bad one wastes the caller's time. So it pays to write it with care. The rest of this page shows how.
What an AI voice agent prompt is (and how it differs from a chat prompt)
A voice agent prompt is the instruction set the model reads before and during a call. It covers who the agent is, what it should say first, and what it should do when the caller asks for something.
It differs from a chatbot prompt in one big way: the agent talks out loud, in real time. A chat prompt can afford long, winding answers. A voice prompt cannot. Callers will not sit through a paragraph. Every reply has to be short enough to say out loud and follow on the first listen. There is no scrolling back.
The other difference is pace. A chat user types and waits. A caller expects a reply right away, so the prompt has to steer the model toward quick, clear turns rather than long monologues.
How Retell structures the prompt: the single prompt agent
Retell takes a direct approach. Retell says a single prompt agent defines your whole agent with one prompt. That one prompt is where the whole agent is defined.
Retell recommends starting with a single prompt. It says to use one when the task can be described clearly in a single prompt. It also says having multiple steps does not, by itself, require conversation flow. So do not split things up just because the call has stages.
A single prompt lets the model decide how to run the conversation and use its tools. Retell says single prompt agents need less design work and leave more decisions to the model. For a client project where the call is open-ended, that freedom is often what you want.
How Vapi structures the prompt: system prompt, first message, and templates
Vapi says assistants use a single system prompt plus tools and structured outputs. The system prompt carries the instructions. Tools connect the agent to outside systems. Vapi says tool integration connects a voice agent to your APIs, databases, and existing systems.
Vapi also names the opening line. Vapi says the first message is what the assistant says when the call starts. The first thing a caller hears sets the tone for the call.
For common use cases, Vapi says a template includes a first message and a system prompt written for a common use case. A template gives you a starting point rather than a blank page.
On Vapi, a model sits underneath the prompt. Vapi says the large language model processes the conversation and generates responses. Your prompt is what that model reads to decide what to say.
What to put in a voice agent prompt
Whether you write one block for Retell or a system prompt for Vapi, the same material belongs in it. Here is a checklist:
- Identity. Who the agent is and what it represents. A name, a role, and the company it speaks for.
- Goal. What a successful call looks like. Book the appointment, answer the question, qualify the lead.
- Scope. What the agent should not do. Say clearly what falls outside its job and what it should do when it hits that edge.
- Style. Short sentences. Plain words. A tone that fits the client's brand.
- Rules for hard moments. What to do when the caller asks something it does not know, wants to speak to a human, or gets upset.
- Tools and when to use them. If the agent can look things up or take actions, say when to reach for each one.
Keep the language spoken, not written. Read the prompt out loud while editing. If a line sounds wrong in your own mouth, it will sound wrong on the call.
How long should the prompt be? As long as the task needs and no longer. Retell says a growing single prompt can make the model struggle to follow all of its instructions. That is the signal to trim or restructure, which brings us to the next section.
When a single prompt stops being enough
On Retell, there is a second structure. Retell says a conversation flow agent divides the task into nodes for tighter execution control or less context per node. Retell says to switch to conversation flow only when a single prompt agent can no longer meet your requirements.
Two cautions come with that switch. Retell says conversation flow can give tighter control over execution order, which can matter for compliance requirements. But Retell also says using conversation flow does not make every part of the agent deterministic, and that conversation flow is not automatically more reliable. Nodes are a tool for control, not a fix for a bad prompt.
On Retell, facts the agent needs on demand can go in a knowledge base rather than the prompt. Retell says its knowledge base can crawl a website or take uploaded documents that your agent retrieves from. A prompt stuffed with reference material is a prompt that is hard to maintain.
Testing and improving your prompt
A prompt is never done on the first draft. You test it, listen to calls, and revise.
Retell says simulation testing runs graded test cases to catch regressions before launch. Write test cases for the calls you expect and the calls you fear. Run them after every prompt change.
Retell says A/B testing compares agents or prompts by splitting live traffic between them. That tells you which prompt version performs better with real callers, not just in your test suite.
On Vapi, the call record is your feedback loop. Vapi says call logs let you review the transcript, recording, and how the call ended. Read the transcripts of failed calls before you touch the prompt. Often the fix is one unclear instruction, not a rewrite.
Vapi says publishing an assistant creates a new assistant version. Each published change becomes a new version of the assistant.
Where to go next
Write the first prompt, run it through simulation or a few live calls, and revise. Keep the single prompt until it cannot meet the requirements. Push facts into the knowledge base and actions into tools. Test every change. That is the whole craft of voice agent prompting.