⚡ Quick Answer
Create one agent per job. In this guide a mobile shop uses a customer support agent (answers product questions and suggests phones) and a billing agent (completes the purchase). 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 in BotSailor?
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 mobile shop, Bikroy Shop, as the working example. The same steps apply to any business; only the prompts and the knowledge source change.
📌 Important
Creating an agent does not make it available to customers. After the agents are created, you must turn on AI Agent in AI Configuration and select them under Active Agents (Part 6).
Prepare Labels and Custom Fields
Your system prompts will tell the agents to add labels and save customer information into custom fields. These resources must exist before you write the prompts. Otherwise saving data fails and the agent will not work as expected.
1 | Create a New LabelFollow the numbered markers in the screenshot:
Subscriber Manager > Manage > Labels > Create New Label (markers 1 to 5). Create the labels your agents will apply. In this example, one label marks customers who start a relevant product conversation, and one marks customers who complete a purchase. |
2 | Create Custom FieldsOpen Subscriber Manager, click Manage, and choose Custom Fields. Use the create option to add a field for each piece of information the agents will save. In this example, that means the customer's product query, payment method, name, delivery address, and email. 💡 Tip When you write a prompt, type |
Open the AI Agents Section
Follow the Numbered Path
Log in to BotSailor and click through the items in the order shown by the numbered markers in the screenshot below:
- Dashboard.
- Chatbot Manager.
- Bots/Accounts. Select the WhatsApp bot that will run the AI Agent (here, Bikroy Shop).
- The AI tab.
- Agents.
- Create Agent. This opens the form for a new AI Agent.
Dashboard > Chatbot Manager > Bots/Accounts > AI > Agents > Create Agent (markers 1 to 6).
Create the First Agent (Customer Support Agent)
1 | Fill In the Agent DetailsOn the Create Agent form, complete the fields as shown in the screenshot:
Agent form showing the name, slug, status, description, and system prompt for the customer support agent. |
2 | Write the System PromptIn System Prompt, tell the agent its role and how to work: what to answer, when to greet, what to check before replying, and which action to run in which situation. Before you write, click the i button beside System Prompt to see what each command does. Typing The prompt used for the customer support agent in this example: You are the customer support agent of a mobile shop. You have to provide information about smartphones what are asked by the customers. Also, suggest products to them based on their interests such as budget, specifications etc. Before answering, you must cross check your reply with your knowledgebase data. If there is no data, don't give them vague or guessed answers. And, before answering for the first time you should greet them 'hi or hello'. ##add_label##: 455729 when relevant question is asked and a relevant conversation begins. ##save_custom_field##: 76551 when user's query is totally irrelevant and when needed to pin-point his/her product query, ##ask_information## ##follow_up##: 76551 when product is not available, tell the customer that, we will notify you when the product is available and ##add_note##: Customer wants a callback — save an internal inbox note (not sent to the customer) ##add_label##: 455729 when a customer is ready to purchase and proceed to begin the buying process ##transfer_agent## The numbers after each action are the IDs of the label or custom field in this demo account. Yours will differ; select them from the ## pop-up. |
Add a Knowledge Source
The system prompt controls behavior. The knowledge source supplies the facts the agent answers from. Because this agent supports a mobile shop, it needs the shop's data: which smartphones are available, the price of each, and their specifications.
1 | Choose or Create a Knowledge SetScroll down to Knowledge Sources on the same form and follow the markers in the screenshot:
Knowledge Sources: create a new set, name it, and attach a Google Sheet (markers 1 to 3). |
2 | Prepare the Google SheetYour sheet is the agent's source of truth, so keep it clean: one product per row along with a header in the first row. This example sheet has 50 rows covering smartphones and accessories, with these columns: |
3 | Attach the Google SheetBotSailor offers several ways to add knowledge: Content, URL, File, Media, Google Sheet, and API. This guide uses a Google Sheet that was prepared in advance and integrated with BotSailor. Select the integrated sheet and the tab that holds your product data. It then appears under Attached Knowledge, as in the highlighted area of the screenshot. If your sheet is not integrated yet, follow How to Integrate Google Sheet with BotSailor for Data Fetch Campaign first. |
4 | Save the AgentClick Save Agent. Your first AI Agent is ready. |
Create the Second Agent (Billing Agent)
Go back to Agents and click Create Agent again. Create the second agent the same way, with its own name, description, and prompt.
1 | Fill In the Agent Details
Agent form for the billing agent with its description and system prompt. |
2 | Write the System PromptYou are the billing agent. You will help customers to complete the purchase including billing process. ##save_custom_field##: 76551 ##ask_information##: In which process they want to complete the purchase - COD or in cash, their name, delivery address and email ##add_label##: 455729 after completing the purchase process, thank them and give a summary like an invoice mentioning their name, purchased model, amount, delivery date (delivery date will be the day after tomorrow) and order no. ##assign_human_role##: 76551 if the customer wants to talk with a human agent before buying, you must handover the chat to human agent and notify the customer and then if the user wants to change his / her decision and want to choose another smartphone ##transfer_agent## to choose the desired product. Click Save Agent. Both agents are now created, but neither is live yet. |
Turn On AI and Select the Active Agents
1 | Open AI ConfigurationGo to Chatbot Manager > Bots/Accounts > select your bot > AI and open the AI Configuration tab (next to Agents). |
2 | Activate the Agents
AI Configuration with AI Agent switched on and both agents selected under Active Agents. The overview panel confirms 2 active agents. Only agents selected here can take part in routing and agent-to-agent transfers. |
Configure Agent Routing and Other AI Settings
1 | Add Agent Routing RulesAgent Routing decides which agent replies first, based on the customer's message. Click Add Rule, then fill in two fields:
Add as many keywords as you need for each rule. Use the trash icon to remove a rule. After the first reply, agents can still pass the chat to each other through Agent Routing rules, AI Response Mode, Context & Memory, Assignment, and Misc. Settings. |
2 | Choose the AI Response ModeKeep AI Agent for All Queries switched on so the AI responds to every incoming message. AI as a Fallback Only is switched off in this example. In that mode, bot flows and keywords run first and the AI answers only when nothing matches. |
3 | Set Context & MemoryTurn on Enable Contextual Memory so the agents remember earlier messages, and use the drop-down to choose the Memory Window. This example uses 20 conversations. A larger window results in higher AI token consumption, so raise or lower it as needed. |
4 | Configure AssignmentTurn on Assign to Team or Department, select a Team / Department (a required field), and write the Assignment Message the customer sees when a chat is handed to your team. Example: "Your conversation has been assigned to our team. We will get back to you shortly." |
5 | Review Misc. Settings and SaveUnder Misc. Settings, Do Not Assign Agent in Business Off Hour and Enable Typing Indicator are optional switches; both are off in this example. Scroll down and click Save Settings. The AI Assistant Overview panel on the right then summarizes your Response Mode, Contextual Memory, Restricted Topics, and AI Reasoning Level. |
Verification: Test the AI Agents on WhatsApp
Message the Bot From Another Number
From a different WhatsApp number, send a message to the WhatsApp number that has the AI Agent automation. Ask about a product, then say you want to buy it, and watch how each agent responds.
Review the Output
The conversation below shows the two agents working together.
The customer support agent answers the iPhone question from the Google Sheet. Once the customer wants to buy, the billing agent collects the payment method, address, name, and email, confirms the price and the details, and sends the order summary. The name, address, and email in this test are sample data.
To confirm it, you may open the shared inbox of BotSailor and check the chat history. You will find how the agents were switched.
You can also 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 customers actually type.
The agent gives no product information or wrong prices
Confirm the Google Sheet is attached under Knowledge Sources, that the correct tab is selected, and that 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 customer already gave
Turn on Enable Contextual Memory and increase the Memory Window. A larger window uses more AI tokens.
Next Steps: Add More Agents and Live Data
Once the two agents work, you can add more specialists (for example, a lead qualification or order agent), restrict topics the AI should not discuss, and set business hours for human handoff. To use live inventory and prices instead of a sheet, see How to Connect Shopify with BotSailor AI Agent Using HTTP API for Live Inventory & Pricing. For a fuller picture of multi-agent setups, read Part 01 and Part 02 of the Multi-Agent AI guide.


