Create the agent
1
Start a new assistant
Go to Assistants and select Create agent. In Create Assistant, choose the WhatsApp tab.
2
Pick Single Prompt
Under Create from scratch, choose Single Prompt, described as “Create a WhatsApp assistant from scratch for simple workflows”. This template’s prompt already carries the WhatsApp formatting rules.
3
Fill in the basics
Enter the Agent Name and the Primary Language, with an optional Secondary Language. The form also asks you to pick a voice, since every assistant carries one. A WhatsApp agent never speaks, so any voice will do. Select Next.
4
Describe the business and the goal
Enter Company and Call Details: what the business is and what the agent should achieve in the chat. These are used to generate the first version of the prompt. Add any Custom variables and Knowledge Base the agent needs.
5
Select the WhatsApp number
Under Select WhatsApp Number, pick the registered number this assistant answers on. Only registered numbers that no other assistant uses are listed. You can also leave it empty and attach a number later.
6
Create
Select Create Assistant. The agent editor opens, with a WhatsApp badge next to the agent name.
Assistants → Create agent → WhatsApp → Single Prompt, through to selecting the WhatsApp number.
Attach a WhatsApp number
A WhatsApp agent answers on exactly one WhatsApp Business number, and each number serves one assistant at a time. Messages to a number with no assistant attached get no reply. A number is offered only when all of these are true:It belongs to the WhatsApp Business account connected to this workspace.
It is registered, meaning it shows Ready on the account’s Phone numbers tab. See Connect WhatsApp Business.
No other assistant uses it, or this assistant already does.
1
Open Attach Number
In the agent editor, select Attach Number in the left menu.
2
Choose the number
Open the WhatsApp Number field and choose a number. The current number is marked with a check. The field saves as soon as you choose.
3
Need another number?
The last option, + Connect WhatsApp Number, opens Numbers → WhatsApp, where you can add and register a new number.
Attach Number lists the WhatsApp numbers this agent can use. Test assistant then opens a chat with it.
What’s different in the editor
The editor is the same one used for voice assistants, with a few changes for chat:When a chat opens and closes
A WhatsApp conversation is one chat. The customer’s first message opens it, and it stays open while messages keep flowing. It closes when any of these happens:
A new chat starts without the previous chat’s messages, so choose timeouts that fit how long your customers take to reply. See Set the session timeouts.
Closing the chat is what runs post-call tools and analysis and fires the
chat_completed webhook. So if a customer simply stops replying, those results can arrive hours later.
The timeouts under Chat → Settings (maximum length and idle warning/end, in seconds) apply to text chat in the web widget. WhatsApp chats use the session timeouts below instead.
Set the session timeouts
Each WhatsApp agent sets its own idle timeout and maximum chat length:
The maximum length must be at least the idle timeout. Set both with Edit Assistant and
operation: "edit_chat_settings":
End the chat
WhatsApp agents have an End Chat tool, the chat counterpart of End Call. The assistant uses it to send a closing message and close the chat, which runs post-call tools and analysis straight away instead of waiting for the idle timeout. Mention it in your prompt as@||end_chat|| at the point where the conversation should end.
Write a prompt for WhatsApp
Keep replies short, one to three small paragraphs. WhatsApp hides long messages behind “Read more”.
Use WhatsApp formatting only:
*bold*, _italic_, ~strike~, and lines starting with - or 1. for lists.Never use Markdown headings, tables or
[label](url) links. Send the bare URL and WhatsApp turns it into a link.Don’t mention calls, audio, holding or keypad input. The customer is typing.
Mention every on-call tool with
@ at the point in the prompt where it should be used.Say when the conversation is over and mention
@||end_chat|| there.Send a template during a chat
A WhatsApp agent can send an approved message template in the middle of a chat, for example a brochure, a payment link or a quick-reply menu. Pick the templates the assistant may send, then tag them in the prompt.1
Select the templates
In the editor sidebar, open WhatsApp Templates and click Select Template. The list shows the approved templates for the attached number. Tick each one the assistant may send. To add or edit templates, use Manage templates, which opens Message templates.
2
Fill in the variables
If a template has variables or a media header, a setup dialog opens. For each variable, choose where its value comes from:
- Static: fixed text, sent as written.
- Variable: a custom variable such as
{{name}}, filled when the chat starts. - Dynamic: the assistant fills it from the conversation, for example the plan the customer chose.
https:// link to the file. Edit these later with the pencil next to the template.3
Tag the template in the prompt
Type
@ in the prompt and pick the template. Each one appears under its own tool name, send_ followed by the template name, for example @||send_renewal_reminder||. Mention it at the point where it should be sent.