Skip to main content
Back to how-to guides Use this pattern when your agent speaks to callers on a voice channel. A caller hears a reply once, in order, with no screen. Write replies to be said, not read.

Concept

A voice reply reaches the caller through text-to-speech. Three layers decide what the caller hears. The platform adds default rules to the prompt on every voice channel. In substance, they say:
Use plain conversational text only. No markdown, no emoji, no numbered lists or bullet points. Use natural flowing sentences. Keep responses concise.
Your own rules replace this default. They do not add to it. Restate “plain speech, no lists” in your text. Choose the tool by the problem:

What platform cleanup does

Cleanup runs on voice replies that have no PLAIN_TEXT. It is a safety net. Do not rely on it. Two side effects to know:
  • Text between two underscores loses the underscores. ab_12_cd is spoken as ab12cd.
  • When a reply streams, cleanup runs on each chunk. A marker split across two chunks can reach the speaker.
PLAIN_TEXT is spoken as you write it. Only ISO dates and invisible characters are changed. Write no markdown in it.

Minimal working example

A booking agent answers by phone. The voice rules replace the default rules. agents/booking-voice-agent.agent.abl
Variable sources:
  • booking_id is a tool input. The model takes it from what the caller says.
  • get_booking is a project-local tool. Replace it with your own API.
The model can now answer “Your booking is confirmed. Check-in is December fifteenth.” It does not answer with a bulleted summary.

How it works

  1. On a voice channel, each model call includes the voice rules. Text channels do not get them.
  2. EXECUTION.voice.instructions sets the rules for the agent. A matching behavior profile with VOICE instructions takes priority over the agent value while the profile matches.
  3. An agent with a custom SYSTEM_PROMPT: does not get the default rules. Put the spoken-style rules in the prompt text or in EXECUTION.voice.instructions.
  4. Before speech, the platform cleans the reply text. A PLAIN_TEXT value skips the cleanup and is spoken as written.
  5. {{variable}} values in PLAIN_TEXT are filled in before the reply is spoken.
The rules apply to both voice modes: For the realtime delivery settings, see Configure speaking style, tone, and pace.

Common variations

Apply voice rules to voice channels only

Use a behavior profile when the same agent also serves chat. The profile WHEN must match the channel name. behavior_profiles/voice_plain_speech.behavior_profile.abl
The agent attaches the profile. It opens with a menu. Chat shows the list. Voice speaks PLAIN_TEXT. The profile rules shape every reply after the menu. agents/reservation-help.agent.abl
Both files are project files. The profile is attached by name. The name must match the BEHAVIOR_PROFILE: header. Indent the lines of a multi-line RESPOND: block deeper than the VOICE: line. If you do not, the platform reads VOICE: as reply text. Without PLAIN_TEXT, cleanup turns the menu into one run-on line: “You can: Change the dates Cancel the booking Add a guest Which one do you want?”

Keep answers short and read long results in parts

Set sentence limits and a point limit for tool results. The model is told these limits. They are not enforced.
This snippet goes at the top level of an agent. See Configure speaking style, tone, and pace for every speaking key.

Grounding guards are not available

EXECUTION.voice.grounding_guards compiles without a message, but it has no effect in this release. Do not depend on it. To stop a tool call that uses an invented value, use constraints.

Verification

  1. Publish the agent and call a voice channel that uses it. Chat testing does not apply voice rules.
  2. Ask a question that has a list answer, such as “What can I do with my booking?”.
  3. Listen for plain sentences and no more than three options at once.
  4. Read the call transcript. It must contain no *, #, bullets, tables, or links.
  5. Ask the same question in chat. The profile must not match, so chat keeps its list.
  6. In the trace, check the profile_resolution event. The profile name must be in the matched profiles for the voice turn.
  7. For a fixed reply with PLAIN_TEXT, check that the spoken words match the PLAIN_TEXT value.

Production readiness checklist

  • Every voice agent has its own voice rules, or a profile that matches voice channels.
  • Every fixed reply with a list, URL, table, or abbreviation has a PLAIN_TEXT value.
  • Profile WHEN conditions list every voice channel name you deploy.
  • Rules restate “no lists, no markdown, no emoji” when you replace the default.
  • Test calls cover a list answer, a long tool result, and a reply with a date.
  • A reviewer listened to at least one recorded call for each agent.

Common mistakes

Troubleshooting