How to create two or more AI assistants in one chat
To enable combined assistant operation, we will need a funnel builder and three AI assistants. The blocks in the builder will be used to set variables, which will then be referenced in the assistants' conditions, while the assistants themselves will act as client consultants.
We will create three assistants with the following roles:
Distributor Assistant
Sales Manager Assistant
Accountant Assistant
Working in the builder
We will need three blocks in the chatbot builder — all blocks must be set as "Fallback."
The role of the Fallback blocks is as follows:
They contain variables that will be assigned to the client with a value of 1 or 0;
One of the blocks will trigger the distributor assistant;
They reset variables for further switching from one assistant to another.
In the first block, we assign variables in the calculator with a value of 0:

Also, specify the required message in the block.
In the second block, which will be triggered by the assistant on command, set the variable values: bookkeeper = 0, sales_assistant = 1.

In the third block, set the variable values: bookkeper = 1, sales_assistant = 0.

The block setup is complete.
Configuring three AI assistants
Let's create the first assistant, which will act as the distributor to route clients to the appropriate specialized AI bots.

You are a distribution assistant. You have two colleagues: an bookkeeper/accountant and a sales manager. When a client writes to you, ask them how you can help and offer the assistance of the accountant and the sales manager. If the client needs the sales manager, execute the command "start_block_from_ai 11959" If the client needs the accountant/bookkeeper, execute the command "start_block_from_ai 11960".
This assistant is needed to switch the client to the sales manager or the accountant. Now, configure the commands:
1. Also, in the assistant’s settings, specify to the bot: “If the client needs a sales manager, send exactly ‘start_block_from_ai 12345’,” where “12345” is replaced with the block number containing the variables bookkeeper = 0 and sales_assistant = 1.

Next, specify the second command in the settings: "If the client needs an accountant, send exactly ‘start_block_from_ai 12345’," where "12345" is replaced with the block number containing the variables
bookkeeper = 1andsales_assistant = 0.

The distributor assistant’s settings are complete.
How to create a sales manager (role)
To do this, click the button to create the next assistant:

You can rename the assistant as you wish.
Set the role to "sales manager" and apply any predefined settings as needed:

In the trigger line, be sure to set the variable with the value:


What is this for?
When the client tells your distributor that they want to contact the sales manager, the chatbot will trigger the block containing the variable sales_assistant = 1, which allows switching the client to the sales manager bot.
The sales manager bot will only activate when its launch condition is met — specifically, only when the block with the variable sales_assistant set to 1 is triggered.
Now, go to the "Bot settings":

Important
It is essential to specify commands for switching to other assistants by triggering blocks from the builder!
Configure the commands for the sales manager assistant:
Specify in the settings: "If the client needs an accountant, send exactly 'start_block_from_ai 12345'," where “12345" is replaced with the block number containing the variables
booker = 1,sales_assistant = 0— this command is necessary to activate the accountant.Add a second command to switch to the distributor assistant: "If the client needs the distributor, send exactly ‘start_block_from_ai 12345'," where "12345" is replaced with the block number containing the variables
bookkeeper = 0,sales_assistant = 0.
This command is needed to reset the variables and return to the first assistant.

The sales manager setup is complete.
Let's move on to the last AI chatbot — the bookkeper.
Create the third assistant and assign its name:

Set the launch condition variable to bookkeeper == 1:

Once the trigger condition is met, proceed to configure the assistant's role, knowledge base, and response behavior.

Specify the commands as you've done before:
If the client needs a sales manager, execute the "start_block_from_ai 11959" command, where "11959" is replaced with the block number containing the variablesbookkeeper = 0,sales_assistant = 1.If the client needs to return to the distribution, execute the "start_block_from_ai 11958", where "11958" is replaced with the block number containing the variablesbookkeeper = 0,saleman = 0.
The assistants setup is complete.
Work testing
When the bot is launched, the distributor assistant is triggered:

Next, call the accountant manager has been activated:

Then, ask the sales manager to switch you to the sales manager:


Now you can return to the distributor assistant:

Thus, the bot has worked correctly.
Last updated