Writing prompts
The prompt tells the agent who it is, what it is for and how it must behave. You write it in Agent Configuration → Agent Prompt.
Structure of a good prompt
Section titled “Structure of a good prompt”A prompt that works well usually has these parts, in this order:
- Persona. Who the agent is and who it works for. For example: “You are Priya, the front desk assistant at a multi-speciality clinic.”
- Goal. What a successful conversation looks like.
- Flows. Each task the agent handles, under its own heading, as numbered steps with their conditions. For example,
FLOW 1: BOOK AN APPOINTMENT, then step 1, step 2 and so on. - Facts. Opening hours, prices, policies and anything else the agent must get right. Put long reference material in the knowledge base instead.
- Rules. What the agent must never do, when to hand over, and how to handle things it can’t help with.
Tips:
- Write for the channel. On calls, everything is spoken. Tell the agent to use short sentences, read numbers and dates the way people say them, and avoid symbols and lists. In chat, short lists are fine.
- Confirm what matters. Ask the agent to read back names, numbers and dates before acting on them.
- Say when to use each tool. Name the tool and the moment to call it. Tool descriptions help, but the prompt sets the order of steps.
- Avoid abbreviations in spoken text. Write “Doctor” rather than “Dr.” in voice prompts, particularly in Hindi and Telugu.
- Don’t ask customers for secrets. Never tell the agent to collect passwords, OTPs, PINs, CVV codes or full card numbers.
Variables
Section titled “Variables”Use {{name}} to insert a variable into the prompt or the welcome message. Select Insert Variable to pick one.
- Context variables are passed in when a conversation starts, for example from the API or a CRM lookup.
- System variables are always available:
caller_number,called_number,call_id,call_direction,current_dateandcurrent_time. Text chats fill incall_id(the chat ID),current_dateandcurrent_time.
Define your own variables in the Variables section.
One prompt or one per language
Section titled “One prompt or one per language”By default, one prompt (Prompt (all languages)) is used in every language, and the agent replies in the customer’s language. Turn on Use a different prompt for a language only when that language needs its own instructions.
Length limits
Section titled “Length limits”| Field | Limit |
|---|---|
| Agent prompt | 32,000 characters |
| Welcome message | 2,000 characters |
| Hangup prompt | 4,000 characters |
A counter below each field shows how much you have used.
Welcome message
Section titled “Welcome message”The welcome message is the first thing the agent says when a call connects, or the first message it sends when a chat opens. Keep it short: greet, say who you are, offer help.
For voice agents you can also set:
- Ignore User Speech Before Welcome. Callers can’t interrupt until the welcome finishes.
- Welcome Message Delay. How long to wait after the call connects before speaking.
- Chat Welcome Message. An optional written welcome used instead of the spoken one when the same agent answers a chat.
Ending calls
Section titled “Ending calls”On calls, the agent decides when the conversation is over from what the caller means, not from fixed words. It ends the call when the caller’s needs are handled and they show they are done, for example by answering “Anything else?” with “No, that’s all, thanks”.
The agent keeps the call going when:
- the caller is still in the middle of a task, or their “no” answers a question about the task (declining a time slot is not a goodbye);
- the caller thanks the agent but then asks something else;
- the agent is not sure. It then asks whether there is anything else and waits.
A reply that asks the caller a question never ends the call, even if the agent tried to hang up. When the call does end, the agent says one short closing sentence first.
You can shape this with two fields in the Hangup card:
- Hangup Prompt. Your own rules for when to end the call and what to say before ending, for example “Summarise the next step in one sentence and thank them.”
- End-Call Keywords. Phrases such as “bye” or “wrong number”. These are hints to the agent, not triggers. If a caller says one but the agent’s reply asks a question, the call stays open.
Text agents don’t hang up, so the Hangup card is shown only for voice agents.
Prompt Assist
Section titled “Prompt Assist”Prompt Assist helps you write and check prompts. Select Assist beside a field to see its actions.
| Action | What it does |
|---|---|
| Adapt from another language | Writes this field from the same field in another of the agent’s languages. Choose Keep instructions in the source language (recommended: only what customers hear or read is translated) or Translate everything. |
| Edit with instructions | Changes the agent prompt from instructions you type (up to 4,000 characters). Add to the current prompt places your new instructions in the right section and keeps the rest. Write a new prompt rewrites the whole prompt, keeping its facts unless you say otherwise. |
| Generate from SOW document | Writes the agent prompt from a requirement document. Upload a DOCX, Markdown, PDF or TXT file of up to 10 MB, and optionally add directions such as “Cover only appointment booking”. |
| Review | Checks the language’s welcome, prompt, hang-up rules and keywords, and lists findings as Blocking, Warning or Info. |
What Assist does and doesn’t do:
- It keeps
{{variables}}and tool error codes such as[SLOT_TAKEN]exactly as written. - It uses only facts from your document, prompt or instructions. When the agent needs a fact that is missing, Assist writes
[TO FILL: …]so you can add it. - Text it writes is marked Needs native review. Read it, ideally with a native speaker of that language, then mark it reviewed. If you publish with marks still on, the console warns you but doesn’t block you.
- Text from documents is checked for secrets before Assist reads it. API keys, passwords, card numbers and similar values are replaced with
[REDACTED …]. - Results that tell the agent to reveal its instructions, ignore its rules or send customer data to an outside address are blocked.
Assist has a daily limit per organisation, and may not be included in every plan. The Assist menu shows when either applies.