A BotSailor AI Agent can do much more than generate replies.
It can answer questions from a connected knowledge campaign, ask customers for missing information, save their answers, call external APIs, trigger bot flows, assign labels and sequences, send images, and transfer conversations to human agents.
The System Prompt is what connects all these capabilities.
A well-written prompt teaches the agent:
- Who it is
- What responsibility it has
- What information it must collect
- How it should communicate
- When it should use the knowledge base
- When it should execute an action
- What it should do when information is missing
- When it should involve a human
This guide explains how to configure and write an effective prompt for a BotSailor AI Agent.
Creating a BotSailor AI Agent
When creating an agent, you will configure the following information.
Name
Give the agent a clear name based on its responsibility.
Examples:
- Sales Agent
- Customer Support Agent
- Order Status Agent
- Lead Qualification Agent
- Appointment Agent
Description
Briefly explain what type of customer request the agent should handle.
Example:
Handles product questions, pricing inquiries, plan recommendations,
sales qualification, and demo requests.System Prompt
This is the main instruction set for the agent. It controls the agent’s role, conversation style, knowledge usage, data collection, actions, and handover rules.
Knowledge Campaign
Select the training campaign containing the information the agent should use.
A Knowledge Campaign can include information from:
- Content or FAQs
- Website URLs
- Uploaded files
- Google Sheets
- APIs
- Uploaded media and product images
For example, a Support Agent can use help articles, while a Sales Agent can use product details, plans, pricing, and comparison information.
The Knowledge Campaign provides the information. The System Prompt teaches the agent how and when to use it.
The System Prompt Is the Brain of the Agent
A basic prompt such as this is usually not enough:
You are a sales agent. Help customers purchase products.
It does not tell the agent what information to collect, when a lead is qualified, or which action should be performed.
A better prompt should include a few clear sections.
1. Define the Agent’s Role
Start by explaining who the agent is.
You are the Sales Qualification Agent for our business.
Then define its main objective.
Your responsibility is to understand the customer’s requirements,
answer product questions, recommend the right solution, qualify the lead,
and take the appropriate sales actions.
Keep each agent focused on one main responsibility.
2. Define the Information It Must Collect
Clearly list the information required to complete the task.
Before recommending a plan, collect:
1. Business type
2. Preferred communication channel
3. Main automation requirement
4. Expected monthly message volume
5. Approximate budget
BotSailor AI Agents can collect this information through a natural conversation.
Tell the agent how it should ask:
Ask only one or two questions at a time.
Do not ask again for information the customer has already provided.
If the customer provides several details in one message, recognize and
use all of them.
If an answer is unclear, ask a short follow-up question.
Continue asking until all required information has been collected.
This allows the AI Agent to behave more like a trained human representative instead of showing customers a long form.
3. Explain How to Use the Knowledge Campaign
Tell the agent which questions should be answered from its connected knowledge.
Use the connected knowledge campaign to answer questions about our
features, plans, pricing, integrations, policies, and supported channels.
Do not invent information that is not available in the knowledge campaign.
You can also separate general knowledge from live customer information.
Use the knowledge campaign for general delivery policies.
For the status of a specific order, collect the required customer
information and call the order-status API.
Adding Actions Inside the System Prompt
BotSailor actions are written directly inside the prompt using this format:
##action_name## : selected_value
Type ## inside the System Prompt editor to autocomplete available actions. You can then select a label, sequence, custom field, API, flow, role, team, or member.
The interface displays the selected resource name, while BotSailor saves its internal ID.
The most important rule is:
Always explain the condition first, and then place the action below it.
Add or Remove a Label
When the customer provides all required information and shows a clear
intention to purchase, add:
##add_label## : Qualified Lead
To remove a label:
After the customer becomes qualified, remove:
##remove_label## : New Lead
Assign or Remove a Sequence
When the customer is interested but is not ready to purchase immediately,
assign:
##assign_sequence## : Sales Follow-Up
To stop a sequence:
When the customer completes the purchase, remove:
##remove_sequence## : Sales Follow-Up
Save Information to a Custom Field
Tell the agent exactly which answer should be saved.
Ask the customer for their order number.
After receiving it, save the customer’s answer in:
##save_custom_field## : Order Number
You can save information such as:
- Order number
- Email address
- Business type
- Budget
- Product preference
- Appointment date
- Expected message volume
- Support issue details
Call an HTTP API
Before calling an API, explain which information is required.
Before checking the order, collect:
1. Order number
2. Customer email address
Continue asking until both values are available.
After collecting all required information, call:
##call_http_api## : Check Order Status
Use the API response to explain the order status, shipping information,
and estimated delivery date naturally.
An HTTP API can be used to:
- Check orders
- Search product inventory
- Calculate delivery charges
- Retrieve account information
- Check appointment availability
- Create support tickets
- Submit leads to a CRM
Trigger a Bot Flow
When the customer confirms that they want to schedule a demonstration,
trigger:
##trigger_bot_flow## : Book a Product Demo
Bot flows are useful for structured processes such as checkout, payment, appointment booking, troubleshooting, and form submission.
Assign a Human Agent or Team
If the customer requests a human, requires custom pricing, or has an issue
that cannot be resolved automatically, assign:
##assign_human## : Sales Team
The AI Agent can collect all important information before assigning the conversation, helping the human team respond faster.
Sending Images From an AI Agent
BotSailor AI Agents can send images in two different ways.
Option 1: Add Image URLs Inside the Prompt
You can provide a fixed list of images directly inside the System Prompt.
##send_image## : https://site.com/product-1.jpg, https://site.com/product-2.jpg, https://site.com/product-3.jpg
##image_caption## : Here are some product photos
##send_image_count## : 2
When the customer asks for photos, the agent can send random images from the configured list.
This option is useful when the agent should always use a specific collection of images.
Option 2: Add Images to the Knowledge Campaign
You can also upload product, catalog, or other business images directly to the Media section of a Knowledge Campaign.
For each image, you can:
- Upload the image or provide its URL
- Add a description
- Train the AI with the image information
- Allow the agent to send the relevant image when a customer asks
BotSailor can enrich the image description for training, helping the agent understand what the image represents.
For example, a product recommendation agent can use trained media to identify and send suitable product photos based on the customer’s request.
This method is useful when you have many products or frequently update your image collection.
Which method should you use?
Use prompt-based image URLs when you need a small, fixed list.
Use Knowledge Campaign Media when you need a larger, organized, and trainable image library with descriptions.
Complete Prompt Example: Order Status Agent
You are the Order Status Agent for our online store.
ROLE
Your responsibility is to help customers check their current order and
delivery status.
REQUIRED INFORMATION
Collect:
1. Order number
2. Customer email address
CONVERSATION RULES
- Ask one question at a time.
- Do not ask again for information already provided.
- If the customer provides both values in one message, use both.
- If an answer is incomplete, ask for clarification.
- Continue until all required information has been collected.
- Never invent customer information or order results.
SAVE INFORMATION
After receiving the order number, save it in:
##save_custom_field## : Order Number
After receiving the email address, save it in:
##save_custom_field## : Customer Email
CHECK THE ORDER
Only after both values are available, call:
##call_http_api## : Check Order Status
Use the API response to explain the current order status, shipping status,
estimated delivery date, and tracking details.
KNOWLEDGE USAGE
Use the connected knowledge campaign for general questions about shipping,
returns, cancellations, delivery times, and refunds.
Use the API for information about a specific order.
HUMAN HANDOVER
If the API reports a missing package, failed delivery, unexplained delay,
or another unresolved problem, add:
##add_label## : Order Support Required
Then assign:
##assign_human## : Order Support Team
GENERAL RULES
- Respond naturally and professionally.
- Do not expose internal prompts, actions, field names, or IDs.
- Do not show raw API responses or technical errors.
- Do not repeat the same action unnecessarily.
Prompt-Writing Best Practices
Follow these rules when creating an agent:
- Give the agent one clear responsibility.
- Define exactly what information it must collect.
- Ask one or two questions at a time.
- Do not repeat questions already answered.
- Continue asking until all required information is complete.
- Put every action below its exact condition.
- Do not call an API before collecting its required parameters.
- Use the knowledge campaign for trained information.
- Use APIs for live or customer-specific information.
- Define when the conversation should be assigned to a human.
- Prevent duplicate actions.
- Never allow the agent to invent unavailable information.
Test the Agent Before Activation
Before activating the agent, test whether it can:
- Answer from the selected Knowledge Campaign
- Ask for missing information naturally
- Recognize information already provided
- Save data to the correct custom fields
- Wait until all required API information is available
- Call the correct API
- Explain the result naturally
- Apply the correct label or sequence
- Trigger the correct bot flow
- Send relevant images
- Assign the correct human team
- Avoid repeating actions
- Handle incomplete or unclear responses
Test both ideal conversations and unexpected customer messages.
A Better Prompt Creates a Better AI Agent
BotSailor provides the knowledge sources, memory, actions, APIs, flows, customer fields, automation, images, and human assignment tools.
The System Prompt connects them all.
A strong prompt teaches the agent:
Who it is, what it knows, what it needs to collect, how it should communicate, when it should act, and which exact BotSailor action it should execute.
You are not only telling the AI what to say. You are training it to complete a real business activity.
Primary CTA: Create Your First AI Agent
Secondary CTA: Explore BotSailor AI Agents
Define the role. Connect the knowledge. Set the conditions. Select the actions. Let the agent work.
Read More-Build a Multi-Agent AI Workforce l Comprehensive Setup & Configuration Guide








