Skip to main content
AI Agent lets your business use AI to respond instantly based on your own business data and knowledge.

How to create a new AI Agent

To create a new AI Agent:
  1. Go to AI Hub from the navigation menu.
  2. Click + Create AI Agent.
Create AI Agent Button
  1. Fill in the required information and configure your Agent in the modal:
Ai Agent Configuration Modal
The AI Agent configuration interface includes the following core fields:
  • Name: Enter a descriptive identifier for the Agent to easily manage and distinguish multiple agents within your workspace.
  • System Message (Prompt): The core instruction defining the Agent’s persona, role, scope, and communication guidelines. Click the settings slider icon in the top right to choose the underlying AI model (LLM) and adjust runtime parameters.
  • Messages: Add sample conversation turns between users and the assistant to guide response style and practical tone (Few-shot learning).
  • Tools (optional): Attach business documents (Knowledge), API endpoints (AI Functions), MCP Servers, or built-in system tools (System Functions) to expand the Agent’s operational capabilities.
  • AI Actions: Establish autonomous rules allowing the AI to execute system operations (tagging contacts, launching flows, transferring conversations to agents…) when specific conversational criteria are met.
  • Rich Response: Enable structured JSON responses to deliver interactive visual components like product cards, horizontal carousels, and quick reply buttons.
After the Agent is created successfully, it will appear in the list. You can manage, edit, or delete existing Agents there at any time.

Set a reply delay

You can set how long the AI Agent waits before sending a reply with Bot reply delay. This is useful when customers often send several messages in a row. The Agent waits until the customer finishes sending messages, then replies once instead of responding to each message separately. To set the reply delay:
  1. Find the Agent you want to configure in the Agent list.
  2. Open the Actions menu at the end of the Agent row.
  3. Select Bot reply delay.
  4. Choose the waiting time and click Confirm.
In the Actions menu, select Bot reply delay to open the reply delay settings.
Bot Reply Delay Menu
In the Bot reply delay dialog, choose a waiting time and click Confirm to save the setting.
Bot Reply Delay Settings
The timer starts after the customer sends a message. If the customer sends another message during the waiting period, the timer resets and the messages are combined into one reply.

How the AI Agent sends messages

The AI Agent does not wait for the complete answer and send it as one unchanged message. It streams the model response as it is generated, then prepares the outgoing messages for the channel. When preparing the Agent’s outgoing reply, ChatbotX uses these rules:
  • When the response contains an empty line between two paragraphs, the Agent treats that space as a message boundary. The paragraph after it is sent as a new chat bubble.
  • A URL or image link is extracted from the text and sent as a separate message.
This behavior lets the Agent send follow-up thoughts as separate bubbles, similar to a human conversation. It also means one customer message can produce 1-4 outgoing messages when the answer contains several paragraphs or links. When a customer sends several messages in quick succession, each message may start a separate AI reply. As a result, the Agent can send more than five outgoing messages. Use Bot reply delay to group the customer’s messages before the Agent starts replying.

Limit the reply to two text chat bubbles

To keep the response in one long paragraph and limit it to no more than two text chat bubbles, add this instruction to the Agent’s System Message (Prompt):
This instruction limits the Agent to two chat bubbles containing text. URLs and image links are extracted and sent as separate messages, so they are not included in this limit.

Provide information to the AI Agent

To help your AI Agent answer customers as accurately as possible, you need to provide business information, context, and auxiliary tools:

Add information in the System Message (Prompt)

The System Message acts as the core guidance for the AI. In the Prompt field, you can provide your business introduction, response style, and any general rules you want the Agent to follow while talking to customers.
AI Agent System Prompt
Click the settings slider icon in the upper-right corner of the Prompt field to open the AI model configuration flyout:
Ai Agent Model Settings
The model configuration panel allows flexible control over model providers and generation parameters:
  • AI Model Selection: ChatbotX lets you switch between state-of-the-art AI models:
    • Gemini Model: Select Google Gemini versions (e.g., Gemini 3.5 Flash, Gemini Pro).
    • OpenAI Model: Select OpenAI GPT versions (e.g., GPT-5.4 Mini, GPT-4o).
    • Claude Model: Select Anthropic Claude versions (e.g., Claude Sonnet 4.6, Claude Haiku).
    • DeepSeek Model: Select native DeepSeek models (e.g., deepseek-v4-flash, DeepSeek V3).
    • OpenRouter Model: Access hundreds of open-source and commercial models through OpenRouter gateway.
  • Temperature (optional): Controls answer creativity from 0 to 1. Lower values (0.2 - 0.4) ensure concise, factual responses grounded in business data, while higher values allow more conversational variety.
  • Max Tokens (optional): Sets the maximum response token length generated per turn (defaults to 2048 tokens).

Add Sample Messages (Messages)

The Messages section lets you supply few-shot conversation examples between the user and assistant:
Ai Agent Sample Messages
  • Turn Structure: Each example pair contains a User prompt (typical question or inquiry) and an Assistant response (the exact tone, formatting, and standard answer your brand prefers).
  • Benefits: Few-shot examples guide the AI on tone of voice, greeting patterns, and domain-specific nuances without requiring lengthy explanations in the System Prompt.
  • Click + Add more to add new message turns, or click x on any card to delete it.

Add Tools

Tools help the AI Agent do more than just answer questions. Click the Tools selector to browse and attach multiple tools:
Ai Agent Select Tools Modal
Tools are categorized into four functional groups:
  • File (Knowledge): Allows the Agent to search and retrieve grounded answers from uploaded business documents. Supported formats include PDF, CSV, Excel (XLSX), DOCX, DOC, JSON, PPTX, and TXT. Upload files in the Knowledge module, then select them here.
  • Function (AI Functions): Allows the Agent to call custom API endpoints to query or update live business systems (e.g., order tracking, inventory lookup).
  • MCP Server: Connects the Agent to external Model Context Protocol (MCP) servers (such as Shopify, ERP, or CRM systems) for complex backend workflows.
  • System Function: Built-in ChatbotX utilities:
    • Connect user to Human: Automatically detects human handover intent and escalates the conversation to live support.
    • Document Reader: Parses and extracts data from document files attached directly by users in chat.
    • Image Reader: Reads and interprets customer-submitted images, receipts, or product photos.

Automated Actions (AI Actions)

AI Actions enable the AI Agent to autonomously trigger system operations during live customer conversations when predefined conditions are met:
Ai Agent Actions Configuration
Each AI Action rule consists of two components:
  • When: Describe the activation condition in natural language (e.g., when a user leaves their phone number and needs order confirmation, or expresses frustration). The LLM evaluates live dialogue context and triggers the rule once the condition is satisfied.
  • What should the AI do?: Define the sequence of system actions to execute. Click + Add action to chain multiple actions within a single trigger rule.
Supported system actions include:
  • Send Flow: Automatically launches a specific pre-built conversational Flow (e.g., lead capture form, booking flow).
  • Assign Conversation to an Admin: Assigns the conversation to a specific teammate or admin.
  • Remove Assignment: Unassigns current conversation ownership.
  • Transfer Conversation to Human: Pauses the bot and transfers the conversation to human agent queue.
  • Add Tag: Attaches a tag to the contact (e.g., hot-lead, vip).
  • Remove Tag: Removes an existing tag from the contact.
  • Set Custom Field: Updates a contact’s custom attribute value.
  • Clear Custom Field: Clears the stored value in a custom field.
  • Mark as Follow Up: Flags the conversation for follow-up review.
  • Remove from Follow Up: Unflags the conversation from follow-up.
  • Transfer Conversation to Bot: Returns conversation control back to automated bot handling.
  • Archive: Archives completed conversations.
  • Block Contact: Blocks contacts exhibiting abusive or spam behavior.
Click + Add rule to configure multiple automation rules for a single Agent.

Customizing the Action Prompt

In the top-right corner of the AI Actions header, click the settings slider icon to open the Action prompt configuration window:
Ai Agent Action Prompt Settings
The Action prompt defines the meta-instructions guiding how the AI reasons, evaluates context, and triggers automated action rules during customer interactions. The system applies these default operational standards:
  • Strict condition matching: Match a rule only when the conversational context clearly satisfies the description specified in the When field. Never trigger a rule based on assumptions.
  • Concurrent multi-rule execution: Multiple action rules can trigger simultaneously in a single response turn if all conditions are met.
  • Factual data population: When a rule requires conversation values, the AI populates them strictly using information explicitly provided by the user, never fabricating or hallucinating missing data.
  • Internal confidentiality: The AI never reveals rule IDs, rule matching mechanisms, structured outputs, or internal system configurations to the customer.
You can modify this prompt to enforce custom organizational policies, or click the Reset button in the upper-right corner to revert to default system instructions at any time.

Rich Responses

In addition to plain text answers, AI Agents on ChatbotX can automatically send visual interactive messages such as product cards (Card), horizontal carousels (Carousel), quick reply buttons (Quick Replies), and execute automated system actions. To use this feature, simply toggle on the Rich Response switch in the Agent configuration modal and paste the JSON response rules into the System Message (Prompt) field.
Enable Rich Response
For detailed setup instructions and to copy a production-ready Prompt template, please refer to the Rich Responses guide.