ruLog in to Senler

AI condition step

The AI condition step selects one output based on the meaning of text and selected images. For example, it can route a pricing question to Sales and a report of a fault to Support. The step is available in both For dialogs and Background automations.

It does not reply to the client or run your agent. Use Run agent for replies or tool calls, and variable conditions to compare exact values without AI.

Choose a model and images

Use the Model field to choose the model for this step. Jev 1.13 analyzes text; GPT-6 Luna Decisions analyzes text and images. Jev 1.13 is the default.

AI condition model. 1. Model field
1. Model field

The list includes search. Click a model to select it. The selection is saved with the step settings and included in the published version.

AI condition model. Highlighted elements: 2. search; 3. model
2. search · 3. model

Hover over a model to open its card with prices in credits.

AI condition model. 4. card with prices in credits
4. card with prices in credits

The selected model shows the Images field. Upload PNG, JPEG, WebP or GIF files, or choose an attachments variable. You can combine both sources, with up to 10 images in total. For GIF files, only the first frame is analyzed. Conversation images are not included automatically: save the required attachments to a variable and select it here.

AI condition images. Highlighted elements: 1. Images field; 2. attachments variable
1. Images field · 2. attachments variable

An image-capable model receives ordinary images directly. For a text model, a separate model automatically describes them, reusing the description within the project. Attachment settings are preserved when switching models.

Write the instruction

Add AI condition from the step catalog and open its settings.

  1. In the instruction, describe what to determine. For example: "Identify the topic of the request. Questions about prices and purchases belong to Sales; problems with an already purchased product belong to Support." The maximum length is 2000 characters.
  2. Use Insert variable to add text or other data to evaluate. You can use project, lead, dialog, current run and trigger variables. The AI editing button helps phrase the instruction.
  3. Enable Include dialog history if the conversation is needed to determine the meaning. This includes the text of up to 50 recent messages; images, audio and files from history are not included. Images are configured separately in the step settings. If the run has no dialog, only the instruction with substituted values is used.
AI condition step. Highlighted elements: 4. Include dialog history; 5. outputs section; 6. confidence threshold
2 / 2
4. Include dialog history · 5. outputs section · 6. confidence threshold

Reactions and stickers

In the Message step, enable Wait for a reaction. Choose a run variable, such as feedback, and connect the Reaction output to the AI condition.

Insert the whole variable {{run.feedback}} so the AI can interpret the reaction in the context of the message it was added to.

Use the reaction {{run.feedback}} to decide whether the instructions helped the customer. If the meaning is unclear, choose Otherwise.

Standard reaction. If the customer reacts with 👍, the following text replaces {{run.feedback}}.

Реакция: 👍
Исходное сообщение: Did the instructions help resolve your issue?

Custom reaction. For an image of a cat, the resulting text might look like this. The last line appears only if the channel provides a matching emoji.

A cat holds a sign that reads “Thank you!”
Исходное сообщение: Did the instructions help resolve your issue?
Подсказка платформы: ❤️. Она не заменяет описание изображения.

If you only need the symbol, such as 👍, use {{run.feedback.emoji}}. For a custom reaction, this field can be empty or contain a similar standard emoji.

For a sticker sent as a separate message, select its Attachments variable in the Images field or insert it into the instruction. The AI condition prepares a text description automatically. For an animation, it analyzes a still preview. If no suitable image is available, the condition receives a message that the content is unknown. For an agent, new recognition depends on its image recognition setting.

Configure outputs

In the outputs section, define between 2 and 10 options. Click Add or edit an existing output.

In the output dialog, enter a name of up to 80 characters and a selection condition of up to 2000 characters. For Sales, this could be "The user wants to check a price, choose a product or make a purchase." Make the conditions clearly distinguish the options.

Click Save or Cancel to close without changes. You can remove an unwanted output as long as at least two remain.

AI condition step. Highlighted elements: 2. name; 3. selection condition; 4. Save
2 / 2
2. name · 3. selection condition · 4. Save

Confidence and the Otherwise output

The confidence threshold sets how confident the AI choice must be: from 0 to 100%, with 50% as the default. If confidence is below the threshold, information is insufficient or no option fits, the run follows the additional Otherwise output. For example, connect it to a message asking the client to clarify their question.

Connect both the named outputs and Otherwise to subsequent steps. If image preparation or the AI call fails, the step ends with an error. The run history shows the cause.

Testing and credit usage

Try several clear and ambiguous examples using automation testing. Then save and publish the workflow.

AI processing is included in project expenses at the selected model’s price. Longer instructions, history and images increase the input size. After switching models, test your examples and confidence threshold again: the same threshold can produce different results with different models.

The condition result log shows the selected branch and its confidence score. It also shows which model described the image, what recognition cost and whether a description was reused. If the content is unknown, the log gives the reason.

Only the description of visible details and text is reused. The AI considers the conversation and instruction separately when choosing a branch. Projects can share a description when the image identifier or content hash, language and recognition profile match. Without a reliable match, the description stays within the project. Concurrent requests share one recognition operation. The project that starts it pays once, and reusing the description incurs no additional recognition charge. The recognition profile is independent of the agent or AI condition model.