⚡ Quick Answer
Create one agent per job. In this guide a dental clinic uses a dental support agent (answers about treatment, price, cost, doctor) and an appointment agent (answers about appointment or booking, schedule). Give each agent a name, a description, and a system prompt, and attach a knowledge source such as a Google Sheet with your product data.
Create the labels and custom fields the agents will use before you save them. Then open AI Configuration, turn on AI Agent, select both agents under Active Agents, add Agent Routing rules, click Save Settings, and test from a different WhatsApp number.
Before You Begin
What Is a Multi-Agent AI Setup for a Dental Clinic?
A BotSailor AI Agent is a specialized assistant. It follows a system prompt, uses the business knowledge you attach, and takes actions such as adding a label, saving a custom field, transferring the chat to another agent, or assigning it to a human team. Instead of one agent doing everything, you create separate agents for separate jobs and let BotSailor route each conversation to the right one.
This guide uses a demo-clinic WhatsApp as the working example. The same steps apply to any clinic; only the prompts and the knowledge source change.
📌 Important
Creating an agent does not make it available to patients. After the agents are created, you must turn on AI Agent in AI Configuration and select them under Active Agents (Part 5).
Prepare Labels and Custom Fields
Your system prompt acts as a guide to the agents. To write the system prompt properly, you must add labels and custom fields to save patient's information. So, create these first.
1 | Create LabelsDashboard→Subscriber Manager→Manage→Labels→Create New Label For this example, create two labels:
|
2 | Create Custom FieldsOpen Manage → Custom Fields and create a field for any or each piece of information the agents will save:
|
💡 Tip When you write a prompt, type |
Open the AI Agents Section
Go to Dashboard → Chatbot Manager → Bots/Accounts, select the WhatsApp bot that will run the AI Agents (here, SmileCare Dental Clinic), then open:
Create the First Agent (Dental Support Agent)
1 | Fill In the Agent Details and Write the System PromptOn the Create Agent form:
In System Prompt, tell the agent its role, what to answer, what to check before replying, and which action to run in which situation. Click the i button beside System Prompt to see what each command does. You are the front-desk support agent of SmileCare Dental Clinic. You have to answer patients' questions about dental treatments, prices, treatment duration, and clinic hours. Before answering, you must cross-check your reply with your knowledge base. If there is no data, do not give vague or guessed answers; tell the patient that our team will confirm. Before answering for the first time, greet them with 'hi or hello'. Never diagnose a condition, suggest medication, or give medical advice. ##add_label##: 460652 when a relevant question is asked and a relevant conversation begins. ##save_custom_field##: 77264 when the patient mentions the treatment or problem they need help with. ##follow_up##: when a requested treatment or price is not in the knowledge base and tells the patient that we will get back to them. ##assign_human_role##: if the patient reports severe pain, swelling, bleeding, or an injury; tell them to contact the clinic directly right away and hand over the chat to the human team. ##transfer_agent##: when the patient wants to book an appointment. The numbers after some actions are the IDs of the label or custom field in this demo account. Yours will differ; select them from the ## pop-up. Create Agent form for the dental support agent, with its name, slug, status, description, and full system prompt. |
2 | Add the Knowledge SourceThe system prompt controls behavior; the knowledge source supplies the facts. Scroll down to Knowledge Sources, open the Knowledge Set drop-down, choose Create New (or Select Existing to reuse a set), name it (here, dental_clinic_services), choose Google Sheet as the content type, then select the integrated sheet and the tab that holds your data. It then appears under Attached Knowledge. If your sheet is not integrated yet, follow How to Integrate Google Sheet with BotSailor for Data Fetch Campaign first. Keep the sheet clean: one treatment per row and a header in the first row. Example columns (sample data only; replace it with your clinic's real treatments and prices): Add rows for clinic hours, address, and the policies you want the agent to quote, so it never has to guess. Finally, click Save Agent. |
Create the Second Agent (Appointment Agent)
Go back to Agents and click Create Agent again.
1 | Fill In the Agent Details and Write the System Prompt
You are the appointment agent of SmileCare Dental Clinic. You help patients request a dental appointment. Ask one question at a time. ##ask_information##: the treatment they need, whether they are a new or returning patient, their preferred date and time, their full name, and their email. ##save_custom_field##: 77264 Patient Type, Preferred Date and Time, Patient Name, and Email as the patient answers. ##add_label##: 460653 after all details are collected. Then thank them and give a summary like a booking note mentioning their name, treatment, patient type, and preferred date and time, and tell them our team will confirm the final slot shortly. Never confirm a slot yourself. ##assign_human_role##: after sending the summary so the team can confirm, and also if the patient wants to talk to a person before booking. ##transfer_agent##: if the patient wants to ask about treatments or prices again. Create Agent form for the appointment agent, with its description and full system prompt. |
2 | Save the AgentClick Save Agent. Both agents are now created, but neither is live yet. Note In this setup the agent collects the appointment request; it does not read a live calendar. Your team confirms the final slot. |
Activate AI Agents & Configure Agent Routing
1 | Turn On AI and Select the Active AgentsGo to Chatbot Manager → Bots/Accounts → select your bot → AI and open the AI Configuration tab.
|
2 | Add Agent Routing RulesClick Add Rule and fill in Message type / when to use this agent (the keywords) and Assign agent. Add as many keywords as you need and keep them distinct for each agent. AI Configuration: AI Agent switched on, both agents under Active Agents, and the two Agent Routing rules. |
3 | Choose the AI Response ModeKeep AI Agent for All Queries on so the AI responds to every incoming message. In AI as a Fallback Only mode, bot flows and keywords run first and the AI answers only when nothing matches. |
4 | Set Context & MemoryTurn on Enable Contextual Memory so the agents remember earlier messages, and choose a Memory Window. A larger window results in higher AI token consumption. |
5 | Configure AssignmentTurn on Assign to Team or Department, select a Team / Department (required), and write the Assignment Message the patient sees when a chat is handed to your team. Example: "Your conversation has been assigned to our front-desk team. We will get back to you shortly." |
6 | Review Misc. Settings and SaveDo Not Assign Agent in Business Off Hour and Enable Typing Indicator are optional. Scroll down and click Save Settings. |
Verification: Test the AI Agents on WhatsApp
From a different WhatsApp number, message the bot's number. Ask about a treatment, then say you want to book, and watch how each agent responds.
The dental support agent answers the price question from the Google Sheet. Once the patient wants to book, the appointment agent collects the details, sends the summary, and hands the chat to your team. The name and email in this test are sample data.
Shared inbox: the dental support agent answers, then transfers to the appointment agent after a booking request.
Shared inbox, continued: the appointment agent collects the patient's details and sends the booking summary.
To confirm, open the Shared Inbox and check the chat history to see where the agents switched. Open Subscriber Manager to confirm that the expected labels and custom-field values were saved for the test subscriber.
Common Troubleshooting
The AI Agent does not reply at all
Creating an agent does not activate it. Open AI Configuration, make sure the AI Agent switch is on, and confirm both agents appear under Active Agents. Click Save Settings afterward.
The wrong agent answers, or routing does not match
Review Agent Routing. Keep each rule's keywords distinct so two agents do not compete for the same message, and use the words your patients actually type.
The agent gives no treatment information or wrong prices
Confirm the Google Sheet is attached under Knowledge Sources, the correct tab is selected, and the sheet has column headers and current data. If the knowledge source and the system prompt disagree, the system prompt takes priority.
The agent forgets details the patient already gave
Turn on Enable Contextual Memory and increase the Memory Window. A larger window uses more AI tokens.
Next Steps
Once the two agents work, you can add more specialists (for example, a lead qualification agent for new patient inquiries), restrict topics the AI should not discuss, and set business hours for human handoff.


