AI Chatbots
Kaanha AI includes a powerful chatbot system with two types: AI Agents (LLM-powered) and Flow Bots (visual decision trees). Both can run simultaneously and hand off to human agents.AI Agents
AI Agents use large language models to have natural conversations with your customers. They are configured with a business task so they stay focused on your use case.Supported Agent Types
| Type | Description | Best For |
|---|---|---|
| Built-in LLM | OpenAI GPT-4o, Anthropic Claude, or any OpenAI-compatible endpoint | General FAQ, support, lead qualification |
| Python Bot Webhook | Your own chatbot endpoint (HMAC-signed POST) | Custom logic, existing bots |
| Notion Knowledge Base | RAG over your Notion pages | FAQ from docs, product catalogs |
Creating an AI Agent
- Go to Chatbot → AI Agents → Create Agent
- Fill in the required fields:
| Field | Description |
|---|---|
| Name | Internal name for the agent |
| Business Task | Required — what this agent does (FAQ, Order Tracking, Support, Booking, Lead Qualification, Feedback) |
| Trigger Keywords | Comma-separated words that activate this agent (e.g., help, support, hi) |
| System Prompt | Instructions for the AI about your business, tone, and what to answer |
| Provider | OpenAI / Anthropic / Custom LLM |
| Model | e.g., gpt-4o, gpt-4o-mini, claude-3-5-sonnet-20241022 |
- (Optional) Configure advanced settings:
- Max Turns: Auto-handoff to human after N messages (default: 10)
- Business Hours Only: Agent only responds during your configured business hours
- Temperature: Response creativity (0.0–1.0)
Business Task Requirement
Every AI Agent must have abusinessTask field. This is required by Meta’s January 2026 AI Policy. The platform appends a safety prompt enforcing task boundaries to every agent’s system prompt.
Available tasks: faq, order_tracking, customer_support, booking, lead_qualification, feedback, other
Testing an AI Agent
Use the Test button on the agent card to simulate a conversation. Test history is preserved in the session so you can iterate on the system prompt.Notion Knowledge Base (RAG)
The Notion RAG agent syncs your Notion pages, chunks the content, generates embeddings, and retrieves the most relevant chunks when answering questions.- Select Type: Notion Knowledge Base
- Enter your Notion API Key and Database/Page ID
- Click Sync Knowledge Base
- The agent will now answer questions grounded in your Notion content
Flow Bots
Flow Bots are visual, rule-based conversation trees. They’re deterministic — the same input always produces the same output.Creating a Flow Bot
- Go to Chatbot → Flow Bots → Create Flow
- Enter a name and trigger keywords
- Click Visual Editor → to open the drag-and-drop canvas
Node Types
| Node | Description |
|---|---|
| Message | Send a text/media message to the contact |
| Condition | Branch based on contact data, tags, or message content |
| Delay | Wait N minutes/hours before continuing |
| Webhook | Call an external URL and branch on response |
Flow Editor
The visual editor uses a canvas with nodes and connections:- Drag nodes to reposition them
- Click a node to edit its content
- Connect nodes by dragging from the output handle
- Use the Save button to persist changes
Priority Chain
When an incoming message arrives, Kaanha AI checks in this order:Human Handoff
AI Agents automatically hand off to humans when:- The contact types
HUMAN,AGENT,HELP, or any of 12 handoff keywords - The agent includes
[HANDOFF]in its response - Max turns are reached
- An error occurs
OPEN and appears in the agent queue.
Content Safety
All AI responses pass through a content safety filter (22 patterns, 7 categories) before being sent. This includes:- Harmful instructions
- Personal data requests
- Off-topic content
- Competitor mentions (configurable)
Chatbot Analytics
Go to Chatbot → Analytics to see:- Total conversations handled per agent
- Handoff rate
- Average turns before handoff
- Most common trigger keywords