> ## Documentation Index
> Fetch the complete documentation index at: https://koreai.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# How to write voice-friendly agent responses

[Back to how-to guides](https://koreai.mintlify.site/agent-platform/abl/how-to/overview.md#voice-and-realtime-conversations)

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.

| Layer | What it does | How you control it |
| - | - | - |
| Model rules | Tell the model how to word replies on a voice channel. | `EXECUTION.voice.instructions`, or `VOICE` `instructions` in a behavior profile. |
| Authored replies | Fixed text that you write. | `RESPOND`, plus `VOICE` `PLAIN_TEXT` for a spoken version. |
| Platform cleanup | Removes markup from text before it is spoken. | Nothing. It runs on every voice reply. |

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:

| Problem | Use |
| - | - |
| Generated replies sound like written text. | `EXECUTION.voice.instructions`. |
| Chat must keep its formatting. Voice must not. | A behavior profile that matches voice channels only. |
| A fixed reply has a list, a URL, or an abbreviation. | `RESPOND` plus `VOICE` `PLAIN_TEXT`. |
| Replies run long. | Sentence limits in `CONVERSATION.speaking`. See [Configure speaking style, tone, and pace](https://koreai.mintlify.site/agent-platform/abl/how-to/configure-voice-speaking-style). |

### What platform cleanup does

Cleanup runs on voice replies that have no `PLAIN_TEXT`. It is a safety net. Do not rely on it.

| Cleaned | Not cleaned |
| - | - |
| Bold and italic markers. | Tables. The pipe characters stay. |
| Link syntax. The link text stays. | Code spans in backticks. |
| Citation markers such as `[1]`. | HTML tags. |
| Emoji. | A heading mark with no space after it, such as `#Heading`. |
| Heading marks followed by a space. List markers at the start of a line. | |
| ISO dates. `2026-12-15` is spoken as "15 December 2026". | |

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`

```yaml theme={null}
AGENT: Booking_Voice_Agent

GOAL: "Help callers check their hotel booking by phone."

PERSONA: "You are a calm booking assistant."

EXECUTION:
  voice:
    instructions: "Speak in plain sentences. Do not use lists, markdown, or emoji. Say one fact per sentence. Keep each answer to two short sentences. Say dates as words, for example December fifteenth."

TOOLS:
  get_booking(booking_id: string) -> {status: string, check_in: string, room_type: string}
    description: "Look up a booking by its reference. Project-local tool: replace with your booking API."
    confirm: never
    effect: read_only
    params:
      booking_id:
        description: "The booking reference the caller gave"

ON_START:
  RESPOND: "Thanks for calling. How can I help with your booking?"
```

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:

| Voice mode | Where the rules take effect |
| - | - |
| Pipeline (speech-to-text, agent, text-to-speech) | In the agent's model call. Cleanup runs before text-to-speech. |
| Realtime (speech-to-speech) | In the provider prompt for Legacy and Runtime guarded orchestration. For Runtime owned orchestration, the rules shape the text that the provider then speaks. |

For the realtime delivery settings, see [Configure speaking style, tone, and pace](https://koreai.mintlify.site/agent-platform/abl/how-to/configure-voice-speaking-style).

## 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`

```yaml theme={null}
BEHAVIOR_PROFILE: voice_plain_speech
PRIORITY: 100
WHEN: channel.name in ["voice", "voice_realtime", "voice_pipeline", "korevg"]

VOICE:
  instructions: "Speak in plain sentences. Do not use lists, tables, markdown, or emoji. Say one fact per sentence. Offer at most three options at a time, then ask which one the caller wants."
```

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`

```yaml theme={null}
AGENT: Reservation_Help

GOAL: "Find out whether the customer wants to change dates, cancel, or add a guest, and confirm the choice back to them."

PERSONA: "You are a calm reservation assistant."

USE BEHAVIOR_PROFILE: voice_plain_speech

ON_START:
  RESPOND: |
      You can:
      - **Change** the dates
      - **Cancel** the booking
      - **Add** a guest
      Which one do you want?
    VOICE:
      PLAIN_TEXT: "You can change the dates, cancel the booking, or add a guest. Which one do you want?"
```

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.

```yaml theme={null}
CONVERSATION:
  speaking:
    max_sentences: 2
    one_thing_at_a_time: true
    tool_results:
      max_points: 3
```

This snippet goes at the top level of an agent. See [Configure speaking style, tone, and pace](https://koreai.mintlify.site/agent-platform/abl/how-to/configure-voice-speaking-style) 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](https://koreai.mintlify.site/agent-platform/abl/how-to/block-tool-calls-with-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

| Mistake | Why it happens | How to avoid it |
| - | - | - |
| The agent reads out bullets after you add voice rules. | Your rules replace the default and leave out the "no lists" rule. | Restate "no lists, no markdown, no emoji" in your rules. |
| The profile never applies. | `WHEN` uses `context.channel` or a name that does not match your channel. | Use `channel.name` and list every voice channel name. |
| Test chat shows no voice behavior. | Voice rules apply on voice channels only. | Test on a voice channel. |
| The `VOICE:` block is spoken as text. | The `RESPOND:` block lines are not indented deeper than `VOICE:`. | Indent the reply text deeper than `VOICE:`. |
| `PLAIN_TEXT` has markdown that is read out. | `PLAIN_TEXT` skips cleanup. | Write plain words in `PLAIN_TEXT`. |
| An identifier loses its underscores. | Cleanup reads `_text_` as italics. | Put identifiers in `PLAIN_TEXT`, or avoid underscores in spoken text. |

## Troubleshooting

| Symptom | Likely cause | What to check |
| - | - | - |
| Callers hear "asterisk" or "pound". | Markup reached the speaker. | Add voice rules. Add `PLAIN_TEXT` for fixed replies. Check streaming replies for split markers. |
| Callers hear a table as pipes and dashes. | Cleanup does not handle tables. | Tell the model to give tables as sentences. |
| Callers hear a URL spelled out. | The reply contains a raw link. | Tell the model not to speak links. Offer to send them by another channel. |
| Replies are long on voice and short in chat. | The profile is not matching. | Check `profile_resolution` in the trace. Check the `WHEN` value. |
| Replies are long even with a rule. | The rule is advice to the model. | Lower `max_sentences`. Shorten the rule. Test again. |
| The agent speaks dates as `2026-12-15`. | The date sits inside a longer token, such as a date with a time. | Say dates as words in the rules. Use `PLAIN_TEXT` for fixed replies. |

## Related HowTos

* [Use SSML and voice-specific response settings](https://koreai.mintlify.site/agent-platform/abl/how-to/use-ssml-and-voice-settings)
* [Configure speaking style, tone, and pace](https://koreai.mintlify.site/agent-platform/abl/how-to/configure-voice-speaking-style)
* [Read back numbers, codes, and critical details](https://koreai.mintlify.site/agent-platform/abl/how-to/read-back-critical-details)
* [Use behavior profiles by context](https://koreai.mintlify.site/agent-platform/abl/how-to/use-behavior-profiles-by-context)
* [Write agent goals, personas, and instructions](https://koreai.mintlify.site/agent-platform/abl/how-to/write-agent-goals-personas-instructions)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.