---
title: "Build a hybrid Flow + AI bot"
description: "Combine structured Flow Builder buttons and validation with an embedded AI Assistant block that hands back to your flow."
---

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

# Build a hybrid Flow + AI bot

A **hybrid bot** gives you the best of both worlds: scripted buttons and validated questions when you want guaranteed structure, plus an **AI Assistant** block when a visitor wants to ask open-ended questions.

## When to use a hybrid bot

- You want to qualify a visitor (service type, budget, or location) before letting AI answer questions.
- You want AI to answer up to 3–5 questions, then seamlessly hand back to a scripted email capture or booking redirect.
- You want one branch of your flow to answer FAQs via AI while another branch collects a quote request directly.

## Step-by-step setup

1. **Prepare your AI knowledge (optional but recommended)**

   Open **AI Knowledge Studio**:
   - Keep the bot in **Flow Builder** mode (**Standalone AI Chat** turned **off**).
   - Fill in **Business Name**, **Global Instructions**, and either your **Direct Prompt** or a synced **Knowledge Base**.
   - Save. Your Flow Builder AI block can now reuse these exact settings.
2. **Build the opening qualification in Flow Builder**

   Open **Flow Builder** and start with a short scripted opening:
1. **Message** block: `"Welcome! How can I help today?"`
2. **Multi Choice** block (`topic`, with **Use option blocks for branching** on).
   3. Connect two **Option** blocks:
   - `"Ask a question"` → leads into the **AI Assistant** block.
   - `"Get a quote"` → leads straight to your Name + Email + Save Data blocks.
3. **Add and configure the AI Assistant block**

   Under the `"Ask a question"` option, drag an **AI Assistant** block onto the canvas and configure it in the right panel:
- **Block Name**: e.g. `ai_chat` (the conversation transcript is saved under this field in **Responses**).
- **AI Knowledge Studio**: choose **Use Global AI Knowledge Studio Settings** to use your Knowledge Base / Direct Prompt, or **Custom Prompt** to write a prompt specific to this branch (up to 250,000 characters).
- **Max AI replies before continuing flow**: set a cap such as `4` if you want the bot to automatically move on to the next block after 4 AI answers.
- **Exit keywords/phrases**: enter one phrase per line (for example `book a call`, `talk to a human`, `get a quote`). If a visitor types any of these (case-insensitive), the AI block ends and the flow moves immediately to the child block.
- **AI Actions**: choose **All actions**, **Only selected** (pick specific actions from the checklist), or **None**.
- **Send AI chatlog to enabled integrations after (minutes)**: default `10`. (Ignored if AI Lead Extraction is enabled.)
4. **Connect a follow-up block after the AI Assistant**

   Connect the output of the **AI Assistant** block to the next step you want once the visitor hits an exit keyword or the reply limit — for example:
   - An **Email** block (`"Want a specialist to follow up? Drop your email below:"`)
   - Followed by a **Save Data** block and a **Message** or **Redirect** block to your booking calendar.
5. **Save and test both paths**

   Click **Save** in **Flow Builder**, open **Widget Style**, and test:
   - Clicking `"Ask a question"`, asking two questions, then typing one of your exit keywords to confirm the flow advances to your follow-up block.
   - Resetting the chat and testing the direct `"Get a quote"` branch.

:::note
You can also enable **Allow typing when choice options are shown** → **Send to AI to answer, then re-show options** under **Settings → General**. That lets visitors type a side question at *any* Multi Choice step, get an AI answer, and immediately see the buttons again without leaving the flow.
:::

Source: https://docs.aminos.ai/guides/hybrid-flow-ai-bot/index.mdx
