Skip to content

Guide · Voice

Writing call scripts and flows for an AI voice agent: what to include and what to avoid.

Published

An AI voice agent script is a set of instructions, not a word-for-word transcript. Get the structure right and the agent handles real calls cleanly; get it wrong and you end up with an agent that over-explains, mispronounces a callback number, or transfers callers before it should. Here's how vendors actually recommend building one, what the law requires in the greeting, and where scripting ends and platform settings take over.

What belongs in an AI voice agent script (and what doesn't)

An AI voice agent script is really a prompt: written instructions that tell a language model how to run a phone call. Retell AI, one of the platforms used to build these agents, organizes a working call-handling prompt into five parts: a role (who the agent is and what it's allowed to do), a call-flow overview, numbered steps for the conversation itself, a closing section, and a hold-handling section for when the agent needs to pause and check something. Caller turns get marked explicitly, something like "Wait for caller response," so the model knows when to stop talking and listen.

The instinct most business owners have is to write more: more rules, more "if this happens, do that," more edge cases covered up front. Retell's own prompting guidance pushes back on this directly: a longer prompt is not a better prompt. Every added instruction slows the model's response and weakens its reasoning, and prompts generated by AI tools tend to over-correct, covering situations the agent will rarely face. The same guidance says to state each instruction once. If you repeat a rule across three sections of the prompt because you're not sure the model will catch it the first time, you've created three places that can drift out of sync the next time someone edits the script.

The practical rule: write the script for the calls you actually get, not for every call you can imagine. A general contractor booking estimates doesn't need a paragraph about international calling codes. A dental office confirming appointments doesn't need branching logic for wholesale order inquiries. Add exception handling once you have evidence a specific failure mode is happening, not because it seems possible in theory.

The call flow: happy path first, then exceptions

Before you write a single guardrail or fallback, write the flow for the call that goes right. Bland AI's prompting guide recommends breaking the call into start, middle, and end stages, and its own appointment-reminder example uses a 5-step flow: introduction, identity verification, confirming the appointment time, offering alternate slots if needed, and closing with contact information. Notice that even the "alternate slots" step is part of the happy path, not an exception, since offering a different time is a normal, expected outcome of a confirmation call.

Retell's guidance agrees with this build order: start with the happy-path flow, then add failure handling only when you have evidence it's needed, rather than patching each new failure with another "do not" rule. That matters because "do not" rules accumulate fast once a script is live. A caller mumbles, interrupts, or asks something off-script, and the instinct is to add a line forbidding that specific behavior. Do that enough times and the prompt turns mostly into prohibitions, which is exactly the bloat Retell warns against.

There's also a structural decision to make: one prompt, or a multi-step flow with separate states. Retell recommends building a first agent as a single prompt describing the whole task, rather than starting with multiple states or a flow diagram. Multi-state design, where each stage of the call hands off to the next via something like "once both are provided, transition to order_lookup," adds real value once a call has distinct phases with different rules in each phase, but it's more to maintain. It's also worth knowing that Retell has deprecated its original multi-prompt agent type: new multi-prompt agents can't be created after 12/15/2026, existing ones can't be edited after 02/01/2027, and Retell will auto-convert the remainder to its newer node-based conversation-flow agent type. If you're building a flow with distinct stages today, plan for that migration rather than treating the current multi-prompt format as permanent. The guide on how an agent connects to your calendar and CRM once the flow is built lives at setting up an AI voice agent.

Writing the greeting and identifying your business

An AI receptionist greeting script has one legal non-negotiable: identify the entity that's calling or being called. Under 47 CFR § 64.1200(b)(1)-(2), as referenced in the FCC's February 2024 Declaratory Ruling (FCC 24-17), artificial or prerecorded voice messages must identify the responsible business. For an AI phone agent, that means the opening line should name your company, not just say "hello, how can I help you."

What the greeting does not currently have to say is "you are speaking with an AI." The FCC has only proposed a rule that would require affirmatively disclosing AI-generated voice use at the start of a call; as of 2026-11-05 that remains a proposal, not a binding requirement. Businesses that want to disclose it anyway for trust reasons can, but treating it as a current legal mandate overstates where the rule actually stands.

Two other rules shape script content more broadly. The FCC's ruling, built on existing TCPA restrictions, holds that AI-generated or AI-simulated voice calls need prior express consent before they go out, absent an emergency purpose or exemption, and prior express written consent if the call includes advertising or telemarketing. Separately, the FTC's Impersonation Rule (16 C.F.R. Part 461, effective April 1, 2024) makes it illegal to falsely claim affiliation with a government entity or another business. Practically: your script should state who you are plainly, and it should never imply a relationship with an agency, bank, or brand you don't actually have.

Scripting numbers, times, and contact details so the caller understands them

Text-to-speech engines read digits and symbols in ways that trip callers up if the script hands them raw text. Retell's situational prompt guide gives concrete fixes. Phone numbers should be written digit by digit with a spaced dash between groups, so a number is rendered in the prompt as something like "four one five - eight nine two - three two four five" rather than as plain digits, which keeps the model from reading it as one long run of numbers. Email addresses get spelled letter by letter, with "at" for @ and "dot" for periods, so sam@example.com becomes "s-a-m at e-x-a-m-p-l-e dot com." Times should be written the way a person would say them: 1:00 PM becomes "one PM," 3:30 PM becomes "three thirty PM."

This sounds fussy, but it's the difference between a caller writing down a working number and a caller writing down nonsense. Without that spacing instruction, there's a real chance the voice model reads a callback number as a single long string instead of three distinct groups a person can actually copy down.

If writing all of this by hand feels like busywork, Retell offers a shortcut: its "Agent Handbook" feature has one-click presets for phone-number pronunciation, email spelling, and general speech normalization, so you don't have to hand-write every digit-by-digit instruction yourself. Check whether whatever platform you're using has an equivalent before you spend time scripting pronunciation rules manually.

Writing transfer and tool-call rules without breaking the flow

Two things live outside the plain conversation text but still need careful scripting: tool calls (the agent checking a calendar, booking a slot, looking up an order) and transfers to a human.

For tool calls, Retell's guidance is to specify exactly when a tool should fire, not leave it to the model's judgment. Its example: transfer when a party size is over eight, or re-check availability whenever date, time, or party size changes. Vague thresholds produce inconsistent behavior. Equally important: never tell the caller a result is final until the tool has actually reported back, and keep the call open while a booking is still pending. An agent that says "you're all set for Tuesday" before the calendar tool confirms the slot is available creates a problem you'll hear about from a customer later.

Transfers have their own mechanics worth knowing. Vapi's transfer-call documentation is explicit that the model has to actually invoke the transfer tool; speech alone, the agent saying "let me transfer you," doesn't start anything. Vapi recommends the agent speak its acknowledgment in the same response that triggers the tool call, so there's no dead air. Vague transfer-trigger wording in the system prompt is a known failure mode too; Vapi warns it causes agents to transfer before they should, so narrow the conditions for each destination rather than writing one broad "transfer if the caller seems frustrated" rule. Vapi's dynamic-transfer example also instructs the model to always gather the reason for the transfer before initiating it, so the receiving party gets context.

Transfers default to a blind handoff with no introduction to the person picking up, unless you configure a warm-transfer mode; some warm-transfer options, like summarizing the call for the receiving party before connecting, are Twilio-only, so check what your underlying telephony provider supports before scripting a warm handoff. Plan for failure too: Vapi's default message when a transfer can't complete is "Could not transfer the call," and whether the call then ends or returns to the AI is a configurable setting. Decide which behavior you want rather than leaving the default in place by accident. If you're still weighing an AI voice agent against a live answering service for handling these transfers at all, see the comparison at AI answering service vs virtual receptionist.

Guardrails, voicemail detection, and other mechanics outside the script text

Some behaviors should be controlled through platform settings, not prompt wording, and writing instructions for them in the script is largely wasted effort. Retell's single-prompt guidance is direct about this: tone, background-noise filtering, and interruption handling are controlled through settings, and an instruction like "keep speaking even if the caller talks over you" written into the prompt will not change interruption behavior.

Safety filtering works the same way. Retell's built-in guardrails screen the agent's own responses against nine categories, including harassment, self-harm, violence, and regulated professional advice, plus one input-side category aimed at callers trying to jailbreak or manipulate the agent. When a guardrail triggers, Retell swaps the flagged response for a placeholder and the call continues; guardrails don't end or transfer the call by themselves, and they add roughly 50ms of latency per call. This runs independent of whatever you wrote in the script.

For outbound calls, voicemail detection is also a platform-level mechanic, not something you script in prose. Twilio's Answering Machine Detection has two modes: Enable, which returns a result as soon as it identifies a human, machine, or fax, and DetectMessageEnd, which waits until the greeting ends, usually at the beep, so you can leave a full voicemail message. The timeout for detection defaults to 30 seconds and can be set anywhere from 3 to 59 seconds; businesses with longer voicemail greetings should raise it. Twilio is upfront that this detection isn't always right; a very short greeting, around two seconds, can get misread as a live person answering. If your outbound calling volume is meaningful, test this setting against your actual target numbers rather than assuming the default works.

Compliance checklist before you turn the script live

Requirement What it means for your script Source rule
Identify the business Opening line must name the calling entity 47 CFR § 64.1200(b)(1)-(2)
Prior consent for AI voice calls Get consent before placing AI-generated/simulated voice calls, except emergencies or exemptions FCC Declaratory Ruling FCC 24-17
Written consent for ads/telemarketing If the call includes advertising, consent must be prior express written consent FCC Declaratory Ruling FCC 24-17
Opt-out method for telemarketing Telemarketing/ad calls must offer a way to opt out 47 CFR § 64.1200(b)(3)
No false affiliation claims Don't imply the agent is, or is affiliated with, a government or business entity it isn't FTC Impersonation Rule, 16 C.F.R. Part 461
AI disclosure ("this is an AI") Not currently required federally; a disclosure rule is proposed but not finalized FCC proposed rule, as of 2026-11-05

This table is a starting checklist, not legal advice. State-level rules exist outside what's covered here, and a lawyer should review scripts for regulated industries or outbound marketing use.

Build it yourself, use a preset, or hire it out

Writing a working AI voice agent script is mostly structured discipline: a role, a happy-path flow, correctly formatted numbers and times, narrow transfer conditions, and a short compliance pass. A business with one clear call type, say appointment confirmations, can reasonably write and test that itself using platform presets like Retell's Agent Handbook for the pronunciation details.

Where it gets harder is multi-step flows with several transfer destinations, tool calls tied to a live calendar or CRM, and outbound calling where answering-machine detection and consent rules both apply. At that point the work isn't really "writing a script" anymore; it's integration and testing across a flow with several moving parts, which is closer to what our AI Voice Agent service covers. Async Automations starts every engagement with a free audit, a reasonable way to find out whether your call volume and flow complexity justify a custom build rather than a script you maintain yourself.

Common questions

Not yet as a binding federal rule. The FCC has only proposed a rule requiring disclosure of AI-generated voice use; as of November 2026 that proposal has not been finalized. What is currently required is that the call identify the business responsible for it, under 47 CFR § 64.1200(b)(1)-(2), and that you have prior consent before placing AI-generated voice calls under the FCC's February 2024 Declaratory Ruling.

Related reading

Never miss another call.

An AI voice agent answers every call around the clock, books the job, and texts you the summary, with a person still deciding anything that matters. Start with a free 7-day pilot on your real phone line and judge it on the calls it catches.