Home · Blog · How to set up an AI consultant for a site in CHBT
How to set up an AI consultant for a site in CHBT
Chat on a website with an AI agent is a regular widget CHBT, in the script of which after the greeting there is a block “AI agent”, and after it - “Operator”. The neural network answers your knowledge base at night and on weekends; a person connects when the question goes beyond its limits. Let's analyze the assembly into blocks: the "Open widget" trigger, pre-chat form, three ways of transferring to the operator, working hours. Separately, how not to waste a month’s supply of credits on random visitors and what the AI consultant on the site cannot do: follow links and view sent files.
What is the AI consultant made of in the CHBT widget?
Chat capabilities and installation methods are collected on the page “Chat bot for the site”. Below is the setup of the AI consultant inside an already connected widget.
Technically, the AI consultant on the site in CHBT is one flow with the trigger “Opening a widget”: it starts when the visitor maximizes the chat window. There are five blocks inside - a greeting with buttons, “AI Agent”, “Operator”, “Data collection” for an lead and a second contact with a person - and there is only one paid block among them: each response from the “AI Agent” block writes off one AI credit (150 per month on Basic, 500 on Business). Buttons, ready-made messages and operator correspondence from “Conversations” do not spend credits.
Hence the order inside the flow: first, the buttons remove a standard one for free, then the neural network answers a free question based on your text knowledge base, then the person takes away what the agent did not answer. How the agent itself is structured - a role, a text knowledge base, memory for up to 10 messages, a model to choose from - GPT-5, Claude, Gemini, DeepSeek or Qwen - is discussed in , a general article about a chat bot with a neural network. Here - about assembly for the website.
You will need a “Basic” plan (650 ₽ per bot per month) or “Business”: on “Free” the widget works, but there is no “AI agent” block in it.
flow diagram: five blocks
Open Scripts, create a new one and select a trigger “Opening a widget” — the script starts when the visitor expands the chat window. Next is the chain:
- "Message" — a greeting with three buttons: “Ask a question”, “Leave a request”, “Call a person”. One or two sentences, without long text: no one reads it in the widget window.
- Click the “Ask a question” button - “AI agent”: Select the agent created in the “AI Agents” section, the “Stay in conversation with AI” mode and the “Separate port “not understood”” checkbox. The agent responds to everything that the visitor writes until he is not sure of the answer - then the script goes through the “do not understand” port.
- After "AI Agent" - “Operator”: here enter the port “not understood” and the exit in case of exhaustion of credits. The bot becomes silent, the conversation appears in “Conversations”.
- Click the “Leave a request” button - "Data collection": phone or e-mail with format checking, then “Action” → “Notify operator”, “Add tag”
leadand “Deal in CRM” - the card will appear on Kanban automatically. The second way to the same result without a script is the “Leave contacts” button in the widget window itself: it creates a contact, a deal in CRM and a letter to the owner. - Click the “Call a person” button - immediately “Operator”, bypassing the neural network.
Why do you need buttons in front of AI if the neural network already understands everything? Two reasons. Some visitors come with a specific purpose - an lead or a person - and they do not need a conversation with the model. And each agent’s response writes off a credit: a visitor who wrote “hello” and left is worth nothing on the button greeting, but on the AI agent - credits at the price of the model, on the default model - one.
It is more convenient to collect in the mode “Canvas”: branches from buttons are visible as connections between blocks. The “AI Agent” block has a way out in case the credits have run out - also lead it to “Operator” or to “Data Collection” so that the visitor is not left without a response.
Pre-chat form: contact to the first word
In the “Widget” , a pre-chat form is enabled: before starting the conversation, the visitor fills in the name, e-mail or phone number; Each field can be made required or optional. The completed data goes into the card in “Contacts”, and substitution works in the script messages {{name}}.
When the form helps, and when interferes:
- B2B, services with a long cycle - a mandatory e-mail is justified: the visitor is ready to leave it, and you will receive a contact even if the conversation ends at middle.
- Retail, quick questions “how much does it cost” - mandatory fields cut off some requests. Leave only the name, optional, and collect the contact later using the “Leave Contacts” button in the chat: it creates a contact, a deal in CRM and sends an email to the owner.
- Support for existing clients - e-mail is required: the operator needs to understand who is writing, and the agent will answer by name.
Legal detail: there is no checkbox for consent to data processing in the pre-chat form. Place the text of consent and a link to the policy in the welcome message of the script - the first message after opening the widget. Settings for appearance, position, avatar and embed code are described in the article about installing online chat on the site - we do not repeat them here.
Knowledge base for the site: what to put first
The site agent answers the same questions as the site pages, but the visitor asks them instead of searching. Therefore, the base is primarily the texts of the “Prices”, “Delivery and Payment”, “Returns”, “Contacts” pages and the FAQ section, rewritten into short statements. Detailed assembly order, structure and tests are in the article about the knowledge base for the AI agent; Below is just what is site specific.
- The agent does not see which page the visitor is on. Don't count on "you're currently looking at product X." If the question depends on a section of the site, ask it using the button in the welcome (“Question about delivery / product / payment”) and lead to different agents or branches.
- Links - in text. The agent does not navigate the site, but can name the page address if it is recorded in the database: “Catalog: site.ru/catalog.” Add 5-7 key page addresses to your database.
- Don't duplicate the entire directory. Categories, price ranges, the rule “for a specific position - operator”. The entire database leaves the model with each question, so keep it compact; you can add it as text, a page via a link, or a PDF, DOCX, TXT, MD, CSV file.
- Role for the site: “consultant on the website of company X, answer briefly, up to three sentences, at the end suggest the next step - leave a request or call an operator.”
Handover to operator: three ways and working hours
Conversation goes to a person in three ways, and all three are worth setting up. There are no transfer settings in the agent card - everything is done in the script.
- The port “did not understand” the “AI Agent” block. It triggers itself when the agent’s response sounds like a refusal or uncertainty: “I can’t”, “no information”, “check with...”, “unfortunately”. Set the port to “Operator”. To make the request “call a person” also become a transfer, add the line to the agent’s persona: “if they ask to call a person, do not answer the question, write: “Unfortunately, I can’t help myself - I’m passing it on to the operator”” - such a response takes the conversation to this port.
- A separate script for the words “operator”, “person”, “manager”, “complaint”. Trigger “Keyword” in the mode “contains” → “Message” “Transmitting” → “Operator”. He catches the request from the menu, in the middle of “Data Collection” and after a closed conversation. Inside a conversation with an agent in the “Stay in conversation with AI” mode, the text goes to the agent before the triggers are checked - the first way works there.
- "Call a person" button in greeting - a direct path without a neural network for those who immediately want a live interlocutor.
After transmission, the conversation appears in “Conversations” with the status “Operator” on the “Waiting for response” tab. To avoid missing it, turn on sound and browser notifications in the inbox (bell icon) and Web Push in “Account → Notifications” - push comes even when the account tab is closed.
Working hours. The “Widget” has a checkbox for working hours and an offline message. There is no hourly schedule: “offline” is when no operator keeps the office open. At night, the visitor will receive an offline text, but the conversation will still be saved. Write specifically in it: “Operators answer from 9:00 to 19:00 Moscow time. Leave your email and we’ll respond in the morning.” The AI agent itself also works at night—working hours apply only to humans.
One rule that saves nerves: after the “AI Agent” block there is always “Operator”. An agent who has no access to a person will walk in circles, and the visitor will be angry at the site. What to trust a neural network and what to immediately give to people is discussed in detail in the article about first line of support on the AI agent.
Loan consumption: where do they leak from and how to keep it
Tariffing is simple: the agent's response costs as many credits as the selected model costs — on the default model one credit, on powerful models it’s more expensive, regardless of the length of the question and answer. There is no need to count tokens; Below is the calculation for the model for one loan. On “Basic” - 150 credits per month, on “Business” - 500. You can estimate the consumption using the formula:
visitors per day × share of those who opened the chat × agent responses to conversation × 30
Three conditional examples - the share of those who opened the chat and the number of responses to the conversation are taken for clarity, substitute your own:
| Site | Visitors/day | Open a chat (for example) | AI responses to conversation | Credits/month | plan |
|---|---|---|---|---|---|
| Local services | 60 | 3% | 3 | ~160 | “Business” or narrow the AI area |
| Store | 300 | 2% | 4 | ~720 | “Business” is not enough |
| B2B services | 40 | 2% | 3 | ~72 | "Basic" plan |
How consumption leaks and what to do about it:
- Proactive triggers — message after 30 seconds on the page, by URL, or when leaving the site. They open the chat to random visitors, some of whom write something - and this is a credit. If you turn it on, set the trigger to the button greeting, and not directly to the agent, and limit the frequency of display.
- Greeting - with the “Message” block, not with an agent. The first message is free if it is a script, and paid if the visitor immediately went to the “AI Agent”.
- Allowed domains. In “Widget”, specify the domains where the widget has the right to work (
site.ru,*.site.ru). Empty list - the widget will work on any site where the code is copied, including test copies and other people's mirrors. - Buttons for top 5 questions with ready messages. Free and faster than any neural network.
- Thread in case of exhaustion. When the credits run out, the agent will respond with a neutral text and the script will go along the fallback branch - put “Operator” or “Data Collection” there with the text “leave a contact, we will respond personally.”
If the formula yields more than 500, this is not a reason to abandon AI, but a reason to narrow its zone: the agent is only behind the “Another question” button, and the standard one is behind the buttons. The composition of Plans and the number of credits are on the page Plans page.
What an AI consultant on a website can’t do
- Read scans and images. PDF and DOCX can be added to the knowledge base, but only their text is extracted: the agent will not read a scan without a text layer or images. There is no crawling of the entire site.
- View visitor files. You can send files in the widget - screenshots, contracts - but they will be seen by the operator in “Conversations”, not the agent. If a visitor sent a screenshot of an error, a person is needed.
- Walk around the site and look at the cart. The agent knows only what is in the database and in the latest (up to 10) messages conversation.
- Make appointments and accept payment. There is no calendar and slots in CHBT; a record is a text request that is confirmed by the administrator. There is no payment within the chat.
- Remember past visits. History is limited to the current one conversation.
- Remember long correspondence. Whatever model you choose in the agent card - GPT-5, Claude, Gemini, DeepSeek or Qwen - it only sees the knowledge base and the latest messages conversation.
Everything listed is not small print, but the boundaries on which the script depends: file → operator, record → “Data collection”, complex selection → person.
Check before posting
- Agent test chat in the “AI agents” section: 10 questions, including three outside the base and a word “operator”.
- “Check script” in the editor: go through all three buttons, make sure that “Call person” and transfer from agent lead to the same block “Operator”.
- Test page on your domain (domain in allowed): open the widget as a visitor, ask a question, ask for an operator, check that the conversation has appeared in “Dialogs” and received notification.
- Offline mode: close the account in all tabs, open the widget - it should appear offline text.
- Phone: widget on mobile screen, greeting length, readability buttons.
Five points are checked in one go and remove typical complaints of the first week - from “the bot is silent” (in fact, the credits have run out and there is no fallback thread) to “no one responded” (the operator did not see the notification).
In a week: what to watch in Analytics
On the “Review” tab in “Analytics” - incoming and responses from the bot and operator by day for 14 days (the agent’s responses are included in “Bot Replies”) and the “By Channels” block with conversations for 30 days; see the line “Widget on the site”. Three signs that make it clear what to edit:
- The operator spends more than half of the conversations with AI — the database does not answer what is asked. Open “Conversations” with a filter by the “Site” channel and the “Waiting for an answer” tab, write down questions, add to the database.
- Visitors correspond with the agent for a long time and leave without an lead — they communicate without a goal. Add a next step suggestion to the agent role and a “Submit Request” button in the welcome.
- There are a lot of conversations, but few contacts by phone or e-mail — contact is not going to happen. Include a name field in pre-chat or a “Leave Contacts” button.
There are no counters for individual script blocks in CHBT, so more details can only be obtained by reading the conversations. A widget with an AI agent is available on “Basic” - 650 RUB per bot per month; You can check the assembly for a trial day of “Business”, which is included in the “Payment” section. Create a bot and install a chat on the site →
Installing a chat widget on a websitePlans and AI loansKnowledge base for AI agentHow does a chatbot with a neural network work?