> ## Documentation Index
> Fetch the complete documentation index at: https://docs.botflow.cc/llms.txt
> Use this file to discover all available pages before exploring further.

# AI operator

> Persona, knowledge base, first message and AI reminders, model and budget of the virtual operator.

The AI operator runs a live conversation with a subscriber instead of a human. It is plugged in through the
"AI operator" block in the [flow builder](https://docs.botflow.cc/en/constructor.md) and talks exactly like an ordinary operator in a
conversation. The shared settings (persona, model, language, knowledge base, budget) live in the bot's
"AI Settings" section. The goal of each particular dialog is set right in the funnel's AI block.

## How to connect it

**1. Switch the AI operator on**

In the bot section open "AI Settings" and turn on the top toggle. While it is off, "AI operator" blocks in the flow builder do not answer.

**2. Describe the persona and pick a model**

In the "Persona" field set out who runs the conversation and how. Below, choose the language model that will generate the replies.

**3. Add an AI block in the flow builder**

On the [flow builder](https://docs.botflow.cc/en/constructor.md) canvas add an "AI operator" block (one of the block types). On the "Goal" tab describe what the AI leads the conversation towards in this block.

**4. Set up the transitions**

Draw arrows from the AI block to the next steps. The condition on each arrow is written in words, and the AI decides when it is met.

> [!NOTE]
>
> The AI settings are available to managers and company administrators. The "Operator" role does not see them.
> The daily budget, message translation and photo recognition are switched on by a company administrator only.

## Persona

The persona sets out who runs the conversation: name, role, manner of speech, background (where the operator
works, what they offer). It affects the tone and behaviour more than the choice of model does.

* Write positively, that is, what the operator should do rather than only what to avoid.
* Keep the description short and to the point: long paragraphs blur the operator's behaviour.
* Example: "A friendly service consultant. Helps people work things out, answers to the point, no officialese".

Hard bans (topics, promises, actions the operator never takes) go into the "Restrictions" field inside the
"Advanced settings". The writing manner (tone, phrase length, emotion) is configured there too, in
"Conversation style".

## Model

The model generates the replies. The list opens as a search by name: type part of the name and choose a model
from the catalogue.

* The choice of model affects the quality of the replies and how reliably arrow transitions, dialog memory and
  answer pauses hold.
* The model you pick powers everything the AI does in this bot, including message translation in
  the inbox. There is no separate setting for translation.
* For international funnels take a strong multilingual model.

## Language

The "Language" section defines what language the operator answers in. The way it is chosen is set by the "How to
choose the reply language" field, which defaults to detecting it from the message.

* **Detect from the message.** The AI answers in the language of the subscriber's last message. The default mode.
* **Always one language.** The AI always answers in the chosen language.
* **Mirror the dialog language.** The AI keeps the language the dialog started in.

The "Default language" is set separately: the language of the first message, while the subscriber has not
written anything yet (for example, when they enter the funnel by a command rather than by text). As soon as the
subscriber writes, the AI adapts to their language in the "detect" and "mirror" modes.

By default this field is set to auto, based on the subscriber. The language of the first message is then chosen
by priority: first the language set in the settings, then the subscriber's device language, then the general
fallback language.

> [!NOTE]
>
> To fix the language of the first message rigidly, choose a specific language in "Default language" instead of
> the automatic option.

In the "Always one language" mode a "Knows only this language" toggle appears. With it the operator does not
understand messages in other languages and reacts as a real person who does not know them would.

## Block goal and transitions

The persona, model and language are shared across the whole bot. Each AI block has its own goal, set in the flow
builder. The "AI operator" sits in the flow builder next to the other block types: "Start condition", "Dialog
state" and "Fallback".

* **Block goal.** On the "Goal" tab describe what the AI leads the conversation towards here. For example: bring
  them to a payment, answer questions about the plan, handle objections and lead to an application.
* **Transitions.** Arrows from the AI block define where to move next. On an arrow, in the field for a condition
  the AI decides on, you write the condition in words, for example "the client confirmed they are ready to make
  a deposit". The AI evaluates it from what the other side says. An empty condition works as a fallback
  transition.

## Messages the AI starts itself

The AI can write not only in reply but on its own. These are two different cases, both configured in the AI
block: the first message on entering the block, and AI reminders to a subscriber who went quiet.

### The first message on entry

The "Goal" tab has a "Message first on entry" toggle.

* **On.** The AI opens the dialog itself when a subscriber enters the block.
* **Off.** The AI waits for a message from the subscriber and only then answers. If the subscriber entered the
  block with a message of their own, for example through the "Wait for any subscriber reply" arrow, the
  AI answers it right away. If the scenario wrote to them again after their message, the AI waits for the next one.
  A button press is not a message: after a press the AI also waits until the subscriber writes.

The language of that first message comes from the "Default language" (see the section above).

### AI reminders

If a subscriber goes quiet, the AI can bring them back into the dialog. On the "Follow-ups" tab of the AI block,
switch on "Reminders on": in an AI block the AI always picks the moment and the wording itself. The text does not come from templates: the AI composes it from the conversation
context and what it already knows about the subscriber. Three fields set the frequency:

* **Maximum reminders.** How many times the AI will remind them (from 1 to 10).
* **No more than once every (min).** No more than one reminder per that many minutes.
* **No less than once every (min).** At least one reminder per that many minutes.

When the AI answers the subscriber, the pause starts over. Reminders stop when the subscriber moves further along
the funnel or the limit runs out. The AI does not write to people who blocked the bot at all: no replies, no first
message on entry, no reminders.

> [!NOTE]
>
> Ordinary (non-AI) blocks have reminders too, but there they are timer-based prepared messages: a ready chain of
> messages with delays from the moment of entering the block. More in [Flow builder](https://docs.botflow.cc/en/constructor.md).

## Knowledge base

The knowledge base is what makes the AI answer from your materials rather than invent things. Add your terms,
answers to frequent questions, withdrawal rules, a description of bonuses.

**1. Add a material**

Press "Add", give it a name (optional) and paste the material's text. Any language is supported.

**2. Wait for indexing**

The material gets the "Indexing" status, then "Ready". The AI starts answering from it once it is "Ready".

**3. The AI answers from your materials**

Materials become a search by meaning. For a subscriber's question the AI finds the matching passage and answers from it rather than from general knowledge.

Up to 200 materials can be added per bot. A material can be edited or deleted at any time, and after an edit it
is re-indexed.

> [!TIP]
>
> The knowledge base works while the AI operator is switched on.

## The AI stays human

The operator behaves like a real employee and never hints that it is an AI.

* The subscriber sees no signs of automation: no "I'm a bot", no "I'm an AI", no service phrases. The operator
  always answers that they are a real person.
* When a real human is needed (a complicated case, or the subscriber makes no progress towards the goal for a
  long time), the dialog is quietly switched to manual and lands with an operator in the
  [Messenger](https://docs.botflow.cc/en/messenger.md) (called "Messages" in the bot menu). The subscriber notices nothing, and no handover
  is announced.
* The "Switch to manual after N replies in the block" setting (in "Advanced settings", the "Generation" section)
  limits how many rounds the AI runs on its own before handing over to an operator. A value of 0 removes the
  limit.

## Budget

Spending on AI is limited by daily budgets and by the company balance. It covers replies, photo recognition and
message translation.

* **Daily AI budget (this bot).** The maximum AI charges for this bot per day. On reaching the limit
  the AI stays silent until midnight (UTC) and continues the next day. An empty field means no limit. The card
  shows how much of the limit has been spent today.
* **Daily AI budget (whole company).** A shared limit for every bot of the company, set in the
  [company settings](https://docs.botflow.cc/en/settings.md). The bot limit and the company limit apply at the same time: whichever is
  reached first takes effect.
* **Balance.** Overall spending is also limited by the company balance, details in [Billing](https://docs.botflow.cc/en/billing.md).

> [!WARNING]
>
> Only a company administrator changes the daily budget, message translation and photo recognition. A manager sees the other AI
> settings but not the budget.

## Extras

The cards below and the "Advanced settings" hold the finer parameters.

> [card] Memory about the person
>
> The AI remembers stable facts about the person (what they want, what worries them, their constraints) and takes them into account in later conversations. Off by default; switching it on increases token spending.

> [card] Media recognition
>
> A photo is treated as an attachment: the AI describes the picture and the text on it. A company admin
> turns it on, because photos are sent to the AI provider. Photo recognition is charged to the balance like an
> AI reply and counts toward the daily budget. Voice, audio, video and video messages are not recognised yet, and are marked as coming soon.

> [card] Message translation
>
> The operator translates the dialog's messages into the operator's language and shows a preview of the outgoing message in the subscriber's language. Switched on by a company administrator; the AI operator must be enabled.

> [card] Generation
>
> Fine-tuning of the reply: reply style ("Default", "Livelier", "Stricter" or a custom one for manual tuning), emoji and length. Choosing a style is usually enough.

> [card] Typing realism
>
> Delays and splitting a reply into several messages so the conversation looks human: a pause before answering, pauses between messages and the number of messages in one reply.

## Related sections

> [card] [Flow builder](https://docs.botflow.cc/en/constructor.md)
>
> Where the AI block lives: its goal, transition arrows, reminders.

> [card] [Messenger](https://docs.botflow.cc/en/messenger.md)
>
> Where a dialog handed to a live operator ends up.

> [card] [Billing](https://docs.botflow.cc/en/billing.md)
>
> Balance and charges for AI replies.

> [card] [Settings](https://docs.botflow.cc/en/settings.md)
>
> The daily AI budget for the whole company.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.