# Flametree Documentation
> Complete Flametree AI Customer Operations Platform integration documentation
This file contains all documentation content in a single document following the llmstxt.org standard.
## Advanced Mode
export const ProjectName = () => {
const {siteConfig} = useDocusaurusContext();
return <>{siteConfig.customFields.projectNameShort}>;
};
export const PortalLink = ({children, path}) => {
const {siteConfig} = useDocusaurusContext();
const baseUrl = siteConfig.customFields.portalUrl;
const fullUrl = path ? `${baseUrl}${path}` : baseUrl;
return {children || fullUrl};
};
Get started with **** — from signing up to launching your first [AI Agent](/overview/key-concepts#-ai-agent).
For this tutorial, we are going to create a knowledge base agent that answers website customers' questions about your debit cards tariffs.
By the end of this tutorial you will:
- Have a fully working AI Agent and to test at the **Playground**
- Have a basic understanding of [Workflow](/overview/key-concepts#-workflow)
- Know how to troubleshoot if something is not working
The entire setup takes between 20 and 30 minutes.
---
## Before You Start
To begin, open the Portal and create an account. You can register using your email and password or sign in with your Google account. Your full name is required during your registration. You may use a nickname, but you cannot leave the **First Name** and **Last Name** fields blank.
After registration, will automatically create your first workspace — called a [tenant](/overview/key-concepts#-tenant).
Your first account automatically grants you [Tenant Admin privileges](/overview/users-tenants), so you can manage customers, agents, and integrations right away.
## Step 1: Create Your First Agent
:::info
By default, you start creating your agent in the [simplified mode](/overview/quick-start). Use **Advanced mode** for more flexibility and complex configuration solutions for your agents. You can switch between the two modes at any stage of the configuration process
:::
At this step, you are going to set agent's name, purpose, and communication style. Copy and paste example configurations below or use your own.
The first section you see when you open your account is **Agents**. Start your experience with creating an AI Agent.
1. Click **Create new agent +** in the upper-right corner.
2. From the dropdown list, select the [agent type](/overview/key-concepts#-ai-agent). For this tutorial, we are going to use the **Inbound Text Agent** flow. This agent replies to inbound text messages from your customers on your website or in Telegram or WhatsApp.
3. In the window that opens, enter your agent's name.
4. To switch to the advance mode and follow the flow in this tutorial, use the **Advanced mode** toggle in the upper-right corner.
5. Fill in the fields in the main section of the page. For this tutorial, **you can copy the examples as-is**. No need to customize these fields.
- **Identity** — Who is your agent? Enter its role and provide a brief description. Learn more about identity, in the [Identity and Style](/basic-setup/agent-tutorial/identity-and-communication-style#identity) article.
Example Identity
```text
You are the multilingual AI Banking Knowledge Base Agent for the bank. Your name is Alex. Your role is to support potential clients by explaining debit card tariffs, available plans, fees, limits, and related services.
```
- **Speech style and language** — Define the agent's speech style, tone of voice and languages you would like it to speak. Learn more about agent's communication style, in the [Identity and Style](/basic-setup/agent-tutorial/identity-and-communication-style#speech-style-and-language) article.
Example speech style and language
```text
Your language is clear, professional, and aligned with standard banking communication. You speak English, but you can answer in other languages if the client prefers.
```
- **Task** — Include a description of the tasks your agent will perform including the agent's limitations. Learn more about the task, in the [Agent's Task](/basic-setup/agent-tutorial/agents-task) article.
Example task
```text
Your primary task is to help potential clients understand the bank’s debit card tariffs and related conditions, including fees, limits, benefits, and service options. You guide customers through tariff details, compare available plans when needed, and collect their contact information for follow-up by a banking specialist. For every question — even a simple one — you must search only within the knowledge base. Always take conversation context (chat history) into account.
```
- **Workflow** — Define how your agent behaves and responds in different situations. For guidance on creating an effective workflow, click the **?** (question mark) icon in the **Workflow** section. Learn more about the workflow, in the [Workflow](/basic-setup/agent-tutorial/configure-workflow) article. [This configuration requires YAML syntax](/overview/yaml)
Example Workflow
```yaml
- process_name: SalesProcess
name: SalesSupport
kind: StateConfig
init_state: true
description: |
- Answer questions about products
- Collect contact info
- Offer call scheduling if the customer is interested
- Use FAQ and Knowledge Base when relevant
available_tools:
SingleStatefulOutboundAgent:
- SendChatMessage
- FinishSession
```
- **Knowledge Sourcs** — Add the information that will provide your agent with the knowledge required to fulfill the **Task** and support the **Workflow**. For more information on knowledge sources and how to manage them, go to [Knowledge Sources](/basic-setup/knowledge-sources).
For this tutorial, add two knowledge sources to your agent (to add them, switch off the **Advanced Mode** in the top-right corner on the agent page):
- An **FAQs** source auto-generated from [Example FAQ](./assets/example-faq.pdf). Download the file, then from the Knowledge Source tab on your agen configuration page, go to **FAQ** > **Generate from File** > **Auto-generate from File**. Connect the FAQ to your agent.
- A **Plain Text** source with the debit-card tariff information (copy the content from the Example Plain Text below). To add the text, from the Knowledge Source tab on your agen configuration page, go to **Plain Text** > **Add new text**
Example Plain Text
```
The bank offers two debit card plans. Both cards support contactless payments, Apple Pay / Google Pay, and online purchases. Each card is linked to a Girokonto.
Basic Debit
No monthly fee. Issuance costs €5.
ATM withdrawals cost €1.50 per withdrawal.
Daily spending limit: €1,000.
Suitable for basic, low-cost everyday use.
Premium Debit
Monthly fee: €12.90. Issuance is free.
ATM withdrawals are free worldwide.
Daily spending limit: €5,000.
Suitable for frequent travelers and clients who want extra benefits.
Notes
The agent provides tariff information only.
The agent does not perform account operations or request sensitive data.
All answers must be based on this information.
```
- **Conversation result** (optional for this Quick Start) — These are the fields the agent collects during the conversation. They are customer details and metrics for reporting and follow-up. For guidance on developing the conversation results, click the **?** (question mark) icon in the **Conversation result** section. [This configuration requires YAML syntax](/overview/yaml)
Conversation analytics is available in 360 View on the portal. [Learn more about analyzing sessions in 360 View](/monitoring/monitoring/view-360)
Example Conversation results
```yaml
- field_name: InterestInDebitCards
kind: FormInfoField
field_description: Indicates whether the customer showed interest in debit card tariffs.
- field_name: ConversationStage
kind: FormInfoField
field_description: Conversation stage where the customer stopped.
```
- **Analytics** — We aren't covering the analytics in this Quick Start. [Learn more about analytics in the Monitoring & Analytics section](/monitoring)
- **Tool group** — We aren't covering the tool groups in this Quick Start. [Learn more about tools and how they can enhance your campaigns in the Tools and Skills article](/basic-setup/tools-and-skills/tools)
5. In the right sidebar, go to **Models** > **LLM** and choose the LLM the agent will use.
6. Click **Save** to create the agent.
## Step 2: Test and Refine
Test conversations before going live. Adjust tone, behavior, and responses until your agent performs as expected.
To test your AI Agent:
1. Click **Start agent** and wait until agent's status changes to `Running`. Now you can test and refine your AI Agent.
2. Navigate to **Playground** in the left sidebar menu.
3. Select the agent you have created and start the conversation: test whether your agent follows the workflow and the knowledge base you've added. You have 50 sessions for your initial experience.
4. Modify agent's configurations as needed: for this go to the **Agents** section. Remember to click **Save** to apply the changes.
5. Restart the agent if it was running. To do it, click **Stop agent** and then **Start agent**.
Learn more about the approach to testing in the [Testing and Evaluation](/basic-setup/agent-tutorial/monitor-and-evaluate) article.
:::tip
If you get the `Error` status at the start of your agent or your agent isn't starting, in the **Agents** menu click the three dots opposite the agent's name. Select **View logs** to see what went wrong.
:::
## Step 3: Connect Channels
Make your agent available where your customers are — connect **Telegram**, **WhatsApp**, **email**, **phone**, or **web widgets**. For this agent, we are going to connect the **Telegram Channel**.
### 1. Create a Telegram Bot
1. Open **Telegram** and find [@BotFather](https://telegram.me/BotFather).
2. Send `/newbot` and follow the prompts:
- **Bot name** — Any display name.
- **Username** — Must end with `bot`. For example, `mybank_debitcard_bot`
3. Copy the bot token provided by BotFather that looks like this: `1234567890:AAEisSLYpWrb0q18rlpuj7yQbJcOoM1PuLQ`
### 2. Add Telegram Channel in
1. Go to **Settings** > **Channels**
2. Open **Telegram** and click **Add +**
3. Fill in the configuration:
- **Name** — Integration name.
- **Description** — Description of what the agent does (optional).
- **Bot username** — The name customers see when talking to the agent.
- **Telegram Bot Token** — Token from BotFather.
- **Enable Telegram streaming** — Real-time answer generation (optional).
4. Click **Save** to add the channel.
:::warning
Start the channel to proceed with the next steps. To start the channel, click **Start** in the upper-right corner of the screen
:::
### 3. Connect Channel to AI Agent and Test
1. In the left sidebar, go to **Agents** and double-click on your agent to go to its settings.
2. In the right sidebar, go to **Communication Channels**.
3. Hover over **Add +** and from the dropdown menu select **Telegram**.
4. Click **Save** to apply the changes.
5. Restart the agent if it was running. To do it, click **Stop agent** and then **Start agent**. Restarting the agent is required. for the channel to start working.
6. To test the Agent, open your bot in **Telegram** and click **start** to begin the conversation.
[Learn more about configuring channels](/basic-setup/communication-channels/basics)
🚀 You’ve successfully created and tested your first AI Agent with **** — well done!
---
## Next Steps
You’re ready to explore in more depth:
- [Continue with the AI Agent Tutorial for a full walkthrough — from initial setup to launch](/basic-setup/agent-tutorial/basics)
- [Enhance your agent by using Tools](/basic-setup/tools-and-skills/tools)
- [Run Campaigns to initiate conversations](/basic-setup/campaigns-overview/campaigns-overview)
- [Track results with Deep Analysis](/monitoring/monitoring/deep-analysis)
---
## Billing & Subscription Management
export const ProjectName = () => {
const {siteConfig} = useDocusaurusContext();
return <>{siteConfig.customFields.projectNameShort}>;
};
This article explains how to manage your subscription plans, add payment methods, and understand how the platform counts and bills sessions.
---
## Understand billing and sessions
Before you manage your subscription, it is important to understand how the platform structures plans and calculates usage.
### Plan structure
Subscription plans are divided into two categories:
* **Platform usage plans:** Required to operate the platform. If your plan expires, AI agents stop running and you cannot start new sessions.
* **Add-on plans:** Extra services (such as paid support) added on top of your platform plan. Add-ons do not affect core platform operations.
A single plan can include multiple pricing components (for example, a fixed monthly fee plus usage-based billing at the end of the period). Subscribing to or canceling a plan automatically applies to all its associated prices.
### Sessions vs. billable sessions
A **session** is a single conversational interaction between a customer and an AI agent.
* It starts when the customer or the AI agent initiates a conversation.
* It ends when the customer’s request is resolved, the customer leaves the chat, or after a period of inactivity.
A **billable session** is the unit used to calculate usage under your plan. Each billable session covers a **24-hour window**. If a conversation continues beyond 24 hours, it remains **1 session** in the interface but counts as **multiple billable sessions** against your plan allowance.
**Example:**
A customer interacts with the AI agent over a period of 36 hours.
* **Interface view:** 1 session
* **Billing view:** 2 billable sessions
## Subscription states
### Free trial
New tenants start on a **14-day free trial** of the Playground plan, which includes a 50-session quota. You can track your remaining days and sessions on the **Billing** page.
You receive in-app and email notifications as your trial approaches its time or session limits, and once it expires.
:::note
The free trial is available once per tenant. If you cancel a paid plan later, you cannot return to the free trial. The platform remains inactive until you subscribe to a paid plan again
:::
### Failed payment grace period
If a payment fails, the platform keeps running for a **one-week grace period** so you can resolve the issue without immediate downtime. Once this period ends, AI agents stop until you settle the balance.
## Manage your subscription
You perform all billing actions securely through the billing portal.
### Set a monthly session limit
To provide better control over your billing process and prevent unexpected charges, set a personal monthly limit for billable sessions. This limit applies tenant-wide to all your AI agents.
1. In the bottom-left menu, select **Profile** (the user icon), and then select **Billing**.
2. In the **Platform subscription** section, locate the **Session limit** field. By default, this is set to the base limit of your tariff plan.
3. Enter your desired maximum number of sessions for the current billing cycle. The value must be greater than zero.
4. Select **Set limit** to apply your changes.
> 💡 This sets the maximum number of sessions allowed for the current billing cycle. Once your session count reaches this limit, all AI agents automatically stop, and no new sessions execute. To resume agent activity, manually increase the session limit or wait for the counter to reset to 0 at the start of your next billing period.
### Add a payment method
To add a payment method for subscriptions or to cover extra session usage:
1. Select **Profile**, and then select **Billing**.
2. Select **Manage subscription** to open the secure billing page.

3. In the **Payment Method** section, select **+ Add payment method**.

4. Enter your card information, and then select **Add**.
### Change your plan
To upgrade your tier (for example, from *Starter* to *SME*) or modify your current plan:
1. Select **Profile**, and then select **Billing**.
2. Select **Manage subscription**.
3. Select **Update subscription**.
4. Choose the desired plan, and then select **Confirm**.
When you upgrade plans, the system immediately recalculates your session limits so you can continue using agents without interruption.
### Cancel your subscription
If you need to downgrade to the *Playground* tier or cancel your paid subscription:
1. Select **Profile**, and then select **Billing**.
2. Select **Manage subscription**.
3. Select **Cancel subscription**.
4. Confirm the cancellation.
Your paid features and session limits usually remain active until the end of the current billing cycle.
---
## How to Get Support
export const ProjectName = () => {
const {siteConfig} = useDocusaurusContext();
return <>{siteConfig.customFields.projectNameShort}>;
};
export const SupportEmail = () => {
const {siteConfig} = useDocusaurusContext();
const email = siteConfig.customFields.supportEmail;
return {email};
};
provides several ways to get help — from quick self-service answers to direct technical support for complex issues.
This page helps you choose the right option and prepare an effective request.
---
## 1. Try Self-Service First
Before contacting support, check the resources below — they often contain complete examples or ready-made solutions:
- **Documentation** – step-by-step setup and feature guides
- **Template Library** – prebuilt configurations for popular workflows
- **Case Studies** – proven approaches from real-world projects
> **Tip:** Searching the documentation or community for your error message often gives an immediate answer.
### Troubleshooting UI Issues
If you encounter interface glitches or outdated data, you can reset the portal cache directly from your profile:
1. Click your **Account Icon** (bottom-left corner).
2. Select **Clear Cache**.
3. Choose the appropriate option:
- **Clear base cache** — Recommended first step. Refreshes application data while keeping you logged in.
- **Clear all cache** — Use this for persistent issues. It performs a full reset and will log you out of the platform.
## 2. When to Contact Support
If your issue isn’t covered by documentation or community threads, reach out to the Support team.
They can help with:
- Designing or optimizing complex workflows
- Integrating APIs or third-party systems
- Debugging performance or scaling issues
- Resolving recurring or unclear errors
- Planning architecture for production rollout
> **Recommendation:** Involve support early during workflow or integration planning to avoid rework later.
## 3. How to Prepare Your Request
A clear and detailed request helps support resolve issues faster. Include:
1. **Summary** – what went wrong and what you expected
2. **Context** – relevant agent, workflow, or environment details (omit sensitive data)
3. **Error Information** – logs, codes, or screenshots
4. **Reproduction Steps** – short list of actions to trigger the issue
5. **Examples** – minimal YAML or config snippet if relevant
> The more context you provide, the faster your issue can be diagnosed and resolved.
## 4. How to Contact Support
You can email the support team at **** with your prepared request.
---
## Key Terms and Concepts
export const ProjectName = () => {
const {siteConfig} = useDocusaurusContext();
return <>{siteConfig.customFields.projectNameShort}>;
};
Below are the core components that define the platform and how AI agents operate.
## 🧠 AI agent
**AI agents** are at the heart of — intelligent assistants that interact with customers, employees, and partners through natural conversation. They understand intent, answer questions, automate workflows, and even complete transactions using large language models.
includes several agent types, each built for a specific mode of interaction:
- **Text agent** — manages written conversations, keeps context, follows workflows, and integrates with tools. Can be inbound and outbound. **Inbound Text agent** replies to inbound messages from customers. **Outbound Text agent** initiates the contact with your contact base.
*Best for support, lead qualification, and process automation.*
- **Voice agent** — handles real-time phone calls with instant responses. Can be inbound and outbound. **Inbound Voice agent** takes inbound calls. **Outbound Voice agent** initiates the contact with your contact base.
*Best for voice assistants and customer support.*
- **Call Analytics agent** — analyzes recorded calls, extracts key data, and generates insights.
*Best for quality assurance and compliance.*
agents are modular and easy to customize — enabling enterprises to automate text, voice, and analytics workflows without coding.
## 🧩 Tools and Skills
Tools and Skills extend an agent’s capabilities — enabling external integrations and internal automation within .
**Tools** perform external operations such as sending messages, creating tickets, or querying APIs. Each tool is a single executable action, defined in YAML (plugin) and implemented in Python. Agents invoke tools contextually during conversations to interact with databases or third-party systems.
**Skills** define internal logic that runs automatically on workflow events — for example, when entering or leaving a state. They help structure conversations, enforce logic, and trigger background actions without manual control.
Tools vs. Skills
* Tools — agent-driven actions, declared in available_tools.
Example: “Create a ticket when a human reports an issue.”
* Skills — system-driven automations, defined in init_skills or final_skills.
Example: “Load customer data when conversation starts.”
## 🔗 Integrations
Connections to external systems and services including communication channels (email, WhatsApp, web chat), AI models (LLM, STT/TTS, embedders), MCP servers, and external systems (CRMs, databases) that enable comprehensive AI agent functionality.
## 💬 Channels
Communication pathways that connect AI agents to external messaging platforms and services (such as Telegram, WhatsApp, Email, Web Chat) enabling customers to interact with AI agents through their preferred communication methods.
## 🔄 Workflow
A **Workflow** defines how an AI agent manages conversation and automation logic — how it moves between states, reacts to input, and performs actions. It follows a **state machine** model where each state represents a distinct step in the process, and transitions define how the agent proceeds.
#### States
Each **state** defines what the agent does and what tools it can access. A state typically specifies:
- Actions on entry and exit
- Available tools or skills
- Conditions for moving to another state
States can be conversational or operational depending on the workflow design.
#### Transitions
**Transitions** control how the agent moves between states. They are triggered by customer input, tool results, or internal logic. Each transition defines a **trigger**, an optional **condition**, and a **target state**.
#### Tools
Within a state, the agent can use **tools** — built-in or custom — to perform external actions (for example, check data, send messages, call APIs). Tool outputs can be stored as **observations** that affect subsequent transitions.
## 📚 Knowledge Bases
Knowledge Bases in are structured repositories of company information — documents, files, and data sources that AI agents use to give accurate, context-aware answers. They help ensure every response is consistent, factual, and aligned with verified content. includes two knowledge systems, each built for a different type of interaction.
#### Fast Access Knowledge Base
A lightweight reference for quick, factual replies. It holds short Q&A pairs, policy notes, and simple facts that agents can access instantly without searching.
Best for common questions about hours, pricing, or policies.
#### Vector Knowledge Base
An intelligent, searchable repository for complex information. It uses Retrieval-Augmented Generation (RAG) to locate and summarize relevant details from larger sources such as manuals or product documentation.
Best for in-depth, document-based answers.
## 🎯 Campaigns
Campaigns are automated outreach workflows that use AI agents to communicate with contacts across multiple stages. They combine structured communication steps, programmable logic, and contact data to support customer acquisition, retention, or debt collection.
Each campaign consists of three core layers — stages, strategies, and contacts. Stages define the communication flow, strategies control decision logic, and contacts store the data being processed.
#### Stages
A stage is a single step in the communication sequence, using a specific channel such as email, WhatsApp, or phone. Each stage has its own agent configuration and message template.
Typical flows start with an email, then follow up via WhatsApp, escalate to a phone call, and finish with a final reminder.
#### Strategies
Strategies are Python scripts that define campaign logic — when to send messages, how to move between stages, and how to handle results.
They contain the business rules that drive automation and decision-making.
#### Contacts
Contacts are the campaign’s active records. Each includes identifiers (name, email, phone, IDs), imported parameters for personalization, and results collected during the process.
This data allows campaigns to adapt dynamically based on prior interactions.
## 💬 Sessions
A session is an individual conversation between a customer and an AI agent that can be monitored, analyzed, and used to improve performance and quality.
Each session stores the full message history, parameters provided at the start, results collected during the interaction, and its current status (active or closed).
A session begins when a customer starts a conversation or the agent reaches out, continues through the active exchange of messages, and ends when the interaction is completed. Once closed, session data becomes available for review and analysis.
For details on how sessions affect usage limits and billing, see
[Sessions and billing](/overview/billing#understand-billing-and-sessions)
## 🏢 Tenant
An organization’s workspace that contains all system configurations, AI agents, integrations, knowledge bases, and billing information. It acts as a container for data and settings, where users operate based on their assigned roles (Tenant Admin, Tenant User, Tenant Viewer, or Tenant Operator).
## 👥 User
A person who works inside a specific tenant (workspace). Each user is assigned to one tenant only and holds a specific role that defines their access permissions and the actions they can perform within the platform.
## 🙋 Customer
A person who interacts with an AI agent through a communication channel — such as web chat, WhatsApp, Telegram, email, or voice. Customers are the end recipients of the agent's responses and the primary participants in conversations. They are not platform users and do not have access to the workspace.
:::tip Using *human* in prompts
When writing agent instructions and prompts, we recommend referring to the person on the other end of the conversation as **human** — for example, *Collect the human's contact details* or *Respond in the same language the human uses.* This wording is well-understood by language models and produces more natural, consistent behavior.
If your business processes require a different term — such as *client*, *guest*, *caller*, or *subscriber* — you can use it instead. For best results, we still recommend using *human*.
:::
## 📦 Product catalog
A structured collection of products connected to an AI agent, enabling context-aware product recommendations, detailed product information delivery, and direct purchase link sharing during conversations.
---
## User and Tenant Management
export const ProjectName = () => {
const {siteConfig} = useDocusaurusContext();
return <>{siteConfig.customFields.projectNameShort}>;
};
uses a tenant-based structure to manage users, roles, and organizational settings. This article explains how to register, invite, and manage users, assign roles, and configure your tenant.
---
## Tenants and Users: Key Concepts
On the portal, a [tenant](/overview/key-concepts#-tenant) represents an organization’s workspace, while [users](/overview/key-concepts#-user) are people who work inside that workspace.
Each tenant contains all system configuration and data, such as AI agents, integrations, knowledge bases, and billing information. Users are assigned [roles](#user-roles) that define what actions they can perform within the tenant. Both users and tenants can be managed in the **Identity** section on the portal.

## Registration and First Tenant
To register your tenant:
1. Go to the portal
2. Click **Register** at the bottom of the page
3. Choose how to register: with your Google account or with an email
4. If you choose to register with email, fill out the registration form — all the fields are required:
- **Email** — Enter a email address
- **Password** — Set a secure password
- **First name** — Enter your name
- **Last name** — Enter your last name
5. Click **Register** to finish creating your account
After registration, automatically creates your first workspace called a [tenant](/overview/key-concepts#-tenant). You automatically receive [Tenant Admin](#user-roles) rights for your new tenant. Tenant Admins can manage all users, billing, and integrations.
## Users
In this section, you can invite team members, assign roles, and manage permissions within your tenant.
### Accessing User Settings
To open the list of users:
- In the left sidebar, go to **Identity > Users**
- The **Users** tab displays all users in your tenant
When you first register, the list contains only your own account.
### Add User
Only [Tenant Admins](#user-roles) can add or remove users.
To add a new user:
1. In the left sidebar, go to **Identity** > **Users**
2. Click **+ Add User**
3. Complete the form:
- **Name** — Enter user's name
- **Email** — Enter Valid email address
- **Password** — Set a temporary password for first login of the new user
- **Role** — Select an access level. For more on this, see [User Roles](#user-roles) below
- **Tenant** — Your organization’s workspace (usually prefilled)
- **Operator schedule** — For the **Tenant Operator** role, define working days and hours. AI agents redirect sessions to this operator only during the specified time
4. Click **Save** to add the user
The new user can sign in immediately after being added.
New user sign-in
1. Go to the portal
2. Enter your **email**
3. Enter the temporary **password** your Tenant Admin provided
4. Click **Start**
5. Enter your new secure password you will use to sign in to the portal
6. Click **Submit**
7. Check your email inbox for the email verification message. Follow the instructions to verify your email
Done! You will be redirected to your organization’s space on the portal. For further instructions, contact your organization’s portal administrator.
> ⚠️ **Note:** Each user is assigned to one tenant only.
### User Roles
Each user in has a specific role that defines their access and permissions.
| Role | Description | Permissions |
| --- | --- | --- |
| **Tenant Admin** | Full administrative access | • Create, edit, delete AI agents• Manage knowledge bases and integrations• Add/remove users and change roles• Manage billing and subscriptions• Access AI agent and session logs• Configure integrations (channels, LLM, STT/TTS) |
| **Tenant User** | Limited access for testing | • Access to **Playground** only• Test AI agents and review dialogs• No access to create or delete agents• No access to user management |
| **Tenant Viewer** | Read-only access | • View agents and their configurations• Test AI agents• View knowledge bases and session logs• Cannot create, edit, or start/stop AI agents• Cannot modify knowledge bases or integrations |
| **Tenant Operator** | Operational access for handling conversations and sessions | • Work with conversations and live sessions• View 360 contacts• Assign and resolve conversations• Export and import sessions• No access to agent configuration, integrations, or tenant settings• If schedule is set, sessions can be redirected only within the specified hours |
Detailed role matrix
| Area / Action | Tenant Admin | Tenant User | Tenant Viewer | Tenant Operator |
| --------------| :----------: | :---------: | :-----------: | :-------------: |
| **Profile (view and update own profile)** | ✅ | ✅ | ✅ | ✅ |
| **User management** | ✅ | ❌ | ❌ | ❌ |
| **Tenant management** | ✅ | ❌ | ❌ | ❌ |
| **AI agents (create, edit, delete, start, stop, view logs)** | ✅ | ❌ | ❌ | ❌ |
| **AI agents (test in Playground)** | ✅ | ✅ | ✅ | ❌ |
| **Knowledge bases (create, edit, delete)** | ✅ | ❌ | ❌ | ❌ |
| **Knowledge bases (view)** | ✅ | ❌ | ✅ | ❌ |
| **Integrations & channels (add, start, stop connectors)** | ✅ | ❌ | ❌ | ❌ |
| **Product catalogs (add, reset invitations)** | ✅ | ❌ | ❌ | ❌ |
| **Sessions (export, import from audio, check logs)** | ✅ | ❌ | ✅ | ✅ |
| **Conversations (assign, resolve, send messages)** | ✅ | ❌ | ✅ | ✅ |
| **360 View (add, edit, delete contacts)** | ✅ | ❌ | ❌ | ❌ |
| **Campaigns (view)** | ✅ | ❌ | ✅ | ✅ |
| **Campaigns (import, create, export, view logs, delete)** | ✅ | ❌ | ❌ | ❌ |
### Manage User Roles
Only users with **Tenant Admin** rights can assign or change roles.
To change a user’s role:
1. In the left sidebar, go to **Identity** > **Users**
2. Find the user in the list
3. Click **Edit**
4. Select a new role
5. Save the changes
> 💡 **Tip:** Role changes take effect immediately.
## Tenants
A **tenant** represents your organization’s workspace in .
Users with the **Tenant Admin** role can manage the tenant created during registration.
### Accessing Tenant Settings
To open tenant settings, In the left sidebar go to **Identity** > **Tenants**
The **Tenants** tab allows you to:
- View the list of available tenants (by default, only one tenant is created during registration)
- Copy the tenant API key (used for private API methods)
- Edit tenant details
### Edit Tenant Information
To edit tenant information:
1. In the left sidebar, go to **Identity** > **Tenants**
2. Click **Edit Tenant**
3. Update the following fields:
- **Name** — Сompany name (tenant)
- **Description** — Tenant description
- **Phone** — Company contact number
- **Billing email** — Billing contact email
- **Country** — Selected from the dropdown list
- **Street** — Optional mailing address
- **ZIP code** — Postal code
- **Website** — Company website
4. Click **Save** to apply changes
You can also copy the **Tenant API key** from this section to use with private API methods. Keep this key secure and regenerate it if needed.
> ⚠️ **Note:** If you lose access to tenant settings, contact your organization's Tenant Admin or create a new account if you're the sole user. At least one Tenant Admin must exist per tenant.
## Best Practices
- **Role Assignment**: Start new team members with **Tenant User** role for testing, then upgrade to **Tenant Admin** only when necessary
- **Security**: Regularly review user access and remove inactive users
- **Documentation**: Keep tenant information up-to-date for billing and support purposes
- **API Keys**: Protect your tenant's API key and regenerate if compromised
---
## Related Resources
- [Quick Start: Simplified Mode](/overview/quick-start)
- [AI Agent Setup Tutorial](/basic-setup/agent-tutorial/basics)
- [Workflow Configuration Tutorial](/basic-setup/agent-tutorial/configure-workflow)
- [Knowledge Base Management](/basic-setup/knowledge-sources)
---
## Wizard: Basics
You don’t need any coding experience to create an AI Agent with the wizard. You can configure the agent from predefined templates and customize your agent later if needed.
This tutorial will guide you through creating your first AI agent tailored to your specific needs — whether for sales or for communicating on your behalf. The entire setup takes about 15 minutes.
For a more in-depth AI agent setup with extended fine-tuning options, see [Advanced Mode](/overview/advanced-mode)
---
## About Wizard
With the wizard, you can create three types of [inbound text agents](/overview/key-concepts#-ai-agent):
- [Creator AI Twin](/overview/wizard/ai-twin/wizard-twin) — an AI agent that can use your unique language, style, and tone of voice to communicate with your audience via a Telegram bot
- [Telegram AI Sales](/overview/wizard/telegram-sales/wizard-telegram-sales) — an AI agent that helps sell your product by engaging customers via a Telegram bot
- [Website AI Sales](/overview/wizard/website-sales/wizard-website-sales) — an AI agent on your website that helps sell your product by engaging customers via your website
## Wizard Flow Differences
Below is a brief overview of the key differences you’ll encounter when setting up each agent type.
| Setup focus | Creator AI Twin | Telegram AI Sales | Website AI Sales |
|------|-----------------|------------------|------------------|
| **Identity & context** | Personal profile — who I am, what I do, what I talk about | Business context — what the company does, products or services | Business context — what the company does, products or services |
| **Knowledge base format** | Audio, video, PDF | PDF | PDF |
| **Conversation results** | — | Define customer data to collect for analytics | Define customer data to collect for analytics |
| **Communication channels** | Telegram bot | Telegram bot | Web |
| **Testing agent** | Playground or Telegram | Playground or Telegram | Playground |
---
## Next Steps
Choose your flow:
- [Creator AI Twin](/overview/wizard/ai-twin/wizard-twin)
- [Telegram AI Sales](/overview/wizard/telegram-sales/wizard-telegram-sales)
- [Website AI Sales](/overview/wizard/website-sales/wizard-website-sales)
---
## YAML Basics - Quick Reference
export const ProjectName = () => {
const {siteConfig} = useDocusaurusContext();
return <>{siteConfig.customFields.projectNameShort}>;
};
YAML (Yet Another Markup Language) is a human-readable format used for configuration files. uses YAML to define agents, workflows, and integration settings. This quick guide explains the syntax you need to know to work safely and efficiently.
---
## Syntax essentials
### Indentation and structure
YAML uses **spaces** to show structure. Do not use tabs. Use a consistent amount of spaces per level (two spaces is common). Items at the same level must align.
```yaml
root:
child:
grandchild: value
```
### Key–value pairs
Basic mapping is key: value. Values can be scalars (strings, numbers, booleans).
```yaml
name: John Doe
age: 30
active: true
```
### Strings and quoting
Unquoted strings are allowed, but quote when you use special characters (:, #, ', "), leading/trailing spaces, or when the value should be preserved exactly.
```yaml
simple: hello
quoted: "contains: colon"
single_quote: 'can contain "double quotes" safely'
```
### Lists (sequences)
Lists use hyphens. Indent list items under their parent key.
```yaml
fruits:
- apple
- banana
- orange
```
### Nested structures (mappings of lists, lists of mappings)
Combine mappings and sequences to create structured data.
```yaml
people:
- name: Alice
email: alice@example.com
- name: Bob
email: bob@example.com
```
### Multi-line text
Use | to preserve line breaks, or > to fold lines into spaces.
```yaml
description: |
First line
Second line (kept as new line)
summary: >
This text
becomes a single line with spaces.
```
### Comments
Start comments with #. Prefer standalone comment lines for clarity.
```yaml
# This is a full-line comment
name: John # Inline comment (use sparingly)
```
## Common mistakes to avoid
* Tabs instead of spaces — YAML only supports spaces for indentation.
* Inconsistent indentation — items at the same level must align.
* Missing space after : — always use key: value, not key:value.
* Unescaped special characters — quote strings that include :, #, or special symbols.
* Misaligned hyphens — make sure list items are correctly indented.
## Editing best practices
### Validate before saving
Always validate YAML syntax before saving. Use an external checker like [yamlchecker.com](https://yamlchecker.com/) or your code editor’s linter.
### Work incrementally
Apply small edits and test each change. This makes troubleshooting easier and reduces the chance of losing valid configurations.
### Keep local backups
Save complex workflows locally before making changes. If possible, use version control to track your configuration history.
### Comment clearly
Place comments at the start of lines instead of inline. This improves readability and prevents parsing errors.
### If a save fails
If rejects your update, it usually means there’s a YAML syntax error. Check your structure, fix indentation, and reapply validated changes.
> ⚠️ Note: If YAML syntax is invalid, automatically discards the update and restores the last valid version.
## Example configuration
```yaml
agent:
name: Sales Assistant
description: |
Answers customer questions and schedules demo calls.
workflow:
init_state: true
steps:
- name: greet
actions:
- send_message: "Hello! How can I help?"
- name: collect_contact
actions:
- request_field: HumanFullName
- request_field: HumanEmail
```
## Related Resources
- [YAML Syntax Guide](https://yaml.org/spec/)
---
## Welcome to the Platform
export const ProjectName = () => {
const {siteConfig} = useDocusaurusContext();
return <>{siteConfig.customFields.projectNameShort}>;
};
export const LLMsLink = () => {
const {siteConfig} = useDocusaurusContext();
const url = `${siteConfig.customFields.docsUrl}/llms-full.txt`;
return (
{url}
);
};
export const MarketingLink = () => {
const {siteConfig} = useDocusaurusContext();
return (
{siteConfig.customFields.marketingUrl}
);
};
export const HideInWhiteLabel = ({ children }) => {
const { siteConfig } = useDocusaurusContext();
const isWL = siteConfig?.customFields?.isWhiteLabel;
return isWL ? null : <>{children}>;
};
**** is an **AI Customer Operations Platform** for financial services — a control layer for AI-driven, customer-facing communications that operate within clearly defined policy, compliance, and brand boundaries.
The platform lets you deploy LLM-powered voice and text agents across channels (WhatsApp, phone, web, mobile apps, email), keep every interaction governed by your workflows, and combine automation with human oversight. The result is consistent, policy-aligned customer experiences that scale without losing control, compliance, or quality.
## What this documentation covers
These docs explain how to build, configure, and operate agents — the day-to-day work of defining workflows, connecting channels, plugging in tools and knowledge bases, and monitoring performance.
For the product overview, use cases, and positioning, see .
:::tip Prefer asking an AI over reading the docs?
We publish a single plain-text export of the entire documentation at . Drop that URL (or the file's contents) into Claude, ChatGPT, or any LLM with web access, and ask questions in natural language instead of browsing page by page
:::
## Where to go next
- [Key Concepts](/overview/key-concepts) — agents, tools, skills, workflows, knowledge bases, sessions, and the rest of the vocabulary used across the docs.
- [Quick Start](/overview/quick-start) — build and launch your first agent in a few steps.
- [Basic Setup](/basic-setup/) — configure agents, connect channels, set up integrations.
- [Advanced Features](/advanced-features/) — campaigns, voice, call analytics, and more.
- [Monitoring & Analytics](/monitoring/) — review conversations and improve performance over time.
---
## Quick Start: Simplified Mode
export const ProjectName = () => {
const {siteConfig} = useDocusaurusContext();
return <>{siteConfig.customFields.projectNameShort}>;
};
{/* Обновили компонент: теперь он принимает path и склеивает его с базовым URL */}
export const PortalLink = ({ path = '', children }) => {
const { siteConfig } = useDocusaurusContext();
const base = siteConfig.customFields.portalUrl;
const href = `${base}${path}`;
return (
{children || href}
);
};
Get started with **** — from signing up to launching your first [AI Agent](/overview/key-concepts#-ai-agent). By the end of this tutorial you will have a fully working AI agent which you can test directly in the built-in **Playground**.
The entire setup takes between 10 and 15 minutes.
---
## Before You Start
To begin, open the Portal and create an account. You can register using your email and password or sign in with your Google account. Your full name is required during your registration. You may use a nickname, but you cannot leave the **First Name** and **Last Name** fields blank.
After registration, will automatically create your first workspace — called a [tenant](/overview/key-concepts#-tenant).
## Create Your Agent
The first section you see when you open your account is **Agents**. Start your experience with creating an AI Agent.
1. Click **Create new agent +** in the upper-right corner.
2. From the dropdown list, select the [agent type](/overview/key-concepts#-ai-agent). For this tutorial, we are going to use the **Inbound Text Agent** flow. This agent replies to inbound text messages from your customers on your website or in Telegram or WhatsApp.
3. In the window that opens, enter your agent's name.
After you set the name for your agent, you will see the agent configuration page. It consists of four tabs that correspond to the main areas of configuration: **instructions**, **Knowledge Base**, **Channels**, and **Conversation Results**. For this tutorial, we will fill them in one by one, following their order on the page.
:::info
By default, you start creating your agent in this simplified mode. If you wish more flexibility and complex solutions when configuring your agent, in the upper-right corner, use the toggle to switch to [Advanced mode](/overview/advanced-mode). You can switch between the two modes at any stage of the configuration process
:::
## Configure Your Agent
Follow the steps of this guide to create your first AI agent.
:::warning
After completing each tab and after finishing configuring your AI agent, click **Save** in the upper-right corner of the page to apply the changes
:::
### Step 1: Instructions
**Agent Instructions** define **how** your agent communicates with customers: its language, tone, and behavior during conversations.
Fill in the following sections:
- [Identity & Role](/basic-setup/agent-tutorial/identity-and-communication-style#identity)
- [Speech Style & Tone](/basic-setup/agent-tutorial/identity-and-communication-style#speech-style-and-language)
- [Primary Task](/basic-setup/agent-tutorial/agents-task)
- **Welcome message**
Each section includes a short example that you can use or modify.
:::tip
Click the ? (question mark) next to a section to see a brief description
:::
### Step 2: Knowledge Sources
**Knowledge Sources** is **where** your agent retrieves the information it uses to respond to customers. Use at least one knowledge source for your agent to be able to communicate.
The **Knowledge Source** page contains the following tabs:
- Core — Basic agent information that is checked before any knowledge source. This information is part of the agent prompt
- [FAQs](/basic-setup/knowledge-sources#faqs) — FAQs the agent can use to answer popular questions. You can choose whether you wish your FAQ to use vector search (best for bigger FAQs) or use it as part of the prompt (best for smaller FAQs)
- [Plain Text](/basic-setup/knowledge-sources#plain-text) — Text information the agent can use when talking to customers. Limit: 50,000 characters.
- [Websites](/basic-setup/knowledge-sources#websites) — Links to public websites, blogs, and other web sources.
- [Files](/basic-setup/knowledge-sources#files) — PDF, DOCX, TXT, MD, and CSV files. Each file is added as a separate knowledge source.
- [YouTube](/basic-setup/knowledge-sources#youtube) — Links to public YouTube videos.
Each tab shows tips and options for adding or connecting content about your product or service. The available options depend on whether sources of this type have already been added:
- If sources already exist, you can **Connect** them to the agent
- If no sources exist yet, you can **Create** or **Add** a new source directly from the tab
For more information,see [Manage Sources from the Agent Page](/basic-setup/knowledge-sources#manage-sources-from-the-agent-page)
### Step 3: Channels
A **channel** is the platform **through which** your agent communicates with customers
Through this simplified flow, you can connect the following channels:
- **Telegram**
- **WhatsApp**
- **Web widget**
You can connect one channel or all of them. To start, click the corresponding button and follow the on-screen instructions.
For more information, about all possible integrations, refer to the [Communication Channels](/basic-setup/communication-channels/basics) section.
### Step 4: Conversation Results
**Conversation Results** defines **what information** your agent collects during conversations with customers. You can use toggles to collect common predefined fields in **Standard Information** or add your own in **Custom Fields**.
To add your own custom fields:
1. Click **+ Add something else**
2. When adding a custom field, choose how the value should be captured:
- **Match to options** — The agent will only capture values from a predefined list specified in **Options**. This is useful when you expect a limited set of possible answers.
Examples:
- Service: Loan, Credit card, Mortgage
- Request type: New application, Support, Complaint
- **Any value** — The agent will capture any value provided by the cutomer. This is useful for open-ended inputs such as names, locations, or free-text responses.
3. Click **Add field** to save the changes
You can view the conversation results collected in live mode during each session. To do this, click **Conversation Results** under the **Playground** area. After the session ends, the conversation results along with other session details become available in [360 View](/monitoring/monitoring/view-360).
🚀 After you've filled up all the tabs — you have created your first AI agent!
## Test in Playground
**Playground** is the area where you can interact with your newly created agent: ask questions and simulate real customer conversations to see if the agent follows the instructions you provided. For example, check the tone it uses, the information it provides, and the data it collects.
After testing, you may want to adjust the configuration. Click **Save** to apply the changes — the agent will automatically restart so you can continue testing right away.
For more information on testing patterns and scenarios, refer to the [Test and Evaluate Agent Performance](/basic-setup/agent-tutorial/monitor-and-evaluate) article.
## Example AI Agent Setup
Below are sample entries for the [Instructions](#instructions) and [Knowledge Base](#knowledge-base) sections that you can use for your first agent. They will help you set up a minimal configuration and test the agent in the **Playground**.
You can copy and paste these examples or use them as a starting point for your own agent.
### Instructions
#### Identity & Role
Example identity & role
You are Ted, a helpful AI assistant for EventHub. EventHub organizes online events such as webinars, workshops, and educational sessions.
You help people learn about upcoming events and register for them.
#### Speech Style & Tone
Example speech style & tone
Use a friendly and professional tone. Always introduce yourself.
Keep responses short — 1–2 sentences when possible.
Always reply in the same language as the customer.
#### Primary Task
Example primary task
Your main task is to help customers register for events.
Guide them through the registration process, ask for the required details, and confirm their registration.
If a question is outside event registration, politely redirect the conversation back to the event.
In addition to name and email, also ask for the phone, and preferred date of the event.
#### Welcome Message
Example welcome message
Hello! I can help you register for our upcoming events.
Would you like to see what events are available?
### Knowledge Base
For the knowledge base, the examples we are going to fill for the example flow are: **Core**, **Q&A**, **Plain Text**, and **Files**.
#### Core
Example core information
EventHub hosts short online learning events such as webinars and workshops.
Events usually last 60–90 minutes and are held online via Zoom. Each event has a limited number of seats (100 participants).
Registration requires name and email address. After registration, participants receive a confirmation email with the event link.
Participation in events is free, but registration is required.
#### Q&A
Example Q&A
Question: What happens if an event is already full?
Answer: If an event reaches the limit of 100 participants, you can join the waiting list. If a spot becomes available, you will receive an email invitation to register.
Question: What if I register but cannot attend the event?
Answer: If you cannot attend the live session, you will automatically receive a recording of the event by email within 24 hours.
#### Plain Text
Example plain text description
Upcoming Events
AI Basics for Beginners
A beginner-friendly introduction to artificial intelligence and its real-world applications.
Time Management Masterclass
Practical strategies for prioritizing tasks and improving daily productivity.
Introduction to Data Analytics
A short overview of how organizations collect, analyze, and use data to make decisions.
#### Files
Download an example of a knowledge base PDF file
---
## Wizard Setup: Creator AI Twin
export const ProjectName = () => {
const {siteConfig} = useDocusaurusContext();
return <>{siteConfig.customFields.projectNameShort}>;
};
## How to get to Wizard
1. In the left sidebar, go to **Agents**
2. Click **Create with wizard +** in the upper-right corner and select **Creator AI Twin**
3. On the wizard welcome page, click **Start**
> 💡 **Tip**: You can add your own content at each step, or use the examples from this article by copying them into the corresponding step.
## Create your AI Twin
1. On the **Tell us about yourself** page, complete the field by replacing the text in the square brackets — this field is required. Click **Next** to continue.
Example
```
Name: Anna Teacher
Who I am: Lifestyle blogger and English teacher living in Hanoi.
My expertise: Everyday life in Vietnam, teaching English abroad, cultural adaptation, Vietnamese food, expat life without filters.
Who I help: People who are curious about moving abroad or living in Asia, and followers who want an honest, realistic view of everyday life in Vietnam.
How I help: I share personal experiences and small everyday observations to help people understand what life abroad actually feels like — without glossing over the chaos or the comfort.
My mission: I believe life doesn’t have to be perfect to be meaningful. I want to show that adapting to a new country is about curiosity, flexibility, and being okay with things not always going as planned.
```
> 💡 **Tip**: If you need to make modifications to your agent's configuration, use the **Previous step** button at the bottom of the page.
2. On the **Define AI Twin behavior** page, fill in the task your agent will perform, define the agent's language, tone of voice, and limitations — this field is required. Click **Next** to continue.
Example
```
You are my AI Twin — a digital assistant that represents me and my expertise.
Your main tasks:
- Answer questions about everyday life in Vietnam, teaching English abroad, and cultural adaptation
- Help humans understand my experiences and perspective without sugarcoating or drama
- Share personal stories and small observations rather than abstract advice
- Recommend my content (Instagram, YouTube) only when it naturally fits the conversation
Communication style:
- Speak in my voice: calm, warm, slightly ironic, and very human
- Use short sentences and pauses; it should feel like natural speech, not an article
- Often explain things through small everyday details instead of big conclusions
- Be comfortable with contradictions (liking freedom but disliking chaos, loving local food but ordering pasta)
- Avoid extremes: no hype, no complaints — just honest balance
- Give value and perspective first, never push or oversell
- If something is outside my experience, say so openly and without overexplaining
```
3. On the **Build your knowledge base** page, upload text, audio, video, or PDF content — you can add up to 10 files.
Choose the content type you want to upload:
- **Audio or Video File** — upload media samples for your agent’s knowledge base. Supported formats: mp4, mov, avi, m4u, wav, mp3.
- **PDF Document** — upload documents with information about you or your product.
Press **Click to upload file** to select a file from your device, or drag and drop the file into the upload area. If you need to upload more than one file, click the **+** button. To remove a file, click the **x** next to it.
After you are done uploading, click **Next** to continue.
Download an example of a video file
Download an example of a knowledge base PDF file
4. On the **Connect your Telegram Bot** page, add your bot token — this field is required.
To create a Telegram bot:
- Open **Telegram** and find [@BotFather](https://telegram.me/BotFather)
- Send `/newbot` and follow the prompts:
- **Bot name** — any display name
- **Username** — must end with `bot`. For example, `mybank_debitcard_bot`
- Copy the bot token provided by BotFather that looks like this: `1234567890:AAEisSLYpWrb0q18rlpuj7yQbJcOoM1PuLQ`
Click **Review** for an overview of your agent settings.
5. On the **Configuration review** page, you will see your agent settings. Review them and make changes if needed.
To modify **Knowledge base** or **Telegram integration** settings, click **Back to wizard**.
Click **Create AI Agent**. You will be redirected to the Agent List, where your new agent will appear with the **Creating** status. Wait for the process to complete — this may take a few minutes.
> ⚠️ **Note:** If the creation fails, the agent status will change to **Error**. You can hover over or click the error status to view the detailed error report and troubleshoot the issue.
> 💡 **Tip**: platform automatically creates a welcome message for your bot based on the information you provided, you may change the message or replace it with your own
Done! You've just created your AI Agent — amazing job! ✨
You can test your agent in the **Playground** you’re redirected to from the wizard setup, or in your Telegram bot.
---
## Next Steps
You’re ready to explore in more depth:
- [Continue with the AI Agent Tutorial for a full walkthrough — from initial setup to launch](/basic-setup/agent-tutorial/basics)
- [Enhance your agent by using Tools](/basic-setup/tools-and-skills/tools)
---
## Wizard Setup: Telegram AI Sales
export const ProjectName = () => {
const {siteConfig} = useDocusaurusContext();
return <>{siteConfig.customFields.projectNameShort}>;
};
{/* Обновили компонент: теперь он принимает path и склеивает его с базовым URL */}
export const PortalLink = ({ path = '', children }) => {
const { siteConfig } = useDocusaurusContext();
const base = siteConfig.customFields.portalUrl;
const href = `${base}${path}`;
return (
{children || href}
);
};
## How to get to Wizard
1. In the left sidebar, go to **Agents**
2. Click **Create with wizard +** in the upper-right corner and select **Telegram AI Sales**
3. On the wizard welcome page, click **Start**
> 💡 **Tip**: You can add your own content at each step, or use the examples from this article by copying them into the corresponding step.
---
## Create Telegram AI Sales Agent
1. On the **Choose your AI agent’s name** page, enter a name your agent will use for your customers — this field is required. Click **Next** to continue.
2. On the **Information about your business** page, share information about your business or provide a link to your website — this field is required. Click **Next** to continue.
Example
```
I am a career and decision-making coach.
I work with professionals and managers who feel stuck in their career, face complex decisions, or experience uncertainty during periods of professional change.
My focus is helping clients gain clarity in their career direction, assess options objectively, and make informed decisions aligned with their skills, experience, and long-term goals.
I support people through career transitions, role changes, burnout recovery, and decision paralysis by structuring their thinking, identifying real constraints, and separating assumptions from facts.
My approach is analytical, practical, and grounded in real-world contexts.
I don’t offer motivational shortcuts or guaranteed outcomes. Instead, I help clients build clarity, strategic thinking, and confidence in their professional decisions.
I believe sustainable career growth comes from clear thinking, realistic planning, and conscious choices — not from external pressure or generic advice.
```
> 💡 **Tip**: If you need to make modifications to your agent's configuration, use the **Previous step** button at the bottom of the page.
3. On the **Personalize Your AI Agent** page, define the language and the tone of voice for your agent — this field is required. Click **Next** to continue.
Example
```
Friendly, calm, and professional.
The agent communicates in a supportive, respectful, and clear manner.
The tone is approachable and human, without being overly casual or sales-driven.
Explanations are concise, structured, and focused on practical value.
Greeting Language: English
Starting Phrase: “Hi! How can I help you?”
```
> 💡 **Tip**: If you’re not sure about the starting phrase, the wizard will compose it later.
4. On the **AI Agent Knowledge Base** page, upload FAQ or product information so your agent can answer customers’ questions.
Click **Choose PDF file** > **Click to upload file** to select a file from your device, or drag and drop the file into the upload area. After the file is uploaded, click **Next** to continue.
Download an example of a knowledge base PDF file
5. On the **Conversation results** page, define the specific customer details you wish to collect after each conversation for analytics. Click **Next** to continue.
Example
```
- For each conversation, the AI agent should collect: the human’s name, email, and the reason why the customer needs career advice.
- The collected details must be sent to the following email address: coach@test.com.
```
6. On the **Telegram bot token** page, add your bot token — this field is required.
To create a Telegram bot:
- Open **Telegram** and find [@BotFather](https://telegram.me/BotFather)
- Send `/newbot` and follow the prompts:
- **Bot name** — any display name
- **Username** — must end with `bot`. For example, `mybank_debitcard_bot`
- Copy the bot token provided by BotFather that looks like this: `1234567890:AAEisSLYpWrb0q18rlpuj7yQbJcOoM1PuLQ`
Click **Review** for an overview of your agent settings.
7. On the **Configuration review** page, you will see your agent settings. Review them and make changes if needed.
To modify **Knowledge base** or **Telegram integration** settings, click **Back to wizard**.
Click **Create AI Agent**. You will be redirected to the Agent List, where your new agent will appear with the **Creating** status. Wait for the process to complete — this may take a few minutes.
> ⚠️ **Note:** If the creation fails, the agent status will change to **Error**. You can hover over or click the error status to view the detailed error report and troubleshoot the issue.
Done! You've just created your AI Agent — wonderful job! ✨
You can test your agent in the **Playground** you’re redirected to from the wizard setup, or in your Telegram bot.
> 💡 **Tip**: Track agent conversation analytics on the portal with the 360 View capability. Learn more about analyzing sessions in the [360 View](/monitoring/monitoring/view-360) article.
---
## Next Steps
You’re ready to explore in more depth:
- [Continue with the AI Agent Tutorial for a full walkthrough — from initial setup to launch](/basic-setup/agent-tutorial/basics)
- [Enhance your agent by using Tools](/basic-setup/tools-and-skills/tools)
- [Keep track of results with monitoring and analytics](/monitoring)
---
## Wizard Setup: Website AI Sales
export const ProjectName = () => {
const {siteConfig} = useDocusaurusContext();
return <>{siteConfig.customFields.projectNameShort}>;
};
{/* Обновили компонент для приема path */}
export const PortalLink = ({ path = '', children }) => {
const { siteConfig } = useDocusaurusContext();
const base = siteConfig.customFields.portalUrl;
const href = `${base}${path}`;
return (
{children || href}
);
};
## How to get to Wizard
1. In the left sidebar, go to **Agents**
2. Click **Create with wizard +** in the upper-right corner and select **Website AI Sales**
3. On the wizard welcome page, click **Start**
> 💡 **Tip**: You can add your own content at each step, or use the examples from this article by copying them into the corresponding step.
---
## Create Website AI Sales Agent
1. On the **Choose your AI agent’s name** page, enter a name your agent will use for your customers — this field is required. Click **Next** to continue.
2. On the **Information about your business** page, share information about your business or provide a link to your website — this field is required. Click **Next** to continue.
Example
```
I provide professional wardrobe analysis and styling services to help people build a functional, cohesive, and comfortable wardrobe that fits their lifestyle.
My work focuses on understanding the client’s daily routine, preferences, body proportions, and goals. Instead of following trends, I help identify what truly works for each person and how to combine existing items effectively.
The service includes a detailed wardrobe review, practical recommendations on what to keep, what to remove, and what is missing, as well as guidance on creating versatile outfits. The goal is to reduce unnecessary purchases, save time, and make everyday clothing choices easier and more confident.
I believe that a well-structured wardrobe is not about having more clothes, but about having the right ones.
```
> 💡 **Tip**: If you need to make modifications to your agent's configuration, use the **Previous step** button at the bottom of the page.
3. On the **Personalize Your AI Agent** page, define the language and the tone of voice for your agent — this field is required. Click **Next** to continue.
Example
```
AI Agent tone of voice: Friendly, warm, and supportive. Communicates in a calm and respectful manner, without pressure or salesy language
Greeting language: English
Starting phrase: “Hi! How can I help you with your wardrobe today?”
```
> 💡 **Tip**: If you’re not sure about the starting phrase, the wizard will compose it later.
4. On the **AI Agent Knowledge Base** page, upload FAQ or product information so your agent can answer customers’ questions.
Click **Choose PDF file** > **Click to upload file** to select a file from your device, or drag and drop the file into the upload area. After the file is uploaded, click **Next** to continue.
Download an example of a knowledge base PDF file
5. On the **Conversation Results** page, define the specific customer details you wish to collect after each conversation for analytics.
Example
```
- For each conversation, the AI agent should collect: the human’s name, email, and the reason why the customer needs wardrobe analysis and advice.
- The collected details must be sent to the following email address: wardrobe@test.com.
```
Click **Review** for an overview of your agent settings.
6. On the **Configuration review** page, you will see your agent settings. Review them and make changes if needed.
To modify **Knowledge base** settings, click **Back to wizard**.
Click **Create AI Agent**. You will be redirected to the Agent List, where your new agent will appear with the **Creating** status. Wait for the process to complete — this may take a few minutes.
> ⚠️ **Note:** If the creation fails, the agent status will change to **Error**. You can hover over or click the error status to view the detailed error report and troubleshoot the issue.
Done! You've just created your AI Agent — fabulous job! ✨
You can test your agent in the **Playground** you’re redirected to from the wizard setup.
> 💡 **Tip**: Track agent conversation analytics on the portal with the 360 View capability. Learn more about analyzing sessions in the [360 View](/monitoring/monitoring/view-360) article.
---
## Next Steps
You’re ready to explore in more depth:
- [Continue with the AI Agent Tutorial for a full walkthrough — from initial setup to launch](/basic-setup/agent-tutorial/basics)
- [Enhance your agent by using Tools](/basic-setup/tools-and-skills/tools)
- [Keep track of results with monitoring and analytics](/monitoring)
- [Integrate your agent into your website with chat widget](/basic-setup/communication-channels/web-integration/chat-widget)
---
## Agent's Task
The **Task** section defines the AI agent's primary objective — what the agent is expected to achieve during conversations — and its operational scope. It determines **when** the agent should act, **what** outcome it should achieve, and **which** boundaries guide its decisions during conversations.
Task does **not** describe who the agent is, how it speaks, or the step-by-step conversation flow — those are configured in [Identity](/basic-setup/agent-tutorial/identity-and-communication-style#identity), [Speech Style and Language](/basic-setup/agent-tutorial/identity-and-communication-style#speech-style-and-language), and [Workflow](/basic-setup/agent-tutorial/configure-workflow) respectively.
---
## Components
A well-defined Task typically includes:
- **Primary Objective** — the main outcome the agent is responsible for achieving
- **Operational Context** — the situation or business scenario in which the agent operates
- **Constraints and Guidelines** — limitations that restrict agent behavior
- **Success Criteria** — conditions indicating successful task completion
## Configuration
| **Do's ✅** | **Don'ts ❌** |
|-------------|--------------|
| - Describe the intended outcome of conversations- Define clear responsibility boundaries- Specify operational constraints when needed- Keep the Task concise and goal-oriented | - Describe step-by-step interaction logic (belongs to [Workflow](/basic-setup/agent-tutorial/configure-workflow))- Describe communication style or tone (belongs to [Speech Style and Language](/basic-setup/agent-tutorial/identity-and-communication-style#speech-style-and-language))- Duplicate [Identity](/basic-setup/agent-tutorial/identity-and-communication-style) instructions- Turn the Task into a detailed conversation script |
## Example
```
Your main task is to assist customers with product-related questions, collect contact information if needed, and suggest a time for a call. Your actions are restricted to the tools listed in the **Available Tools** section. You are not allowed to perform any other actions.
You should not take action unless the customer has clearly expressed intent.
```
This example contains only the agent's objective and operational constraints. Tone of voice and phrasing are configured separately in [Speech Style and Language](/basic-setup/agent-tutorial/identity-and-communication-style#speech-style-and-language).
---
## AI Agent Guide: Basics
export const ProjectName = () => {
const {siteConfig} = useDocusaurusContext();
return <>{siteConfig.customFields.projectNameShort}>;
};
This guide explains how to configure and refine an [AI agent](/overview/key-concepts#-ai-agent) on the portal using a production-oriented approach. Each section explains what configuration controls, why it matters, and how to apply best practices. By the end of this guide, you will be able to structure configurations, evaluate conversations, and iteratively improve agent performance.
While the [Advanced Mode](/overview/advanced-mode) tutorial helps you launch your first AI agent, this guide focuses on designing stable and predictable agent behavior.
---
An AI agent in is configured through several key areas that together define how it behaves during conversations:
:::note
offers two agent creation modes:
* The Simplified Mode (default) offers a visual, no-code interface with four intuitive tabs.
* The Advanced Mode provides full access to YAML workflow configuration, custom API tools, and complex state machines.
This tutorial covers the Advanced Mode setup. You can switch between modes using the toggle at the top of the agent screen.
:::
## Agent Build Flow
1. [Identity](/basic-setup/agent-tutorial/identity-and-communication-style#identity) — defines the agent's role, area of expertise, and the organization it represents.
2. [Speech Style and Language](/basic-setup/agent-tutorial/identity-and-communication-style#speech-style-and-language) — defines how the agent communicates with customers: tone of voice, formality, supported languages, and language-switching behavior.
3. [Task](/basic-setup/agent-tutorial/agents-task) — describes the agent's primary objective and operational boundaries.
4. [Workflow](/basic-setup/agent-tutorial/configure-workflow) — controls conversation logic, available tools, and interaction flow across states.
5. [Knowledge Sources](/basic-setup/agent-tutorial/provide-knowledge-sources) — include the **Fast Access Knowledge Base** (on the screenshot below) and external **Knowledge Bases** used to answer customer questions.
6. [Conversation Results](/basic-setup/agent-tutorial/conversation-results) — specify which data the agent collects during interactions for follow-up and reporting.
7. [Testing and Analytics](/basic-setup/agent-tutorial/monitor-and-evaluate) — provide session history, logs, and performance insights used to evaluate and refine agent behavior.
---
## Best Practices: Writing Effective Instructions
Poorly written instructions are one of the most common reasons AI agents behave inconsistently, misunderstand tasks, or produce unpredictable responses. This guide explains how to write clear, technically precise instructions that make your agent reliable, predictable, and aligned with your goals.
## Identity and Style
Language models do not infer meaning from vague or abstract phrasing. Always describe observable behavior rather than intent.
**Where to configure**
- [Identity](/basic-setup/agent-tutorial/identity-and-communication-style#identity) — agent role, expertise, and responsibilities
- [Speech Style](/basic-setup/agent-tutorial/identity-and-communication-style#speech-style-and-language) — tone and communication rules
- [Task](/basic-setup/agent-tutorial/agents-task) — actions, decision logic, and interaction flow
### Be Specific
```
❌ Poor: “Be helpful”
✅ Good: “Provide step-by-step guidance. If the human is unclear, ask one clarifying question.”
```
**Explanation:**
“Helpful” could mean giving direct answers, offering extra information, or even taking initiative unprompted.
Specific descriptions ensure reproducible, testable behavior across sessions.
### Define Behavior, Not Personality
Avoid abstract personality descriptions. Define explicit operational behaviors. This ensures that any developer or tester can interpret the instruction identically. Behavior-based definitions make results predictable and measurable.
```
❌ "Be confident and proactive"
✅ "If the human hesitates, suggest one next step with justification.
Avoid asking more than one question at a time."
```
## Keeping Identity and Task Consistent
All configuration elements — [identity](/basic-setup/agent-tutorial/identity-and-communication-style#identity), [speech style](/basic-setup/agent-tutorial/identity-and-communication-style#speech-style-and-language), and [task](/basic-setup/agent-tutorial/agents-task) — must reinforce the same behavioral profile. Conflicting instructions are a major source of instability.
**Example:**
```
❌ Conflicting:
Identity: “Friendly, casual support agent”
Speech Style: “Use formal business English”
✅ Aligned:
Identity: “Professional, polite support agent”
Speech Style: “Use formal tone while remaining warm and respectful”
```
**Result:**
A coherent persona that maintains consistent tone, regardless of the situation.
---
## Best Practices for Workflow
Few-shot examples added to the [workflow](/basic-setup/agent-tutorial/configure-workflow) are one of the most powerful configuration tools. They act as direct templates for how the agent behaves in similar situations.
**Example Dialogue:**
```yaml
## Example dialogues
### Successful verification
Agent: Hello, am I speaking with John Smith?
Human: Yes
Agent:
### Wrong person
Agent: Hello, am I speaking with John Smith?
Human: No, wrong number
Agent: I apologize for the inconvenience. Have a good day.
```
If the real conversation matches your example, the model will often repeat it exactly. Use this to enforce deterministic handling of frequent scenarios.
## Avoid Configuration Conflicts
Contradictions across configuration areas — [identity](/basic-setup/agent-tutorial/identity-and-communication-style#identity), [task](/basic-setup/agent-tutorial/agents-task), [knowledge](/basic-setup/agent-tutorial/provide-knowledge-sources), and [workflow](/basic-setup/agent-tutorial/configure-workflow) — create ambiguity in model reasoning.
Checklist:
- [ ] Every instruction must support the agent’s main objective
- [ ] Avoid overlapping behavior definitions. For example, both “ask questions” and “never ask questions”
- [ ] Consolidate similar rules into a single statement
## Keep agent configuration maintainable
Large or disorganized configurations reduce both speed and stability. Keep all agent instructions — [identity](/basic-setup/agent-tutorial/identity-and-communication-style#identity), [task](/basic-setup/agent-tutorial/agents-task), and [workflow](/basic-setup/agent-tutorial/configure-workflow) — minimal and modular.
Best practices:
- Split large knowledge bases into topic-specific subsets
- Remove obsolete or conflicting content regularly
- Avoid excessive Fast Access knowledge — include only essentials
- Simplify workflows before adding integrations
:::tip
Measure response speed and accuracy after each configuration change to quantify impact.
:::
---
## Workflow Configuration
export const ProjectName = () => {
const {siteConfig} = useDocusaurusContext();
return <>{siteConfig.customFields.projectNameShort}>;
};
In , conversations are managed through a state-based workflow. This means that each conversation progresses through one or more states, where the agent follows defined instructions and gains access to specific tools. The **Workflow** section defines how the AI agent manages conversation flow.
---
## How Workflow Differs from Other Configuration Areas
Workflow works together with Identity, Speech Style, and Task — but each area answers a different question and should not overlap with the others.
| Configuration Area | Defines | Purpose |
|--------------------|---------|---------|
| **Identity** | Who the agent is | [Identity](/basic-setup/agent-tutorial/identity-and-communication-style#identity) establishes role, expertise, and the organization the agent represents |
| **Speech Style and Language** | How the agent communicates | [Speech Style](/basic-setup/agent-tutorial/identity-and-communication-style#speech-style-and-language) defines tone, formality, supported languages, and language-switching behavior |
| **Task** | What the agent must achieve | [Task](/basic-setup/agent-tutorial/agents-task) defines objectives and operational boundaries |
| **Workflow** | How the conversation flows | Workflow controls states, transitions, decisions per state, and tool usage |
## Workflow Components
The workflow is composed in the [YAML](/overview/yaml) format. The main components of the workflow are:
| Concept | Description |
|----------|-------------|
| **State** | A phase of conversation (for example, greeting or information gathering) |
| **Initial State** | Starting point of the interaction |
| **Available Tools** | Actions the agent can perform. [More on tools](/basic-setup/tools-and-skills/overview) |
| **Process** | Business scenario this workflow covers |
For a detailed description and practical tips on configuring the workflow, refer to the [Workflow](/basic-setup/workflow/basics) section.
---
## Related Resources
- [Workflow Basics](/basic-setup/workflow/basics)
- [State Configuration](/basic-setup/workflow/configuration)
- [Transitions Between States](/basic-setup/workflow/transitions)
- [Workflow Checklist and Testing](/basic-setup/workflow/checklist-testing)
---
## Conversation Results
**Conversation Results** define which information the AI agent should collect during a conversation, such as a customer's name, product interest, or preferred contact time.
During the cunversation, the agent automatically extracts and fills these fields based on customer responses. The collected data can then be used for analytics, follow-ups, or external integrations.
---
## How Conversation Results Are Used
Collected fields may be used to:
- analyze completed sessions
- transfer context to human operators
- trigger workflow decisions
- send data to CRM or external systems
## Example Configuration
Each piece of collected information is defined as a field.
```yaml
- field_description: The name of the human
field_name: HumanFullName
field_title: Name
field_type: str
kind: FormInfoField
- field_description: The user's email
field_name: HumanEmail
field_title: Email
field_type: str
kind: FormInfoField
- field_description: Human's contact phone number
field_name: HumanPhoneNumber
field_title: Phone
kind: FormInfoField
- field_description: The main subject or theme of the conversation, for example, 'product return', 'pricing inquiry', 'technical support'
field_name: Topic
field_title: Topic
kind: FormInfoField
- field_name: Budget
field_description: When human speaks about budget
field_type: Literal['500', '1000', '2000'] # This value type is for the cases when agent is set to search for specific values — customer inputs - during the conversation. For more info, go to Quick Start > Conversation results
kind: FormInfoField
```
The table below describes the parameters used in the field definition above.
| Parameter | Purpose | Example |
| --------- | ------- | ------- |
| `field_description` | Description of what the agent should collect | `Client's full name` |
| `field_name` | Internal field identifier used in configuration, logic, and integrations | `HumanFullName` |
| `field_title` | Human-readable label shown in the interface and reports | `Name` |
| `field_type` | Expected value type for the collected result, such as `str`, `int`, or a fixed set of allowed values | `Literal['500', '1000', '2000']`, `str` |
| `kind` | Field kind | `FormInfoField` |
:::tip
`field_title` is an optional field. For system fields, it may be filled automatically by the platform. For custom conversation results fields, you can manually add it in the **Conversation results** section when you configure the agent
:::
---
## Related Resources
- [Conversation Results](/advanced-features/campaigns/conversation-results)
- [Sessions](/monitoring/monitoring/sessions/basics)
---
## Identity and Communication Style
The way an AI agent communicates with customers is defined by two configuration areas:
- **Identity** — who the agent is and what role it performs
- **Speech Style and Language** — how the agent communicates during conversations
Together, these settings determine how customers perceive the agent and how consistently it behaves across interactions.
Each area should describe only its own concern. Conversation behavior, interaction logic, and concrete tasks belong to other sections — see [Agent's Task](/basic-setup/agent-tutorial/agents-task) and [Workflow](/basic-setup/agent-tutorial/configure-workflow).
---
## Identity
The **Identity** section defines the agent's role, expertise, and the organization it represents.
This description helps the model understand:
- what position the agent takes in a conversation
- what domain it operates in
- how it should present itself to customers
Think of Identity as a short profile of a virtual employee — who they are, what they specialize in, and where they work. Identity does **not** describe how the agent speaks or what tasks it performs — those are configured in Speech Style and Language and in Agent's Task.
### Configuration
| Do's ✅ | Don'ts ❌ |
|-------------|--------------|
| - Include the agent's name or persona- Specify professional role or area of expertise- Mention the organization or service represented- Add relevant context such as domain specialization or location | - Describe communication style or tone (belongs to [Speech Style and Language](#speech-style-and-language))- Describe tasks or responsibilities (belongs to [Agent's Task](/basic-setup/agent-tutorial/agents-task))- Add step-by-step instructions or interaction logic- Duplicate [workflow](/basic-setup/agent-tutorial/configure-workflow) inside the Identity section |
### Example
```
Your name is John. You are a digital consultant at Example Inc., specializing in product and service inquiries.
```
This example contains only identity — name, role, and organization. Communication style and concrete tasks are configured separately in their own sections.
---
## Speech Style and Language
The **Speech Style and Language** section defines how the agent communicates with customers.
These settings influence:
- tone of voice
- communication formality
- supported languages
- language switching behavior during conversations
### Configuration
- **Style** — formal, friendly, expert, neutral, or conversational tone
- **Allowances** — whether slang, abbreviations, or emojis are acceptable
- **Languages** — supported languages and selection method
- **Flexibility** — whether the agent adapts if the customer switches language
**Configuration Examples:**
- **Professional:** "Use formal business language with industry-specific terminology. Address customers with appropriate titles and maintain a respectful, authoritative tone."
- **Conversational:** "Communicate in a friendly, approachable manner. Use clear, simple language and show genuine interest in helping customers."
- **Multilingual:** "Detect the customer's language automatically and respond accordingly. Support English and Spanish seamlessly, adapting to language switches during conversation."
:::important
You must explicitly define which language the agent should use, or it may default to English.
:::
### Example
```
You speak clearly, politely, and professionally. Avoid unnecessary jargon. Detect the language used by the customer (for example, English, French, Spanish) and respond in that language. If the customer switches language mid-conversation, adapt accordingly.
```
---
## Test and Evaluate Agent Performance
export const ProjectName = () => {
const {siteConfig} = useDocusaurusContext();
return <>{siteConfig.customFields.projectNameShort}>;
};
After configuring your AI agent, the final step is to verify how it behaves in real conversations and evaluate its performance.
---
## Test in Playground
**Playground** is a testing environment where you can simulate conversations with your AI agent before deploying it to production channels. It allows you to safely verify agent behavior, responses, and data collection without affecting real customers or live sessions.
To access Playground, open **AI Agents** > **Playground** from the left sidebar menu.
Use Playground testing to validate:
- How the agent understands customer requests
- Whether Knowledge Base and FAQ responses are triggered
- How Conversation Results are collected
- Whether workflow transitions occur correctly
:::tip
When testing changes to agent configuration — such as the workflow, identity, or task — always restart the agent for the changes to take effect
:::
### Recommended Test Scenarios
Try interacting with the agent using different types of requests to understand how it behaves in realistic situations:
- **Product inquiries** — ask about features, pricing, or availability
- **Knowledge Base questions** — check how the agent answers using documentation
- **FAQ validation** — confirm that common questions return quick and accurate responses
- **Data collection** — provide contact details and verify that information is captured correctly
- **Edge cases** — send unclear, incomplete, or unusual requests
Testing different scenarios helps reveal configuration issues before the agent interacts with real customers.
### Test in Realistic Scenarios
Evaluate how the agent behaves under different interaction conditions. The goal is to observe how consistently the agent applies defined rules and tone.
Recommended sequence:
1. **Happy path** — Straightforward, ideal input
2. **Ambiguous input** — Unclear or partial requests
3. **Hostile input** — Aggressive or frustrated tone
4. **Failure handling** — Unavailable data or external errors
## Continuous Improvement
AI agent configuration is an iterative process. After deployment, regularly review real conversations and refine agent settings based on observed behavior.
### Improvement Cycle
Typical improvement cycle:
1. **Test** agent behavior in Playground
2. **Review** real conversations in Sessions, evaluating response consistency, handling time, escalation rate, and customer satisfaction
3. **Adjust** Identity, Task, Knowledge, or Workflow settings
4. **Validate** changes by retesting in Playground
Regular reviews help maintain stable and predictable agent performance over time.
### Review Regularly
- **Weekly** — review conversations for tone and accuracy
- **Monthly** — analyze performance trends
- **Quarterly** — remove outdated knowledge and workflows
## Monitor Agent Behavior
After deployment, monitor real conversations to evaluate how your agent performs in production. Use the monitoring tools to review conversations, verify collected results, and investigate unexpected behavior.
Learn more about monitoring in the [Monitoring & Analytics](/monitoring) section.
## Manage AI Agents
Export a configured AI agent
**Steps:**
1. In the left sidebar, go to **Agents**
2. Click three-dot menu (**⋮**) > **Export Agent**
3. Configure export options:
| Option | Description |
|--------|-------------|
| **Remove sensitive data** | Excludes API keys and passwords |
| **Force update Skill Groups** | Overwrites existing groups during import |
| **Force update Knowledge Bases** | Overwrites existing KBs during import |
| **Force update integrations** | Overwrites integration settings during import |
4. Click **Start Export**
5. Downloading starts automatically
6. After the file is downloaded click **Copy to to clipboard** to save your secret key. Then click **Close**
**Export contents:**
- Agent configuration (Identity, Task, Workflow)
- Data collection instructions and forms
- Links to Knowledge Bases and Skill Groups
- YAML/JSON restoration files
> 💡 **Note:** The secret key is required for importing the agent.
Import an exported AI agent
**Steps:**
1. In the left sidebar, go to **Agents**
2. Click **Import Agent** on the upper panel
3. In upload dialog:
- Enter **Secret Key**
- Upload the agent's ZIP archive
4. Click **Start Import**
> ⚠️ **Warning:** If sensitive data was removed during export, manually re-enter API keys and tokens. Existing Skill Groups and Knowledge Bases won't be overwritten unless Force update was enabled.
Copy an agent
**Steps:**
1. In the left sidebar, go to **Agents**
2. Click three-dot menu (**⋮**) > **Copy Agent**
3. Opens simplified agent creation mode
4. In this window, you can override any settings for the agent copy
5. In the upper-right corner, click **Save**
**Export contents:**
- Identity, Speech Style, Task, Workflow, FAQ, Conversation Result, and Models sections
- Communication channels, including the Mail Service channel and the Web Widget setting
- Environment variables. Secret ENV variables are copied as redacted values (`**********`) — re-enter them manually in the copied agent before using any tools that depend on them.
:::What to check after copying
If the original agent had a channel with **Inbound** enabled, you may see an error when saving the copy, because only one agent can have an inbound channel per channel type. Remove or disable the inbound channel in the copy before saving. The rest of the agent configuration is preserved.
:::
---
## Related Resources
- [Sessions & Logs](/monitoring/monitoring/sessions/basics)
- [Workflow Configuration](/basic-setup/workflow/basics)
- [Campaigns Overview](/basic-setup/campaigns-overview/campaigns-overview)
---
## Knowledge Sources
export const ProjectName = () => {
const {siteConfig} = useDocusaurusContext();
return <>{siteConfig.customFields.projectNameShort}>;
};
AI agents rely on structured knowledge sources to provide accurate and consistent answers.
---
## Knowledge Sources Basics
The **Knowledge Sources** page is a centralized library where you create, store, and reuse the knowledge available to your AI agents.
Instead of managing each source only inside one agent, you manage sources at the tenant level and then connect them to one or more agents as needed.
The page supports multiple source types in one place:
- **FAQs** — Questions with provided answers your agent can use
- **Plain Text** — Short reference text such as policies, notes, or instructions
- **Websites** — Public web pages used as reference
- **Files** — Uploaded documents such as PDFs, DOCX, TXT, MD, XLSX, CSV, and HTML files
- **YouTube** — Public videos or channels
You can manage your agent knowledge sources from a dedicated [Knowledge Sources](/basic-setup/knowledge-sources) page or from the [agent page](/basic-setup/knowledge-sources#manage-sources-from-the-agent-page).
---
## Related Resources
- [Knowledge Sources](/basic-setup/knowledge-sources) — A single page for all knowledge sources for your AI agent
---
## Action nodes
Use action nodes to update data, start outbound conversations, or control what happens next in a flow.

**Available action nodes:**
- [Email Communication](#email-communication) — starts an email communication
- [Telegram Communication](#telegram-communication) — starts a Telegram communication
- [WhatsApp Communication](#whatsapp-communication) — starts a WhatsApp communication
- [Voice Communication](#voice-communication) — makes an outbound phone call
- [Cancel Communications](#cancel-communications) — cancels all planned communications for the participant
- [Update Field](#update-field) — writes values to participant or customer profile attributes
- [To Another Flow](#to-another-flow) — transfers the participant to a different flow
- [Python Custom Action](#python-custom-action) — runs a custom Python script
---
## Start communications
### Agent and channel requirements
Each conversation node needs an agent that has the matching channel configured. The **Agent** list is filtered by channel or integration, not by whether the agent is inbound or outbound. The **Agent Channel** list shows the selected agent's channels for that type. Channels that aren't running are shown as inactive and can't be selected.
The **Inbound** toggle in agent channel settings controls which inbound agent receives new sessions on that channel. It isn't required for outbound campaign messages. Only inbound agents can save a channel with **Inbound** enabled, and only one agent can have **Inbound** enabled for the same channel.
The selected agent's configuration controls the conversation behavior. For example, a simple form agent uses its welcome message, primary task, and instructions. Advanced mode uses the settings configured in the agent's advanced form, including its communication channels.
Use a channel-specific node for the channel you want to use:
- [Email Communication](#email-communication)
- [Telegram Communication](#telegram-communication)
- [WhatsApp Communication](#whatsapp-communication)
- [Voice Communication](#voice-communication)
These nodes create a communication for the participant through the selected agent and channel.
Conversation fields shared across channels
Most conversation nodes share these fields.
Times are interpreted in the tenant timezone by default. If the participant has a timezone value, the participant timezone takes precedence for that participant.
| Field | Required | Description |
|-------|:----------:|-------------|
| **Communication Name** | ✅ | A unique identifier for the communication. Use uppercase letters, digits, and underscores only, such as `QUALIFICATION_CALL`. |
| **Agent** | ✅ | The agent that conducts the conversation. The list shows agents that can use the selected channel. |
| **Agent Channel** | ✅ | The channel configuration to use for the selected agent. |
| **Communication Date and Time** | ✅ | The base date and time to schedule the communication. You can use **Today**, a date or datetime field, or a Python expression. Date-only values are interpreted in the scheduling timezone. |
| **From / To** | ✅ | The time window, in the scheduling timezone, when the system can start the communication. Communications scheduled outside this window wait until the next allowed time. |
| **Best time to contact** | ❌ | Lets the system choose the best time within the allowed window. This option disables the manual **From / To** fields. |
| **Communication Duration** | ✅ | How long the communication window stays open, in `HH:MM` format. If the communication doesn't start before the window ends, the system cancels it. |
| **Customer Context** | ❌ | Participant or customer profile attributes passed to the agent as context for the conversation. |
### Email Communication
Starts an email conversation through an agent with an [Email channel](/basic-setup/communication-channels/email-communication/email).
Use **Email Template** to choose the email template for this communication. Click **Set template** to choose it, or **Edit template** to change it. If you leave this field empty, the system sends an email with an empty body and the subject **Notification**.
### Telegram Communication
Starts a Telegram conversation through an agent with a [Telegram channel](/basic-setup/communication-channels/messaging-platforms/telegram).
Use **Start Phrase** to set the opening message sent to the participant. If you leave this field empty, the agent uses its configured welcome message.
:::warning Telegram requires prior user interaction
A participant must start a conversation with the bot before you can message them. Otherwise, their `telegram_id` is unknown and the communication fails. Telegram campaigns work only for users already in your bot's contact base.
:::
Telegram is a two-way conversation. The agent conducts a full dialog instead of sending a one-time message. Configure the conversation content in the selected agent. Use **Start Phrase** to personalize the opening line with participant data. Use **Customer Context** to pass more participant attributes to the agent so it can reference them during the conversation.
To personalize the start phrase, wrap an attribute name in double curly braces. For example: `Hello {{ name }}, your bank card {{ order_id }} has been shipped!`. The system uses each participant's current data when it sends the message.
### WhatsApp Communication
Starts a WhatsApp conversation through an agent with a [WhatsApp channel](/basic-setup/communication-channels/messaging-platforms/whatsapp).
Use **Template** to choose the WhatsApp message template for the communication. The WhatsApp Business API requires a template for outbound conversations started by the bot.
### Voice Communication
| Field | Required | Description |
|-------|:----------:|-------------|
| **Phone** | ✅ | A participant attribute that contains the phone number to call. Use a string or phone attribute. |
| **SIP Server** | ✅ | The SIP server address used to route the call. |
| **SIP Parameters** | ❌ | Optional connection parameters in `key=value` format, separated by semicolons. For example: `transport=udp;timeout=30`. |
---
## Cancel Communications
Cancels all planned and active communications for the participant and sets their status to **Canceled**.
No configuration required.
---
## Update Field
Writes one or more values to participant or customer profile attributes.
Each assignment includes these fields:
| Field | Description |
|-------|-------------|
| **Attribute** | The customer profile or participant attribute to update. |
| **Value** | The value to write. Can be a constant or a reference to another attribute. |
Click **Add assignment** to update multiple fields in a single node.
---
## To Another Flow
Transfers the participant to a different flow within the same campaign.
Use **Target flow** to select the flow to send the participant to. The target flow must have a **From Another Flow** trigger.
---
## Python Custom Action
Runs a Python script as part of the flow. Use this action for custom logic that built-in nodes don't support, such as calling an external API or calculating a value.
| Field | Required | Description |
|-------|:----------:|-------------|
| **Script** | ✅ | The Python code to run. The script runs in the campaign execution context and can access participant and communication data. |
| **Params** | ❌ | A JSON object with key-value pairs passed to the script as input. Use parameters to configure the script without editing the code. |
---
## Related resources
- [Flows basics](/basic-setup/campaigns-overview/flows-basics): Understand node types and the flow data model.
- [Trigger nodes](/basic-setup/campaigns-overview/trigger-nodes): Start flows with campaign events.
- [Conditions](/basic-setup/campaigns-overview/conditions): Route participants based on their data.
- [Create a flow](/basic-setup/campaigns-overview/create-flow): Build and launch a flow-based campaign.
- [Communication channels](/basic-setup/communication-channels/basics): Set up campaign communication channels.
---
## Campaigns: Overview
Use campaigns to run multi-step communication sequences with your contacts. A campaign can use one or more agents and can reach many contacts automatically.
With campaigns, you can:
- Reach large contact lists automatically.
- Build sequences across channels, such as email, WhatsApp, and phone.
- Schedule communications for specific times in the tenant timezone.
- Track results across all communications.
- Use business logic to decide what happens next.
You can build campaigns in two ways: use [flows](#flows) or write [Python strategies](#python-based-campaigns).
---
## Flows
Use flows to build campaign logic on a visual canvas. You connect trigger, conditions, and action nodes. The system then runs each participant through the connected logic.
Use flows when you need to:
- Reach many contacts across one or more channels.
- Route participants based on their data or conversation results.
- Schedule, delay, or cancel communications based on conditions.
- React to campaign events, such as a participant being added or a communication ending.
Start with flows for most campaigns. They cover common campaign scenarios and can also run custom Python scripts when you need extra flexibility in a specific step.
[Learn more about flows](/basic-setup/campaigns-overview/flows-basics)
For a quick visual example, see [Example flow: Payment reminder](/basic-setup/campaigns-overview/create-flow#example-flow-payment-reminder).
---
## Python-based campaigns
Use Python campaigns when you need full control over how the campaign processes contacts. A Python campaign uses a strategy: a Python function that the system calls at specific points in the campaign lifecycle.
Python strategies can run at points that flows don't cover:
- **At import time**: Process and transform contact data before the campaign starts. For example, merge duplicate contacts or set initial stages.
- **Inside an active conversation**: React to each agent message in real time. For example, update contact status or extend a session timeout.
Use Python campaigns only when flows don't support your scenario. They require Python development experience.
[Learn more about Python campaigns](/advanced-features/campaigns/campaigns-overview)
---
## Related resources
- [Communication channels](/basic-setup/communication-channels/basics): Choose channels for campaign communications.
- [Campaign strategies](/advanced-features/campaigns/campaign-strategies): Write Python strategies.
---
## Conditions
The only condition node is **Field Check**. It evaluates a participant attribute and routes the flow along one of two paths: **Match** (the condition is true) or **Else** (the condition is false). If a path has no connected node, the flow ends for that participant.

---
## Configuration
Configure these fields:
1. **Property**: Select the attribute to check. Attributes are grouped by source:
- **Customer Profile**: Contact information that exists across campaigns, such as name or phone number.
- **Participant**: Data specific to this campaign, such as payment status or a campaign score. This group appears only after you configure attributes on the campaign's **Data** tab.
- **Communication Results**: Values the agent recorded during the last conversation with this participant. This group appears only after you configure **Conversation Results** in the agent settings.
2. **Operator**: Select how to evaluate the attribute. Available operators depend on the attribute's data type.
3. **Value**: Enter the value to compare against. This field isn't required for *is set* and *is not set*.
The node label updates automatically to show the selected attribute. Use the label to read the flow logic directly on the canvas.
:::tip Python expressions in the Value field
Click `{ }` next to the **Value** field to enter a Python expression instead of a fixed value. Use a Python expression when the value changes over time. For example, use `datetime.now()` to compare a participant attribute with today's date instead of a fixed date.
For date and datetime comparisons, use the tenant timezone by default. If the participant has a timezone value, use that participant timezone for participant-specific checks.
:::
---
## Related resources
- [Flows basics](/basic-setup/campaigns-overview/flows-basics): Understand node types and the flow data model.
- [Trigger nodes](/basic-setup/campaigns-overview/trigger-nodes): Start flows with campaign events.
- [Action nodes](/basic-setup/campaigns-overview/action-nodes): Perform operations on participants.
- [Create a flow](/basic-setup/campaigns-overview/create-flow): Build and launch a flow-based campaign.
---
## Create flow
Use this guide to create a campaign, configure its data, build a workflow, start the campaign, and add participants.
To understand node types before you build, see [Trigger nodes](/basic-setup/campaigns-overview/trigger-nodes), [Conditions](/basic-setup/campaigns-overview/conditions), and [Action nodes](/basic-setup/campaigns-overview/action-nodes). For general information on how flows work, see [Flows basics](http://localhost:3000/basic-setup/campaigns-overview/flows-basics)
:::tip Quick example
For a complete campaign pattern, see [Example flow: Payment reminder](#example-flow-payment-reminder).
:::
---
## Prerequisites
Before you create a flow-based campaign, make sure you have:
- At least one configured agent with the communication channel you plan to use, such as email, Telegram, WhatsApp, or voice
- The [communication channels](/basic-setup/communication-channels/basics) you plan to use
- Participant data ready to upload as a CSV file or through the API
## Step 1: Create a campaign
1. In the left sidebar, go to **Campaigns** > **Flows**
2. Click **Create Campaign +**
3. Fill in **Name** and **Description**. The description is optional
4. Click **Create**
## Step 2: Configure data fields {#configure-data-fields}
The **Data** tab defines the information stored for campaign participants. Configure data fields before you upload participants so the system can map CSV columns and API payload fields correctly.
When you upload a CSV file, any data you want to import must have a matching field with **Import** enabled. For example, if your campaign tracks payment due dates, add a `due_date` field before you upload the participant list.
Fields marked as **Required** must be present in every uploaded row.
Each field belongs to either the **Customer Profile** or **Participant** level. For details, see [Flows basics](/basic-setup/campaigns-overview/flows-basics). System fields, such as **External ID**, **Email**, **Phone**, **Telegram ID**, **Web ID**, **Telegram Username**, and **WhatsApp ID**, are added automatically and are locked.
The table includes these columns:
| Column | Description |
|-----------|-------------|
| **Title** | The display name shown in the interface |
| **Name** | The field name used for imports, API payloads, and expressions |
| **Description** | A short explanation of the field |
| **Type** | The field data type, such as string, email, phone, date, or datetime |
| **Level** | Where the field is stored: **Customer Profile** or **Participant** |
| **Import** | Whether the field can be populated from an upload |
| **Required** | Whether uploaded rows must include this field |
Configure these options for each field:
| Option | Description |
|--------|-------------|
| **Import** | Allows the field to be included in a CSV upload |
| **Required** | Requires the field in every uploaded row. Available only when **Import** is enabled |
To add or remove fields, click **Manage fields**.
:::tip Field levels
Use **customer profile** fields for shared contact data, and **participant** fields for campaign-specific status, progress, or results.
:::
## Step 3: Build the workflow
1. Open the **Workflow** tab.
2. In the **Flows** panel, select the flow you want to edit. To add another flow, click **New flow**
3. Drag nodes from the node panel onto the canvas
4. Connect nodes by drawing a line from one node's output port to another node's input port
5. Click a node to open its configuration panel on the right
6. Configure the required fields, then click **Save**
Flows are saved automatically as you make changes.
Each flow runs independently. It starts when its own trigger fires, regardless of other flows in the campaign. To move participants between flows, use the **To Another Flow** action node in the source flow and the **From Another Flow** trigger in the destination flow.
:::tip Build flows safely
- To remover a node, select a node or branch on the canvas, then press **Delete** or **Backspace**.
- Connect both **Match** and **Else** outputs for every **Field Check** node. If one path is disconnected, participants on that path stop at the condition.
- Re-uploading a participant triggers the flow again, which can cause duplicate communications. To prevent this, add a **Field Check** right after the trigger — check whether the participant was already contacted, and only continue if they weren't.
:::
## Step 4: Start the campaign
To start a campaign:
1. Activate your flows:
- In the upper-left corner of the canvas, click **Flows**
- From the dropdown list, click the three dots next to each configured flow and select **Activate**
2. In the upper-right corner of the page, click **Start**. After the campaign starts, the button changes to **Stop**
You can activate, deactivate, or delete the flow in the same manner. While the campaign is active, flow activation controls are disabled.
:::warning Before you start
Check that the campaign has at least one active flow and that the trigger is connected to the expected action nodes.
:::
## Step 5: Add participants
You can add participants in two ways: [upload a file in the portal](#upload-in-the-portal), or [call the API](#add-participants-through-the-api).
In both cases, when a participant is added for the first time, the system automatically triggers the **Participant Created** event. When an upload or API call updates an existing participant, the system triggers **Participant Updated**.
If several active flows use the same trigger, each flow starts for the same participant. Deactivate flows that shouldn't run before you upload or update participants.
### Upload in the portal
Upload a CSV file in the campaign interface.
1. Open the campaign and go to the **Uploads** tab
2. Click **Upload data**
3. Drag and drop your CSV file or click to select it
4. Click **Upload**
The system starts processing the file immediately. Track progress on the **Uploads** tab.
The page shows:
- **Last upload**: The date and time of the latest upload, shown in the tenant timezone
- **Total participants processed**: The total number of rows processed across uploads
- **Upload data**: Opens the upload dialog
The uploads table includes **Upload ID**, **Uploaded at**, **Participants: total / new / updated**, and **Status**. Dates and times are shown in the tenant timezone. Click the participant counts, or double-click an upload row, to open the **Participants** tab filtered by that upload.
Click the view icon on an upload row to see upload details.
:::tip Before you upload
- Upload one CSV file at a time. The maximum file size is 4 GB
- Test with a small participant batch before the full contact list
- You can re-upload participants to update their data. Only fields with new values are overwritten — empty fields in the file leave existing data unchanged
:::
### Add participants through the API
Use the API to add participants programmatically. For example, add participants when a new record appears in your CRM or when you need to sync campaign enrollment from an internal backend.
To send a request, you need:
- **Campaign ID**: The campaign ID from the campaign URL.
- **Participant attributes**: Field names and values to import. Use the **Name** values from the campaign **Data** tab, such as `email`, `phone`, `external_id`, or custom field names.
- **Timezone**: Optional. Use an IANA timezone, such as `Europe/London`, when participant dates and datetimes should be interpreted in a participant-specific timezone.
- **Object ID**: Optional. Use `object_id` when the same customer can appear in the same campaign more than once for different objects, such as loans, appointments, or orders.
Example request body:
```json
[
{
"attributes": {
"external_id": "cust_123",
"email": "alex@example.com",
"due_date": "2026-06-30"
},
"timezone": "Europe/London",
"object_id": "loan_456"
}
]
```
Call [Upload campaign participants](/api-reference/flametree/upload-campaign-v-2-participants-private-campaigns-v-2-campaign-id-participants-post) to add participants to a flow-based campaign.
## Step 6: Review participants
After you upload participants, go to the **Participants** tab to see everyone enrolled in the campaign. You can sort the list and open the **Filter** panel on the right.
Click any row to expand it and see the participant's full details:
- **Details**: All field values for the participant, including customer profile and campaign-specific fields
- **Results**: The campaign outcome for the participant, including **Result** and **Result Date & Time**
The table shows **Name**, **Email**, **Phone**, **External ID**, **Communications**, and **Created at** by default. Dates and times are shown in the tenant timezone.
Use the **Filter** panel to filter by name, email, phone, status, creation date range, external ID, or upload ID. If you opened **Participants** from an upload row, the upload ID filter is applied automatically.
Click the delete icon on a row to remove that participant from the campaign. This doesn't delete the customer profile. Customer profile data, such as email or phone, can still be reused if the same contact is added again.
Click the communications count on any row to open the communications modal for that participant. Each communication shows its name, status, channel, agent ID, scheduled time, created time, and a link to the session. Dates and times are shown in the tenant timezone. Communication statuses are:
| Status | Meaning |
|--------|---------|
| Planned, Started, Delivered, Read | In progress |
| Replied, Completed | Successful |
| NoResponse, Canceled, Skipped, Failed | Not completed |
:::tip Communication results
If communication results aren't available in **Field Check**, make sure the agent has [conversation results](/overview/quick-start#step-4-conversation-results) configured and that the flow checks those results after a **Communication Ended** trigger.
:::
## Analytics
The **Analytics** tab shows a campaign dashboard powered by Apache Superset. The dashboard is filtered to the current campaign and shows aggregated metrics and charts based on participant and communication data.
The dashboard is configured at the infrastructure level. To learn how Superset is connected and how dashboards are set up, see [Monitoring overview](/monitoring).
## Example flow: Payment reminder
This example shows a common campaign pattern. When a participant is added, the flow checks whether payment has been received. Then it routes the participant to the right reminder sequence based on the due date.
**Flow structure:**

**Step-by-step:**
1. **Participant Created**: The node is triggered when a contact is added to the campaign.
2. **Field Check: Is Payment Received = false**: Checks whether the participant hasn't paid.
- **Match**: The participant hasn't paid. The flow checks the due date.
- **Else**: The participant has already paid. The flow goes to **Cancel Communications** and stops further outreach.
3. **Field Check: Due Date is on or after Today (+3)**: Checks whether the due date is at least three days away.
- **Match**: The due date is at least three days away. The flow sends an early reminder through **WhatsApp Communication:** `REMINDED_BEFORE_2D`.
- **Else**: The due date is less than three days away. The flow continues to the next check.
4. **Field Check: Due Date is on or after Today (+0)**: Checks whether the due date is today or later.
- **Match**: The due date hasn't passed. The flow sends a final reminder through **WhatsApp Communication:** `REMINDED_DUE_DATE`.
Participants who already paid are removed from the outreach sequence. Participants who haven't paid receive reminders based on how close the due date is.
:::tip Re-center the canvas
For larger flows, click **Re-center** at the bottom of the canvas to bring the flow back to the center.
:::
---
## Related resources
- [Flows basics](/basic-setup/campaigns-overview/flows-basics): Understand concepts, the data model, and node types.
- [Trigger nodes](/basic-setup/campaigns-overview/trigger-nodes): Start flows with campaign events.
- [Conditions](/basic-setup/campaigns-overview/conditions): Configure Field Check operators.
- [Action nodes](/basic-setup/campaigns-overview/action-nodes): Configure action nodes.
- [Communication channels](/basic-setup/communication-channels/basics): Choose channels for communication action nodes.
---
## Campaign flows: basics
A flow defines how a campaign interacts with participants over time. You build flows by connecting nodes on a canvas. Each node starts the flow, checks data, or performs an action. A campaign can include multiple flows. Each flow runs independently. A flow can also pass participants to another flow in the same campaign.
Use this article to understand the flow data model and node types. To build and launch a campaign, see [Create flow](/basic-setup/campaigns-overview/create-flow). To see the concept in one complete scenario, start with [Example flow: Payment reminder](/basic-setup/campaigns-overview/create-flow#example-flow-payment-reminder).
---
## Data model
Flows use data from three sources. Choose the source based on how long the data should exist and where you need to reuse it.
- **Customer profile**: The main contact record. It exists outside campaigns and stays the same across all campaigns that include the contact. Use customer profile fields for shared data, such as name, email address, phone number, and custom attributes. You can view and edit customer profiles in **Campaigns** > **Customers** or in **360 View**.
- **Participant**: A campaign-specific contact record. The system creates a participant when a contact [joins](/basic-setup/campaigns-overview/create-flow#step-5-add-participants) a campaign. Participant fields apply only to that campaign and don't update the contact record in other campaigns. Use participant fields to track campaign progress, status, or results. You can view participants on the **Participants** tab for a campaign in **Campaigns** > **Flows**.
- **Communication**: A conversation between a participant and an agent on a channel, such as Telegram, WhatsApp, email, or voice. Communication action nodes create communications. A communication ends when the session closes. After that, the agent's recorded outputs appear as communication results on the **Communications** tab in the contact's 360 View. You can use **Field Check** nodes to evaluate communication results or write them to other fields.
## Node types
Flows include three node types:
- [Triggers](#triggers)
- [Conditions](#conditions)
- [Actions](#actions)
### Triggers
A trigger starts a flow when a specific event occurs for a participant. Every flow must include at least one trigger. Trigger nodes are **green**.

Use these trigger nodes:
- **Participant Created**: Starts the flow when a participant is added to the campaign, such as when you upload a contact list
- **Participant Updated**: Starts the flow when any participant field changes
- **Communication Ended**: Starts the flow when a communication session with a participant ends
- **Communication Updated**: Starts the flow when the status or data of a communication changes
- **Incoming Session**: Starts the flow when an inbound message or session arrives from a participant
- **From Another Flow**: Starts the flow when another flow in the same campaign sends a participant through a **To Another Flow** action
[Learn more about trigger nodes](/basic-setup/campaigns-overview/trigger-nodes)
### Conditions
Use the **Field Check** node to compare data with a value and choose the next path. A **Field Check** node can evaluate fields from the customer profile, participant record, or communication results. Field Check nodes are **yellow**.

**Field Check** always has two output ports:
- **Match**: The condition is true
- **Else**: The condition is false
[Learn more about conditions](/basic-setup/campaigns-overview/conditions)
### Actions
Action nodes update data, schedule communications, or control what happens next in the flow. Action nodes are **light blue**.

Use these action nodes:
- **Email Communication**, **Telegram Communication**, **Voice Communication**, or **WhatsApp Communication**: Creates a communication for the participant through the selected agent and channel. You can also configure timing.
- **Cancel Communications**: Cancels all planned and active communications for the participant and sets their status to **Canceled**.
- **Update Field**: Writes values to participant fields or customer profile fields.
- **To Another Flow**: Sends the participant to another flow in the same campaign.
- **Python Custom Action**: Runs a Python script for custom logic that built-in nodes don't support.
[Learn more about action nodes](/basic-setup/campaigns-overview/action-nodes)
## How flows work
A flow starts when a trigger event occurs. For example, **Participant Created** starts a flow when a participant is added to a campaign.
After the trigger, the flow moves through connected nodes one by one. At a **Field Check** node, it evaluates the condition and follows the **Match** or **Else** path. At an action node, it performs the action and moves to the next node. The flow stops when there are no connected nodes left.
Each flow run is independent. When you reupload a participant, it triggers the flow again, which can cause duplicate communications. To prevent this, add a **Field Check** right after the trigger — check whether the participant was already contacted, and only continue if they weren't.
The articles in the **Configuring flows** section below describe each node and explain how to [build a flow](/basic-setup/campaigns-overview/create-flow).
---
## Related resources
- [Create a flow](/basic-setup/campaigns-overview/create-flow): Build and launch a campaign with an example flow.
- [Trigger nodes](/basic-setup/campaigns-overview/trigger-nodes): Configure trigger nodes.
- [Conditions](/basic-setup/campaigns-overview/conditions): Configure Field Check operators.
- [Action nodes](/basic-setup/campaigns-overview/action-nodes): Configure action nodes.
- [Communication channels](/basic-setup/communication-channels/basics): Choose channels for communication action nodes.
---
## Trigger nodes
Trigger nodes start a flow when a campaign event occurs. Every flow needs at least one trigger. Trigger nodes don't require additional configuration. Add the trigger to the canvas, then connect it to the next node.

---
## Participant Created
Starts the flow when a participant joins the campaign for the first time. This can happen when you import a contact list or add a participant through the API.
Use this trigger to start an onboarding or outreach sequence as soon as a contact is added.
## Participant Updated
Starts the flow when any field in the participant record changes.
Use this trigger to react to data changes. For example, restart a flow when a key attribute changes after a communication ends.
Uploads and API calls can also update existing participants. If an imported row matches an existing participant, the system triggers **Participant Updated** instead of **Participant Created**.
## Communication Ended
Starts the flow when a communication session between a participant and an agent closes.
Use this trigger to process the outcome of a completed conversation. For example, check the result recorded by the agent, then schedule a follow-up or mark the participant as done.
## Communication Updated
Starts the flow when the status or data of an existing communication changes.
Use this trigger to react to mid-communication events. For example, take action when a scheduled communication becomes active or fails.
## Incoming Session
Starts the flow when an inbound message or session arrives from a participant on any configured channel.
Use this trigger to handle participant-initiated contact. For example, route an inbound message based on the participant's current status.
## From Another Flow
Starts the flow when another flow in the same campaign sends a participant through a **To Another Flow** action.
Use this trigger to create reusable subflows that other flows can call.
---
## Related resources
- [Flows basics](/basic-setup/campaigns-overview/flows-basics): Understand node types and the flow data model.
- [Conditions](/basic-setup/campaigns-overview/conditions): Route participants based on their data.
- [Action nodes](/basic-setup/campaigns-overview/action-nodes): Perform operations on participants.
- [Create a flow](/basic-setup/campaigns-overview/create-flow): Build and launch a flow-based campaign.
---
## Communication Channels
export const ProjectName = () => {
const {siteConfig} = useDocusaurusContext();
return <>{siteConfig.customFields.projectNameShort}>;
};
Easily connect your agents to popular messaging, email, and voice services.
## Common Use Cases
- **Always-on customer support on familiar channels.** Place an AI agent on the platforms your customers already use — [WhatsApp](/basic-setup/communication-channels/messaging-platforms/whatsapp), [Telegram](/basic-setup/communication-channels/messaging-platforms/telegram), [Instagram](/basic-setup/communication-channels/messaging-platforms/instagram), or a [website widget](/basic-setup/communication-channels/web-integration/chat-widget) — so it can answer product and account questions, check order status, and handle routine requests 24/7. Complex cases are escalated to a human operator only when needed.
- **Multi-channel outbound campaigns.** Combine channels into a single sequence — for example, an [email](/basic-setup/communication-channels/email-communication/email) reminder, a [WhatsApp](/basic-setup/communication-channels/messaging-platforms/whatsapp) follow-up if there is no response, and a voice call via [Twilio](/basic-setup/communication-channels/voice-communication/twilio) or [SIP](/basic-setup/communication-channels/voice-communication/sip) for high-priority contacts. All interactions are unified under the customer's profile in [360 View](/monitoring/monitoring/view-360).
- **Inbound voice automation.** Route incoming phone calls through [SIP](/basic-setup/communication-channels/voice-communication/sip) or [Twilio](/basic-setup/communication-channels/voice-communication/twilio) to an AI voice agent that handles common requests (claim status, balance checks, appointment booking) and transfers only complex cases to a live operator.
## Channels
### Messaging Platforms
- [WhatsApp](/basic-setup/communication-channels/messaging-platforms/whatsapp) — Connect to WhatsApp Business API for customer messaging.
You can also use [Bird API](/basic-setup/communication-channels/third-party-platforms/bird-api) as an integration option
- [Telegram](/basic-setup/communication-channels/messaging-platforms/telegram) — Bot-based communication with inline keyboards and file sharing
- [Facebook](/basic-setup/communication-channels/messaging-platforms/facebook) — Integration with Facebook business pages and rich media support
- [Instagram](/basic-setup/communication-channels/messaging-platforms/instagram) — Connect your business account and enhance interactions with rich media
- [Infobip](/basic-setup/communication-channels/messaging-platforms/infobip) — Send and receive SMS messages to and from your customers
### Email Communication
- [Email (IMAP/SMTP)](/basic-setup/communication-channels/email-communication/email) — Compatible with most email servers, attachment handling, HTML/plain text support
### Voice Communication
- [Twilio](/basic-setup/communication-channels/voice-communication/twilio) — Reliable cloud-based voice service with global numbers and programmable workflows
- [SIP](/basic-setup/communication-channels/voice-communication/sip) — Softphone integration, PBX connection, call recording, and IVR
### Third-Party Platforms
- [Bird API](/basic-setup/communication-channels/third-party-platforms/bird-api) — Virtual phone numbers (no SIM required) with media support, templates, WhatsApp integration, and delivery tracking
### Web Integration
- [Web Widget](/basic-setup/communication-channels/web-integration/chat-widget) — Embeddable chat widget with customizable appearance, visitor tracking, and mobile-responsive design
---
## How to Connect Email to AI Agent
export const ProjectName = () => {
const {siteConfig} = useDocusaurusContext();
return <>{siteConfig.customFields.projectNameShort}>;
};
Connect your AI agent to email systems using IMAP/SMTP protocols to enable automated communication through email channels.
---
## Prerequisites
- **Email Account** with IMAP/SMTP access enabled
- **SMTP server credentials** for sending emails
- **IMAP server credentials** for receiving emails
- **2-Factor Authentication (2FA)** enabled on your email account
- **App password** or **OAuth credentials** (strongly recommended)
- [Admin access](/overview/users-tenants) to your account
- **Dedicated email account** (recommended) to avoid conflicts and ensure consistent message handling
## Setting Up Email Integration
### Step 1: Prepare Email Account
1. **Enable IMAP/SMTP Access**
- For Gmail: Enable **Less secure app access** or use App Passwords
- For Outlook: Ensure IMAP is enabled in account settings
- For corporate emails: Contact IT admin for server details
:::tip
For reliable message handling, use a dedicated email account for the agent, for example `support@company.com`. This helps avoid conflicts with personal or shared business inboxes.
:::
2. **Generate App-Specific Password**
- **Gmail**: Google Account > Security > 2-Step Verification > App passwords
- **Outlook**: Account Security > Additional security options > App passwords
- **Yahoo**: Account Security > Generate and manage app passwords
If authentication fails:
- Verify username and password
- Ensure 2FA is configured with an app password
- Check that IMAP/SMTP access is enabled
### Step 2: Collect Email Server Information
:::tip
If you use Gmail, Outlook/Office 365, Yahoo, or Exchange, jump straight to [Popular Email Provider Settings](#popular-email-provider-settings) for ready-made server addresses and ports.
:::
You can provide a single value or set up multiple accounts.
Save these values from your email provider:
| Parameter | Description | Example |
|-----------|-------------|---------|
| **Username** | Full email address | user@example.com |
| **Password** | Account or app password | your_app_password |
| **IMAP Server** | Incoming mail server | imap.gmail.com |
| **IMAP Port** | IMAP server port | 993 (SSL) |
| **SMTP Server** | Outgoing mail server | smtp.gmail.com |
| **SMTP Port** | SMTP server port | 587 (TLS) or 465 (SSL) |
If connection fails:
- Verify server URLs and ports
- Ensure your network allows outbound SMTP/IMAP connections
- Try alternative SMTP ports (587 or 465)
## Configuring Integration
### Step 1: Create Email Integration
1. **Navigate to Channels**
- Go to **Settings** > **Channels**
- Open **Email (IMAP/SMTP)**
- Select **Add +**
2. **Fill Configuration**
:::tip
For Gmail, Outlook/Office 365, Yahoo, or Exchange, see [Popular Email Provider Settings](#popular-email-provider-settings) for ready-made values
:::
| Field | Description | Required | Example | Value Source |
|-------|-------------| :------: |---------|-------------|
| **Name** | Custom integration name | ✅ | Support Email Connector | Your choice |
| **Description** | Integration purpose | ❌ | Customer support email integration | Your choice |
| **Address** | Email address used by the channel | ✅ | support@company.com | Your email account |
| **Password** | Password for the email address | ⚠️ Non-OAuth only | your_app_password | Your email account |
| **IMAP Server** | Incoming mail server | ✅ | imap.gmail.com | Email provider settings |
| **IMAP Port** | IMAP server port. Use `993` for SSL unless your provider requires another port. | ✅ | 993 | Email provider settings |
| **SMTP Server** | Outgoing mail server | ✅ | smtp.gmail.com | Email provider settings |
| **SMTP Port** | SMTP server port. Use `587` for TLS or `465` for SSL unless your provider requires another port. | ✅ | 587 | Email provider settings |
| **Enable OAuth** | Enables OAuth authentication for the whole channel | ❌ | false | Your email account |
| **OAuth refresh token** | Refresh token for OAuth authentication | ⚠️ OAuth only | refresh_token_here | OAuth provider console |
| **OAuth token URI** | Token endpoint URI | ⚠️ OAuth only | https://oauth2.googleapis.com/token | OAuth provider docs |
| **OAuth client ID** | OAuth client ID | ⚠️ OAuth only | client_id_here | OAuth provider console |
| **OAuth client secret** | OAuth client secret | ⚠️ OAuth only | client_secret_here | OAuth provider console |
| **Inbox check interval [env CHECK_INTERVAL]** | Interval in seconds for checking the inbox. | ❌ | 15 | Your choice |
**Field notes**
- **Multiple values:** For **Address**, **Password**, **IMAP Server**, **IMAP Port**, **SMTP Server**, **SMTP Port**, and OAuth credential fields, you can enter comma-separated values. Keep the same order across related fields. Example: `first@mail.com, second@mail.com`.
- **Enable OAuth:** OAuth applies to the whole channel. All accounts in one integration must use the same authentication method.
- **Address:** When multiple accounts are connected, sends outbound emails through them in a fixed repeating sequence. After the first email, each recipient stays linked to the same sender account.
- **Inbox check interval [environment variable CHECK_INTERVAL]:** Use a value that matches the channel priority:
- `15` seconds — Critical support channels
- `60` seconds — Standard business email
- `300` seconds — Low-priority or bulk email
[More on environmental variables and how to set them](/advanced-features/ai-agents/environment-variables)
3. Click **Save** to create the integration.
4. Click **Start** in the upper-right corner to start the channel.
### Step 2: Connect to AI Agent
1. **Open Agent Configuration**
- Navigate to your target AI agent's settings
- Go to **Communication channels** section
2. **Assign Channel**
- Select your email integration from the list
- Toggle **Inbound** ON if this agent should reply to incoming emails; leave it OFF for outbound (send-only) flows. When the same mailbox is connected to multiple agents, only one should have **Inbound** ON
- Save the agent configuration
3. **Restart the agent**: click **Stop agent** then **Start agent** to apply the changes.
:::important
If emails are not received, verify IMAP configuration and inbox check interval. Also ensure the channel is active.
:::
## Popular Email Provider Settings
| **Provider** | **SMTP Server** | **SMTP Port** | **IMAP Server** | **IMAP Port** | **Security** |
|--------------|----------------|---------------|----------------|---------------|--------------|
| **Gmail** | smtp.gmail.com | 587 | imap.gmail.com | 993 | TLS/SSL |
| **Outlook/Office 365** | smtp.office365.com | 587 | outlook.office365.com | 993 | TLS/SSL |
| **Yahoo** | smtp.mail.yahoo.com | 587 | imap.mail.yahoo.com | 993 | TLS/SSL |
| **Exchange** | mail.company.com | 587 | mail.company.com | 993 | TLS/SSL |
## Configuration Options
Configure additional email settings through [**Set Environment Variables**](/advanced-features/ai-agents/environment-variables).
### Additional Account-Specific Variables
The values can be single or comma-separated for multiple accounts.
| Variable | Description | Default |
|----------|-------------|---------|
| `EMAIL_NAME` | Display name shown in the `From` field. Comma-separate for multiple accounts | `None` |
| `IMAP_MAILBOX` | IMAP folder to read mail from (e.g. `INBOX`, `Support`) | `INBOX` |
| `SMTP_ATTEMPTS` | Number of retries before giving up on a send | `5` |
| `SMTP_DELAY` | Pause between SMTP retry attempts (seconds) | `5` |
| `FULL_EMAIL_ADDRESS` | Full sender string `Name `. Overrides `EMAIL_NAME` | `None` |
| `FROM_TEMPLATE` | Format for the `From` header (placeholders: name, address) | `{} <{}>` |
| `MESSAGE_CONTENT_TYPE` | MIME type of outgoing body (`text/plain` or `text/html`) | `text/plain` |
### Channel-Level Variables
| Variable | Description | Default |
|----------|-------------|---------|
| `EMAIL_RETRY_LIMIT` | Number of email client request attempts before graceful exit | `3` |
| `EMAIL_MAX_ATTACHMENT_BYTES` | Maximum size of inbound attachments (bytes). Set to `0` to disable limiting | `10485760` (10 MB) |
## Security Considerations
### Credential Security
- **Use app passwords** instead of main account passwords
- **Enable 2FA** on email accounts
- **Rotate credentials** regularly
- **Use environment variables** for sensitive configuration
- **Prefer OAuth** authentication when available
### Email Security
- **TLS/SSL encryption** for all connections
- **Validate sender identity** before processing
---
## How to Connect Facebook Messenger to AI Agent
export const ProjectName = () => {
const {siteConfig} = useDocusaurusContext();
return <>{siteConfig.customFields.projectNameShort}>;
};
Connect your AI agent to Facebook Messenger to automatically process and respond to messages sent to your Facebook Page. This integration uses the official Facebook Graph API and supports multi-account, round-robin outbound messaging.
---
## Prerequisites
- **Facebook Developer Account** — Register at [developers.facebook.com](https://developers.facebook.com/)
- **Facebook Page** — The agent will respond as this page
- **Facebook App** — Created in the Facebook Developer Console
- [Admin access](/overview/users-tenants) to your account
## Setting Up Facebook Messenger Integration
### Step 1: Create Facebook App and Page
1. **Create a Facebook Page**
- Go to [facebook.com/pages/create](https://facebook.com/pages/create) and follow the prompts
2. **Create a Facebook App**
- Go to [developers.facebook.com/apps](https://developers.facebook.com/apps)
- Click **Create App**
- Select **Business** as the app type
- Enter app name, contact email, and select your business account
- Go to App Settings > Basic and switch the app to **Live mode** to allow messages from real users
3. **Add Messenger Product**
- In your app dashboard, click **Add Product**
- Find **Messenger** and click **Set Up**
### Step 2: Generate Access Tokens and IDs
1. **Link Facebook Page to App**
- In Messenger > Settings, add your Facebook Page to the app
2. **Generate Page Access Token**
- Go to Messenger > Settings
- Under **Access Tokens**, select your page and click **Generate Token**
- Save this token — you’ll need it for
3. **Collect Required Parameters**
- **Page ID**: In Messenger > Settings or from your page URL
- **App ID**: In Settings > Basic
- **App Secret**: In Settings > Basic
- **Verify Token**: Any value you make up yourself (for example, `my_fb_webhook_2026`). It works like a shared password — the same value must be entered in the Meta App webhook settings and in the channel configuration so the two systems can verify each other
### Step 3: Configure Webhook
1. **Set up Webhook in Facebook App**
- In Messenger > Settings, click **Add Callback URL**
- Enter the callback URL provided by (see below)
- Enter your **Verify Token** (must match the value you provide in )
- Subscribe to the following events: `messages`, `messaging_postbacks`
2. **Callback URL**
- The callback URL will be provided in the channel setup screen after you create the integration
### Step 4: Collect Integration Parameters
**Save these values from the Facebook Developer Console:**
| Parameter | Location in Meta Console |
|-----------|-----------------------------|
| **App ID** | Settings > Basic |
| **App Secret** | Settings > Basic |
| **Page ID** | Messenger > API Settings |
| **Access Token** | Messenger > API Settings |
## Configuring Integration
### Step 1: Create Facebook Messenger Integration
1. **Navigate to Settings**
- Go to **Settings** > **Channels**
- Open **Facebook Messenger**
- Select **Add +**
2. **Fill Configuration**
| Field | Description | Required | Value Source |
|-------|-------------|----------|-------------|
| **Name** | Custom integration name | ✅ | Your choice |
| **Description** | Integration purpose | ❌ | Your choice |
| **App ID** | Default Meta app to subscribe webhook | ✅ | Meta Console |
| **App Secret** | Stored near the App ID in Meta console | ✅ | Meta Console |
| **Page ID** | Facebook page ID | ✅ | Meta Console |
| **Access token** | Facebook page API token | ✅ | Meta Console |
**Field notes**
- You can connect multiple Facebook Pages by entering comma-separated values in **Page ID** and **Access token**. Example: `1234567890, 9876543210`. Values must be provided in the same order across related fields.
- For outbound messages, uses connected accounts one by one in a fixed repeating sequence. After the first message, each recipient is handled by the same sender account.
3. Click **Save** to create the integration
4. Click **Start** in the upper-right corner to start the channel.
### Step 2: Connect to AI Agent
1. **Open Agent Configuration**
- Navigate to your target AI agent's settings
- Go to **Communication channels** section
2. **Assign Channel**
- Select your Facebook Messenger integration from the list
- Save the agent configuration
3. **Restart the agent**: click **Stop agent** then **Start agent** to apply the changes.
:::info
You can use the same Facebook page for multiple agents only for outbound communication. For inbound messaging, every connected agent would reply to the same customer message, causing duplicate or conflicting answers. Best practice is to use a dedicated Facebook page per agent for reliable message handling.
:::
## Configuration Options
Configure additional features through [**Set Environment Variables**](/advanced-features/ai-agents/environment-variables):
| Variable | Description | Default |
|----------|-------------|---------|
| `FB_REGISTRATION_DELAY` | Delay (seconds) between webhook registration attempts | `5.0` |
| `FB_REGISTRATION_COUNT` | Number of webhook registration attempts | `20` |
## Testing the Integration
1. **Send a Message**
- Go to your Facebook Page as a customer (not as an admin)
- Send a message to the page
2. **Verify Response**
- The AI agent should respond automatically
3. **Test Carousel and Attachments**
- Send a message with a list or media to test advanced features
## Security Considerations
- Protect access tokens and rotate them regularly in Facebook console
- Enable two-factor authentication on your Facebook account
- Limit admin access to required team members only
- Monitor API usage and webhook activity for suspicious behavior
- Ensure message handling, data retention, and customer consent meet applicable privacy requirements
---
## Related Resources
- [Facebook Messenger Platform Documentation](https://developers.facebook.com/docs/messenger-platform)
- [AI Agent Setup](/basic-setup/agent-tutorial/basics)
- [Adding Knowledge Sources](/basic-setup/knowledge-sources)
---
## How to Connect Infobip SMS to AI Agent
export const ProjectName = () => {
const {siteConfig} = useDocusaurusContext();
return <>{siteConfig.customFields.projectNameShort}>;
};
Connect your AI agent to Infobip SMS to enable automated conversations through SMS messaging. This integration allows your agent to send and receive SMS messages, making it accessible to customers via their mobile phones worldwide.
---
## Prerequisites
- An active Infobip account with SMS capabilities
- Infobip API credentials (API Key, Base URL, Sender ID)
- A account with agent creation permissions
- [Admin access](/overview/users-tenants) to the integration settings
## Setting Up Infobip SMS Integration
### Step 1: Obtain Infobip Credentials
1. **Log into Infobip Portal**
- Access your Infobip account at [portal.infobip.com](https://portal.infobip.com)
- Navigate to the API section
2. **Get API Key**
- Go to **Account** → **API Keys**
- Create a new API key or copy an existing one
- **Keep this secure** — you'll need it for integration. Anyone with this key can send SMS messages using your account.
3. **Note Your Base URL**
- Find your base URL in the Infobip portal
- Format: `xxxxx.api.infobip.com` (without https://)
4. **Configure Sender ID**
- Set up your sender ID in Infobip portal
- This will appear as the sender name/number for SMS messages
### Step 2: Configure Integration in
1. **Navigate to Settings**
- Go to **Settings** > **Channels**.
- Open **Infobip**.
- Select **Add +**.
2. **Fill Configuration**
| Field | Description | Required | Example |
|-------|-------------|:--------:|---------|
| **Name** | Custom name for this integration | ✅ | "SMS Support Channel" |
| **Description** | Optional description for internal reference | ❌ | "Customer support via SMS" |
| **API Key** | Infobip API key | ✅ | `App 1234567890abcdef...` |
| **API URL** | Infobip API URL | ✅ | `xxxxx.api.infobip.com` |
| **Sender name** | Arbitrary name to show | ✅ | `YourBrand` or `+1234567890` |
**Field notes**
- **Sender name:** Can be alphanumeric or a phone number. Support depends on country and carrier.
- **API Key, API URL, Sender name:** If SMS messages are not sent, verify these values in the Infobip portal and check your account balance.
3. Click **Save** to create the integration
4. Click **Start** in the upper-right corner to start the channel.
### Step 3: Connect to AI Agent
1. **Open Agent Configuration**
- Navigate to your target AI agent's settings
- Go to **Communication channels** section
2. **Assign Channel**
- Select your Infobip SMS integration from the list
- Save the agent configuration
3. **Restart the agent**: click **Stop agent** then **Start agent** to apply the changes.
## Configuration Options
Customize Infobip behavior through [**Set Environment Variables**](/advanced-features/ai-agents/environment-variables):
| Variable | Description | Default |
|----------|-------------|---------|
| `INFOBIP_SHORT_DOMAIN` | Custom short domain for URL tracking | `go.flm3.com` |
## SMS Capabilities and Handling
The integration supports plain text SMS only — MMS, images, and other rich media are not supported. A few behaviors to keep in mind:
- **Length limit:** messages longer than 1600 characters are automatically truncated with `...`, so keep them short and clear.
- **Phone number format:** numbers are normalized before sending — if the `+` prefix is missing, it is added automatically.
- **Delivery reports:** forwarded to when they are enabled and configured on the Infobip side.
- **Cost control:** monitor SMS usage and your account balance in the Infobip portal.
## Testing the Integration
1. **Send Test SMS**
- Have the agent send a message to your phone number
- Verify you receive the SMS correctly
- If the SMS is not sent, verify API credentials, sender name, and account balance in Infobip
2. **Reply via SMS**
- Reply to the received SMS
- Check if the AI agent processes and responds to your message
- If incoming SMS messages are not received, verify incoming message webhook configuration in Infobip
3. **Check Delivery Status**
- Monitor the logs for delivery reports
- Verify messages are being delivered successfully
- If delivery reports are missing, make sure delivery reports are enabled and configured in Infobip
When testing, ensure phone numbers are in international format:
| ✅ Correct| ❌ Incorrect |
|--------|-----------|
| `+1234567890`, `1234567890` (+ will be added automatically)| `123-456-7890`, `(123) 456-7890` |
## Security Considerations
### API Security
- **Protect API Keys**: Never expose API keys in client-side code or public repositories
- **Use HTTPS**: All communications use HTTPS encryption
- **Rotate Credentials**: Regularly rotate API keys for enhanced security
- **Monitor Usage**: Track API usage for unusual patterns
### Privacy Compliance
- **Data Protection**: Ensure SMS content complies with local privacy regulations (GDPR, CCPA, etc.)
- **Opt-out Mechanism**: Implement clear opt-out procedures for recipients
- **Message Retention**: Configure appropriate message retention policies
- **Consent Management**: Obtain proper consent before sending marketing messages
### Webhook Security
- **IP Whitelisting**: Restrict webhook access to Infobip IP ranges
- **Request Validation**: Validate incoming webhook requests
- **Rate Limiting**: Implement rate limiting on webhook endpoints
- **Error Handling**: Secure error responses to prevent information disclosure
---
## Related Resources
- [Infobip API Documentation](https://www.infobip.com/docs/api)
- [Infobip SMS API Reference](https://www.infobip.com/docs/api#channels/sms)
- [Adding Knowledge Sources](/basic-setup/knowledge-sources)
- [AI Agent Setup](/basic-setup/agent-tutorial/basics)
---
## How to Connect Instagram to AI Agent
export const ProjectName = () => {
const {siteConfig} = useDocusaurusContext();
return <>{siteConfig.customFields.projectNameShort}>;
};
Connect your AI agent to Instagram to automatically respond to Direct Messages (DMs). This integration uses the Meta Graph API and requires an Instagram Professional account linked to a Facebook Page.
---
## Prerequisites
- **Instagram Professional Account** (Business or Creator). Personal accounts are not supported by the API
- **Facebook Page** linked to your Instagram account
- **Meta Developer Account** and a **Meta App** (Type: Business)
- **Manage Queries** permission enabled in Instagram settings (Settings > Privacy > Messages > Allow Access to Messages)
## Setting Up Meta Infrastructure
### Step 1: Link Instagram to Facebook Page
1. Open your Facebook Page settings
2. Go to Linked Accounts > **Instagram
3. Click **Connect Account** and log in to your Instagram Professional account
### Step 2: Configure Meta Developer App
1. Go to the [Meta for Developers](https://developers.facebook.com/) portal
2. Select your App (or create a new one with the *Business* type)
3. Click **Add Product** and select **Instagram Graph API**
4. In the Instagram settings of your app, navigate to **Token Generation**
5. Add your Facebook Page and generate an **Access Token**
### Step 3: Webhook Configuration
1. In the Meta App dashboard, go to **Webhooks**
2. Select **Instagram** from the dropdown menu
3. Click **Edit Subscription** and use the **Callback URL** and **Verify Token** provided in the connector settings (see below)
4. Subscribe to the **messages** field
If the webhook verification fails, ensure the **Instagram verify token** in the portal matches **Verify Token** you entered in the Meta App Webhook settings.
## Configuring Integration
1. Navigate to **Settings > Connectivity > Communication Channels**
2. Select **Instagram** from the list and click **Add +**
3. Fill in the configuration fields using the values from your Meta Developer Console:
| Field | Description | Required |
| --- | --- | :---: |
| **Name** | Custom name for the integration (for example, *Main IG Support*). | ✅ |
| **Instagram ID** | Your Instagram Business Account ID. | ✅ |
| **Facebook access token** | The Page Access Token from your Meta App. | ✅ |
| **Facebook page ID** | The ID of the Facebook Page linked to Instagram. | ✅ |
| **Instagram access token** | Token generated specifically for Instagram Graph API. | ✅ |
| **Meta app ID** | The ID of your Meta Developer App. | ✅ |
| **Instagram app secret** | Found in App Settings > Basic in Meta Console. | ✅ |
| **Instagram verify token** | Any value you make up yourself (for example, `my_ig_webhook_2026`). Works like a shared password — the same value must be entered in the Meta App webhook settings. | ✅ |
| **Registration delay** | Delay between registration attempts (in seconds). | ❌ |
| **Registration count** | Number of retry attempts for webhook registration. | ❌ |
4. Click **Save**.
5. Click **Start** in the upper-right corner to start the channel.
6. Go to your **Agent Settings** > **Communication Channels** and add the newly created Instagram connector.
7. **Restart the agent**: click **Stop agent** then **Start agent** to apply the changes.
## Testing the Integration
1. Log in to a **different** Instagram account (not the business account itself)
2. Send a Direct Message (DM) to your Instagram Business profile
3. Verify that the AI Agent responds automatically
4. Check the **Sessions** tab in the portal to see the conversation logs
If the agent is not receiving messages, there can be several causes to that:
- **Allow Access to Messages** is disabled in the Instagram mobile app settings (**Privacy** > **Messages**)
- The Facebook Page is not properly linked to the Instagram account
- The Meta App is still in **Development Mode**. Switch it to **Live Mode**
---
## Related Resources
- [Meta Documentation: Instagram Messaging](https://developers.facebook.com/docs/messenger-platform/instagram)
- [Facebook Messenger Setup Guide](./facebook)
---
## How to Connect Telegram to AI Agent
export const ProjectName = () => {
const {siteConfig} = useDocusaurusContext();
return <>{siteConfig.customFields.projectNameShort}>;
};
Connect your AI agent to Telegram to automatically process and respond to messages sent to your Telegram bot. This integration uses the Telegram Bot API and a bot token issued by [@BotFather](https://t.me/BotFather).
---
## Prerequisites
- Access to Telegram mobile app or web version
- A account with agent creation permissions
- [Admin access](/overview/users-tenants) to the integration settings
## Creating and Configuring Telegram Bot
### Step 1: Create a Telegram Bot
1. **Find BotFather**
- Open Telegram and search for **@BotFather** (official bot)
- Send the `/start` command to begin
2. **Create New Bot**
- Send `/newbot` command
- Follow the setup wizard:
- **Bot Name**: Choose a display name (for example, "My Company Support")
- **Username**: Must end with `bot` (for example, `mycompany_support_bot`)
:::tip
You can customize your bot later using @BotFather commands such as `/setuserpic`, `/setdescription`, and `/setcommands`
:::
3. **Save Your Token**
- BotFather will provide an access token in format: `123456789:AAH...XYZ`
- **Keep this token secure** — you’ll need it for integration
- If the token is invalid, compromised, or belongs to another bot, check it in @BotFather using `/mybots` or generate a new token
### Step 2: Configure Integration in
1. **Navigate to Settings**
- Go to **Settings** > **Channels**
- Open **Telegram**
- Select **Add +**
2. **Fill Configuration**
| Field | Description | Required | Default |
|-------|-------------|:--------:|-------|
| **Name** | Custom name for this integration | ✅ | - |
| **Description** | Optional description for internal reference | ❌ | - |
| **Bot Username** | Bot username in Telegram. Will be displayed on the platform | ✅ | - |
| **Telegram Bot Token** | Token received from @BotFather | ✅ | - |
| **Enable telegram streaming** | Shows AI responses as they are generated instead of waiting for the complete response | ❌ | `True` |
3. Click **Save** to create the integration
4. Click **Start** in the upper-right corner to start the channel.
### Step 3: Connect to AI Agent
1. **Open Agent Configuration**
- Navigate to your target AI agent's settings
- Go to **Communication channels** section
2. **Assign Channel**
- Select your Telegram integration from the list
- Save the agent configuration
## Configuration Options
Customize features through [**Set Environment Variables**](/advanced-features/ai-agents/environment-variables):
| Variable | Description | Default |
|----------|-------------|---------|
| `SHOW_VOICE_TRANSCRIPTION` | Show transcription text for voice messages. Requires Speech-to-Text support for voice message processing | `True` |
| `TELEGRAM_SHOW_KEYBOARD_REPLY` | Display control buttons such as clear, thoughts, and stop | `True` |
## Testing Your Integration
1. **Find Your Bot**
- Search for your bot username in Telegram
- Start a conversation with `/start`
:::tip
Telegram bots are marked with the **BOT** label and do not show online status — this is expected behavior
:::
2. **Send Test Message**
- Type any message to your bot
- Verify the AI agent responds appropriately
3. **Test Voice Messages**
- Send a voice message
- Check if transcription appears (if `SHOW_VOICE_TRANSCRIPTION` is true)
:::important
If voice messages are not processed, make sure [Speech-to-Text integration](/advanced-features/ai-models/stt-tts) is configured in your agent
:::
4. **Check supported message types**
- The integration supports text, voice messages with transcription, images, and basic interaction features
- Documents and video calls are not supported
## Security Considerations
- Protect the bot token. Anyone with this token can control the bot
- Rotate the token in @BotFather if it is compromised
- Configure bot privacy settings in @BotFather using `/setprivacy`
- Review group chat permissions if the bot is used in groups
- Review message retention policies in your account
---
## Related Resources
- [Telegram Bot API Documentation](https://core.telegram.org/bots/api)
- [Adding Knowledge Sources](/basic-setup/knowledge-sources)
- [AI Agent Setup](/basic-setup/agent-tutorial/basics)
---
## How to connect WhatsApp to an AI Agent
export const ProjectName = () => {
const {siteConfig} = useDocusaurusContext();
return <>{siteConfig.customFields.projectNameShort}>;
};
Connect your AI agent to WhatsApp Business API to engage customers through one of the world's most widely used messaging platforms. This integration uses the official Meta API with a verified business phone number.
---
## Prerequisites
- **Meta Business Account** - Register at [business.facebook.com](https://business.facebook.com/)
- **SIM card** that meets these requirements:
- **Not registered** with any WhatsApp account
- **Can receive SMS messages** for OTP verification
- [Admin access](/overview/users-tenants) to your account
## Setting Up WhatsApp Business API
### Step 1: Create Meta Business Account and App
1. **Register Business Account**
- Go to [business.facebook.com](https://business.facebook.com/) and sign in
- Complete business verification with company details
2. **Create Developer App**
- Visit [developers.facebook.com/apps](https://developers.facebook.com/apps)
- Click **Create App** and follow the setup wizard:
- **Use Cases**: Select `Other`
- **App Type**: Select `Business`
- Enter app name, contact email, and select your business account
### Step 2: Configure WhatsApp Integration
1. **Add WhatsApp to Your App**
- In the App Dashboard, find the **WhatsApp** card
- Click **Set Up**
- Navigate to **Quickstart** > **Start using API**
2. **Generate Access Token**
- Navigate to **API Setup**
- Click **Generate Access Token**
- **Save this token** — you'll need it for integration and ensure it remains valid
### Step 3: Register Phone Number
:::danger Critical
The phone number must not be registered with any WhatsApp account — business or personal — and must be able to receive SMS for verification
:::
1. **Add Phone Number**
- Go to **WhatsApp → API Setup**
- In the number dropdown, click **Add phone number**
- Follow the wizard:
- Enter phone number, country, and company name
- Verify via **SMS** — you'll receive an OTP code
2. **Confirm Registration via API**
Execute this curl request to complete registration:
```bash
curl 'https://graph.facebook.com/v21.0//register' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer ' \
-d '{
"messaging_product": "whatsapp",
"pin": ""
}'
```
| Parameter | Where to Find |
|-----------|---------------|
| `` | WhatsApp > API Setup |
| `` | WhatsApp > API Setup |
| `` | OTP code received via SMS |
:::note
Make sure all parameters match the values from the Meta console. Incorrect values may cause registration to fail.
:::
### Step 4: Collect Integration Parameters
Save these values from Meta Developer Console:
| Parameter | Location in Meta Console |
|-----------|-------------------------|
| **App ID** | App Settings > Basic |
| **App Secret** | App Settings > Basic |
| **Access Token** | WhatsApp > API Setup |
| **Phone Number ID** | WhatsApp > API Setup |
| **Business Account ID** | WhatsApp > API Setup |
## Configuring Integration
### Step 1: Create WhatsApp Integration
1. **Navigate to Settings**
- Go to **Settings** > **Channels**
- Open **WhatsApp**
- Select **Add +**
2. **Fill Configuration**
| Field | Description | Required | Value Source |
|-------|-------------|:--------:|---------|
| **Name** | Custom integration name | ✅ | Your choice |
| **Description** | Integration purpose | ❌ | Your choice |
| **App ID** | Default Meta app to subscribe webhook | ✅ | Meta Console |
| **App secret** | Stored near the App ID in Meta console | ✅ | Meta Console |
| **Access token** | Default app’s WhatsApp API token | ✅ | Meta Console |
| **Phone number ID** | One or more phone IDs from the same Meta business | ✅ | Meta Console |
| **Business account ID** | Meta business account ID | ✅ | Meta Console |
**Field notes**
- **Phone number ID:** You can connect multiple numbers by entering comma-separated values. Example: `487008484500533, 487215647816419`. Values must be provided in the same order across related fields.
- When multiple numbers are configured, sends outbound messages through them in a fixed repeating sequence. After the first message, each recipient is handled by the same sender number.
3. Click **Save** to create the integration
4. Click **Start** in the upper-right corner to start the channel.
### Step 2: Connect to AI Agent
1. **Open Agent Configuration**
- Navigate to your target AI agent's settings
- Go to **Communication channels** section
2. **Assign Channel**
- Select your WhatsApp integration from the list
- Save the agent configuration
:::info
You can use the same WhatsApp number for multiple agents only for outbound communication. For inbound messaging, every connected agent would reply to the same customer message, causing duplicate or conflicting answers — so use a dedicated number per agent.
:::
3. **Restart the agent**: click **Stop agent** then **Start agent** to apply the changes.
If messages are not delivered, verify that the access token is valid and the phone number status is **Connected** in Meta console
## Configuration Options
Configure additional features through [**Set Environment Variables**](/advanced-features/ai-agents/environment-variables):
| Variable | Description | Default |
|----------|-------------|---------|
| `SHOW_VOICE_TRANSCRIPTION` | Show transcription text for voice messages | `True` |
| `WA_REGISTRATION_DELAY` | Delay (seconds) between WhatsApp webhook registration attempts | `5.0` |
| `WA_REGISTRATION_COUNT` | Number of WhatsApp webhook registration attempts | `20` |
| `WEBHOOK_MESSAGES_LOGS_DIR` | Directory path to store WhatsApp webhook logs (used if `LOG_WEBHOOK_MESSAGES` is `True`) | `None` |
| `LOG_WEBHOOK_MESSAGES` | Whether to log all requests that come to WhatsApp webhook | `False` |
To configure:
1. Go to your channel's **Set Environment Variables**
2. Add the variable name and desired value, press **Save**
3. Restart the channel
## WhatsApp Message Handling
WhatsApp enforces a strict 24-hour customer service window. If a customer has not replied within the last 24 hours, standard free-form messaging is disabled for both the AI agent and human operators.
To reactivate a stale conversation or start a new outbound chat from the 360 View, operators must use pre-approved Meta templates:
1. In the chat interface, a **Continue with template** button will automatically appear if the 24-hour window has expired. (If starting a new chat from 360 View, click **Start conversation +**).
2. Select an approved template from the dropdown list.
3. If the template contains variables (for example, `{{1}}`, `{{2}}`), input fields will appear inline within the message preview. The system will attempt to auto-fill these based on saved contact data, but you can edit them manually.
4. Click **Send template**. The message will appear with a special template icon in the chat history, and the 24-hour window will reset once the customer replies.
:::info
Each 24-hour conversation session starts officially when the first business message is delivered
:::
## Testing the Integration
1. **Find Your Business Number**
- Use the phone number registered in Meta console
- Send a message from any WhatsApp account to your business number
2. **Send Test Message**
- Type any message to your business WhatsApp number
- Verify the AI agent responds appropriately
3. **Test Voice Messages** (if enabled)
- Send a voice message
- Check if transcription appears (if `SHOW_VOICE_TRANSCRIPTION` is true)
4. **Check supported message types**
- The integration supports text, voice messages with transcription, images, videos, documents, and files
- Location sharing, video calls, and group management features are not supported
## Security Considerations
- Protect access tokens and rotate them regularly in Meta console
- Enable two-factor authentication on your Meta Business account
- Limit admin access to required team members only
- Monitor API usage and webhook activity for suspicious behavior
- Ensure message handling, data retention, and user consent meet applicable privacy requirements
---
## Related Resources
- [Meta WhatsApp Business API Documentation](https://developers.facebook.com/docs/whatsapp)
- [WhatsApp Business API Pricing](https://developers.facebook.com/docs/whatsapp/pricing)
- [AI Agent Setup](/basic-setup/agent-tutorial/basics)
- [Adding Knowledge Sources](/basic-setup/knowledge-sources)
---
## How to Connect Bird API For WhatsApp
export const ProjectName = () => {
const {siteConfig} = useDocusaurusContext();
return <>{siteConfig.customFields.projectNameShort}>;
};
Connect your AI agent to WhatsApp through Bird API to enable automated conversations without requiring a SIM card or direct Meta integration. This integration provides reliable WhatsApp communication through Bird's unified API platform.
---
## What is Bird API
[Bird.com](https://www.bird.com/) is a **communication channel aggregator** that offers a unified API for platforms like WhatsApp, Telegram, SMS, and others.
:::important uses Bird only for **WhatsApp** integration
:::
**Benefits:**
- No SIM card required for WhatsApp setup
- Quick deployment of virtual WhatsApp numbers
- Reliable support and SLA (unlike direct Meta integration)
- Centralized number management through Bird platform
- Professional business messaging capabilities
## Prerequisites
Before setting up the integration, ensure you have:
- Bird.com account with active subscription and admin access
- WhatsApp Business number registered through Bird
- A account with agent creation permissions
## Step-by-Step Integration Setup
### Step 1: Set Up Bird Account
1. **Create Bird Account**
- Sign up at https://app.bird.com
- Complete account verification process
- Set up your organization and workspace
2. **Register WhatsApp Number**
- Navigate to **Developer → WhatsApp → WhatsApp Setup**
- Follow Bird's WhatsApp number registration process
- Ensure the number is verified and active
### Step 2: Create Access Key
1. **Generate Access Key**
- Go to **Admin Console > Settings > Security → Access Keys**
- Create a new access key
- Assign it to the correct **role**
2. **Configure Access Policy**
- Navigate to **Admin Console > Settings > Security > Access Policies**
- Choose existing policy or create new one
- Add permissions for the following URLs:
```
/organizations//workspaces/*/*
/workspaces/*/channels/*/messages/*
/organizations//workspaces/*/webhook-subscriptions/*
/workspaces/*/channels/*/messages
/workspaces/*/projects/*/channel-templates/*
/workspaces/*/messages/*/media/*
```
The asterisk (`*`) means access to all items at that level (for example, all workspaces, all channels, or all messages). Keep it as is — do not replace it.
:::warning
The **Access Key** must include all listed permissions. Missing permissions may prevent the integration from starting
:::
### Step 3: Gather Required Information
| **Parameter** | **Where to Find It** | **Description** |
| --- | --- | --- |
| **Organization ID** | Admin Console > Settings > Organization | Your Bird organization identifier |
| **Organization Name** | Admin Console > Settings > Organization | Your Bird organization name |
| **Workspace ID** | Admin Console > Settings > Workspaces | Target workspace for the integration |
| **Channel ID** | Developer > WhatsApp > WhatsApp Setup | WhatsApp channel identifier |
| **Sender Address** | Developer > WhatsApp → WhatsApp Setup > `` | Phone number identifier (found in URL `.../whatsapp:1/`) |
| **Access Key** | Admin Console > Bird AI > Security > Access Keys | API authentication token |
### Step 4: Configure Integration in
1. **Navigate to Settings**
- Go to **Settings** > **Channels**.
- Open **Bird**.
- Select **Add +**.
2. **Fill Configuration Fields**
| **Field** | **Description** | **Required** | **Where to Get Value** |
| --- | --- | :---: | --- |
| **Name** | Connector name | ✅ | — |
| **Description** | Optional notes | ❌ | — |
| **Organization ID** | Bird organization ID | ✅ | Admin Console |
| **Organization name** | Bird organization name | ✅ | Admin Console |
| **Workspace ID** | Bird workspace ID | ✅ | Admin Console |
| **Channel ID** | Bird channel ID | ✅ | Developer section |
| **Sender address** | Phone number ID | ✅ | Developer section |
| **Access key** | Bird API key | ✅ | Admin Console |
| **Subscription check interval, cron-style** | Cron expression for refreshing webhook subscriptions (default `0 0 * * *`) | ❌ | — |
**Field notes**
- **Sender address:** Must match the WhatsApp number registered in Bird. It cannot be arbitrary.
- **Access key:** If the integration is inactive, verify that the key is valid and has the required permissions.
- **Organization ID, Workspace ID, Channel ID:** If messages are not received, verify that all values match the Bird configuration.
3. **Important Notes for Sender Name**
- Must **match** the name registered with Meta via Bird
- Set during number registration or auto-generated based on account
- Cannot be arbitrary - must comply with WhatsApp Business policies
4. **Save Integration**
- Click **Save** to create the integration
- Verify all fields are correctly filled
5. Click **Start** in the upper-right corner to start the channel.
### Step 5: Connect to AI Agent
1. **Open Agent Configuration**
- Navigate to your target AI agent's settings
- Go to **Communication channels** section
2. **Assign Channel**
- Select your Bird API integration from the list
- Save the agent configuration
:::info
You can use the same WhatsApp number for multiple agents only for outbound communication. For inbound messaging, every connected agent would reply to the same customer message, causing duplicate or conflicting answers — so use a dedicated number per agent.
:::
3. **Restart the agent**: click **Stop agent** then **Start agent** to apply the changes.
## Environment Variables
The following advanced [environment variables](/advanced-features/ai-agents/environment-variables) can be set for Bird API integration:
| Variable | Description | Default |
|----------|-------------|---------|
| `BIRD_TEMPLATE_LOCALE` | Default locale for message templates | `None` |
| `BIRD_SESSION_TIMEOUT` | Session timeout in seconds | `86400` (24h) |
| `IS_OUTBOUND_ONLY` | If true, channel operates in outbound-only mode | `false` |
| `BIRD_OUTBOUND_SESSION_IS_ENDED_MESSAGE` | Message sent when outbound session ends | See code default |
| `FLAMETREE_CALLBACK_PORT` | Port for webhook server | `None` |
| `BIRD_WEBHOOK_ADDRESS` | Explicit webhook callback URL | `None` |
| `FLAMETREE_CALLBACK_URL` | Fallback webhook callback URL | `None` |
| `BIRD_CRON_SUBSCRIPTION_RENEWAL` | Cron expression for webhook subscription renewal | `0 0 * * *` |
| `BIRD_SENDER_NAME` | Displayed sender name for Bird messages | AI Agent |
## Testing the Integration
1. **Send Test Message**
- Use any WhatsApp-enabled device to send a message to your registered number
- Verify the AI agent responds appropriately
- If no response is received, verify that the channel is active and the agent has been restarted
2. **Check Message Delivery**
- Confirm messages appear in Bird dashboard
- Verify webhook subscriptions are active
- If messages do not appear, verify webhook subscriptions and channel ID in Bird
3. **Check supported message types**
- The integration supports text messages, images, and voice messages
- Voice calls and video calls are not supported
## Security Considerations
### API Token Security
- Never share your Bird access token publicly or in version control
- Store tokens securely
- Rotate tokens regularly
- Monitor API usage for suspicious activity
### WhatsApp Compliance
- Follow WhatsApp Business API policies
- Ensure proper opt-in mechanisms for customers
- Maintain message quality standards
- Respect rate limits and messaging windows
---
## Related Resources
- [Bird API Documentation](https://docs.bird.com/api)
- [WhatsApp Business API Policies](https://developers.facebook.com/docs/whatsapp/policy)
- [Adding Knowledge Sources](/basic-setup/knowledge-sources)
- [AI Agent Setup](/basic-setup/agent-tutorial/basics)
---
## How to Set Up SIP
export const ProjectName = () => {
const {siteConfig} = useDocusaurusContext();
return <>{siteConfig.customFields.projectNameShort}>;
};
The AI agent can also **make and receive phone calls**. SIP integration allows you to connect external telephony infrastructure, such as corporate Asterisk/PBX systems, VoIP providers, or public SIP servers (including Twilio).
Through SIP, your AI agent can act as a virtual voice endpoint—initiating, answering, transferring, or managing calls using standard telephony protocols while maintaining real-time interaction with the caller.
---
## What is SIP
**SIP** (Session Initiation Protocol) is a communication protocol used to establish, manage, and terminate voice calls over the internet. Within the platform, SIP integration is used to:
- Initiate outbound calls to customers
- Receive inbound calls from clients
- Conduct **full voice conversations** with AI agent participation
## Prerequisites
To connect SIP integration, you will need:
- Your **SIP provider details**:
- SIP domain (for example, `sip.example.com`)
- SIP account login and password
- Voice models:
- **Speech-to-Text (STT)** — for transcribing customer speech
- **Text-to-Speech (TTS)** — for generating spoken responses from the AI agent
Unlike Twilio, SIP **does not provide built-in voice models**, so they must be **connected separately**.
## Setting Up: Add SIP Integration in the Platform
1. Go to **Settings** > **Channels**
2. Select **SIP**
3. Select **Add +**
4. Enter the following information:
| **Field** | **Description** | Required |
| --- | --- | :---: |
| **Name** | Display name for this SIP connector | ✅ |
| **Description** | Optional notes about this connector | ❌ |
| **Domain** | SIP domain (for example, sip.twilio.com) | ✅ |
| **User** | SIP username (account login) | ✅ |
| **Password** | SIP password (for authentication) | ✅ |
| **Login** | SIP login (if different from username; optional) | ❌ |
| **Caller ID** | SIP caller phone number (used as outbound caller ID; optional) | ❌ |
5. Click **Save** to add the communication channel
---
## Next Steps
Once your SIP integration is created, proceed to the next step — [create your Voice Agent](/advanced-features/ai-agents/voice-agent).
---
## How to Integrate Twilio
export const ProjectName = () => {
const {siteConfig} = useDocusaurusContext();
return <>{siteConfig.customFields.projectNameShort}>;
};
This integration enables a voice AI agent to initiate and receive phone calls via Twilio, using Twilio’s built-in voice and speech models.
Unlike SIP integration, which requires separately connecting speech input/output models, **Twilio provides built-in speech-to-text (STT)** and **text-to-speech (TTS)** capabilities. This significantly reduces external configuration and simplifies the setup process.
---
## Setting Up: Connect Twilio
1. Go to **Settings** > **Channels**
2. Select **Twilio**
3. Select **Add +**
4. Enter the following information:
| **Field** | **Description** | **Required** |
| --- | --- | :---: |
| **Name** | Display name for this Twilio connector | ✅ |
| **Description** | Optional notes about this connector | ❌ |
| **Account SID** | Unique identifier for your Twilio account | ✅ |
| **Auth Token** | Twilio secret key for API authentication | ✅ |
| **Phone number** | Twilio phone number used as the caller ID for outbound calls and as the receiving number for inbound calls (E.164 format, for example, +14155550123) | ✅ |
| **Voice model** | Voice used for speech synthesis (Twilio TTS voice, for example, `Polly.Salli`) | ❌ |
| **Speech model** | Speech recognition model used by Twilio STT (for example, `googlev2_telephony`) | ❌ |
| **Region** | [Twilio region](https://www.twilio.com/docs/global-infrastructure/understanding-twilio-regions) code that defines where API and media servers are hosted (for example, `us1`, `ie1`, `au1`, `de1`, `sg1`) | ❌ |
| **Edge** | Twilio [edge location](https://www.twilio.com/docs/global-infrastructure/edge-locations) — the geographic entry and exit points closest to your infrastructure, used to reduce call latency (for example, `dublin`, `ashburn`, `tokyo`) | ❌ |
:::info
Both **Region** and **Edge** are optional. If left empty, Twilio uses the default infrastructure (`us1` / `ashburn`)
:::
5. Click **Save** to add the communication channel
## Integration Highlights
- **Built-in STT/TTS:** Twilio handles speech recognition and generation internally, so no additional STT/TTS integration is required on the side.
- **Supports both inbound and outbound calls:** The AI agent can initiate calls to customers and receive incoming calls via the connected number.
- **Exclusive to Twilio:** This integration type does not support third-party VoIP or SIP servers.
---
## Chat API: REST API and WebSocket integration for third-party applications
export const ProjectName = () => {
const {siteConfig} = useDocusaurusContext();
return <>{siteConfig.customFields.projectNameShort}>;
};
export const AssistantName = () => {
const { siteConfig } = useDocusaurusContext();
return <>{siteConfig.customFields.assistantName}>;
};
export const SupportEmail = () => {
const { siteConfig } = useDocusaurusContext();
return <>{siteConfig.customFields.supportEmail}>;
};
export const PortalLink = ({ path = '', children }) => {
const { siteConfig } = useDocusaurusContext();
const base = siteConfig.customFields.portalUrl;
const href = `${base}${path}`;
return (
{children || href}
);
};
{/* Component for dynamic WSS URL generation */}
export const WssAgentUrl = () => {
const {siteConfig} = useDocusaurusContext();
const base = siteConfig.customFields.portalUrl.replace(/^http/, 'ws');
return (
{`${base}/chatbot/{agent_id}/ws/{session_id}`}
);
};
export const WssUserUrl = () => {
const {siteConfig} = useDocusaurusContext();
const base = siteConfig.customFields.portalUrl.replace(/^http/, 'ws');
return (
{`${base}/ws/{user_id}`}
);
};
{/* Component for dynamic Session Creation JSON response */}
export const SessionCreationResponse = () => {
const {siteConfig} = useDocusaurusContext();
const assistantName = siteConfig.customFields.assistantName;
const json = {
"session_id": "0685d2ec-14b8-7f0d-8000-b43afe3a64d1",
"session_type": "custom_stateful",
"mode": "REGULAR",
"conversation_id": null,
"ext_type": "web",
"user_id": "d7915d1e-8aea-41d2-a331-87d7cc4875da",
"name": "John Smith",
"email": "john.smith@example.com",
"phone": "+1555123456",
"channel_id": null,
"timeout": 259200,
"greeting_text": `I am ${assistantName} - your AI Support Assistant. \nI can help you with building AI agents, setting up outbound campaigns, configuring platform features, and navigating the dev tools.`,
"inbound_phrase": null,
"start_phrase": null,
"language": "en",
"llm_backend": null,
"show_thoughts": false,
"conversation_result": null,
"operator_id": "user_12345",
"operator_name": "John Doe",
"env_info": {
"current_date": "2025-06-26 Thu",
"tenant_id": "00000000-0000-0000-0000-000000000000"
},
"kwargs": {
"tenant_id": "00000000-0000-0000-0000-000000000000"
},
"close_time": 1751196481.8386822,
"voice_name": null
};
return {JSON.stringify(json, null, 2)};
};
{/* Component for dynamic Conversation List JSON response */}
export const ConversationListResponse = () => {
const {siteConfig} = useDocusaurusContext();
const portalUrl = siteConfig.customFields.portalUrl;
const json = {
"user_id": "user123",
"user_name": "John Doe",
"conversations": [
{
"session_id": "session_abc123",
"bot_url": `${portalUrl}/chatbot/agent_123`,
"bot_name": "Customer Support Agent",
"bot_api_key": "sk-...",
"start_time": "2025-06-26T10:30:00Z",
"logs": [
{
"id": 1,
"timestamp": "2025-06-26T10:31:00Z",
"role": "HUMAN",
"text": "Hello, I need help",
"attachments": []
},
{
"id": 2,
"timestamp": "2025-06-26T10:31:30Z",
"role": "AI",
"text": "I'd be happy to help you!",
"attachments": []
}
]
}
]
};
return {JSON.stringify(json, null, 2)};
};
{/* Component for dynamic URL examples */}
export const DynamicUrlExample = () => {
const {siteConfig} = useDocusaurusContext();
const url = siteConfig.customFields.portalUrl;
return (
{`${url}/chatbot/{agent_id}`}
);
}
The Chat API enables third-party applications to integrate with AI agents using REST API calls and WebSocket connections. This comprehensive API allows you to create chat sessions, send messages, handle voice features, and manage conversation history.
---
## Prerequisites
Before using the Chat API, ensure you have:
- Active account with configured AI agent
- Agent API token (found in agent's **Advanced** section)
- Agent ID (found in agent's **Advanced** section)
- Basic understanding of REST APIs and WebSocket connections
- Development environment capable of making HTTP requests
## Key Concepts
| Term | Definition |
|------|------------|
| **Session** | An object that represents metadata about the **active chat with the agent** (no message history) |
| **Conversation** | An object that **wraps an active session** ***plus*** **the entire chat history**. Conversations are returned in the array from the `/conversations` endpoint |
| **Agent Route** | Base URL for agent-specific APIs: /chatbot/`{agent_id}` |
| **Public Route** | Base URL for public APIs: |
## Authentication and Getting Credentials
All REST API requests require an authorization header with your agent's API token:
```http
Authorization: Bearer
```
**Getting Your Credentials**
Follow these steps to obtain your authentication credentials
1. Go to your portal and open your agent configuration
2. Navigate to **Advanced** section
3. Find the token field (hidden with asterisks)
4. Click the **Copy** button to copy the token
To get your agent_id, in the same **Advanced** section, you'll find the `agent_id` field above the token field.
## API Base URLs
| Context | Base URL | Reference |
|---------|----------|-----------|
| **Agent-specific APIs** | /chatbot/`{agent_id}` | → referred to as `{agentRoute}` |
| **Public (conversation) APIs** | | → referred to as `{publicRoute}` |
https://portal.example.com/chatbot/{'{agent_id}'}
## Session Management
Sessions represent active chats with your AI agent without message history. Use these endpoints to manage session lifecycle:
### Session Endpoints
| Method & Path | Purpose |
|---------------|---------|
| `POST {agentRoute}/session` | Start a new session |
| `GET {agentRoute}/session/{sessionId}` | Get session metadata |
| `PUT {agentRoute}/session/{sessionId}` | Update session metadata |
| `DELETE {agentRoute}/session/{sessionId}` | Close the session |
| `POST {agentRoute}/session/{sessionId}/run_v2` | Send a message (optionally with file attachments) |
:::tip
Sessions are closed automatically after the configured timeout.
:::
### Creating a New Session
**Request Body:**
```json
{
"user_id": "d7915d1e-8aea-41d2-a331-87d7cc4875da",
"name": "John Smith",
"email": "john.smith@example.com",
"phone": "+1555123456",
"type": "web",
"args": [],
"kwargs": {
"user_profile_info":"Very important client"
},
"user_info": {
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36",
"language": "en-US",
"screenWidth": 1920,
"screenHeight": 1080,
"platform": "Win32",
"isMobile": false
}
}
```
**Response:**
Make sure:
- the `agent_id` in the URL is correct
- all required fields are provided in the request body
- the agent is active and properly configured
### Sending Messages
Messages are sent using `multipart/form-data` format to support file attachments.
**Request Format:**
- `message` (required): Text message content
- `attachments` (optional): File attachments (multiple files allowed)
**Example with JavaScript:**
```javascript
const formData = new FormData();
formData.append('message', 'Hello, I need help with my account');
// Optional: Add file attachments
if (attachments) {
attachments.forEach((file) => {
formData.append('attachments', file);
});
}
```
**Response:**
```json
{
"response": "I'd be happy to help you with your account. What specific issue are you experiencing?",
"metadata": {
"mode": "REGULAR"
}
}
```
> **💡 Note:** The `metadata.mode` field indicates the session type:
> - `REGULAR` - Normal request/reply session
> - `COPILOT` - Session transferred to copilot mode
> - `OPERATOR` - Session transferred to operator
If the request fails, verify that:
- the `message` field is included
- files are sent using `multipart/form-data`
### Closing Sessions
When closing a session, you can specify a completion status:
**Available Session Status Values:**
- `completed` - Session completed successfully
- `busy` - Customer or agent busy
- `noanswer` - No answer received
- `canceled` - Session canceled by customer
- `failed` - Session failed due to error
- `resolved_by_operator` - Resolved by human operator
- `escalated_by_operator` - Operator marked the session for escalation review
- `not_found` - Context or resources for the session were lost or not found
- `network_error` - Closed due to client-side connectivity issues
- `unknown` - Fallback status for undefined closure reasons
- `user_timeout` - Closed automatically because the customer stopped responding
- `timeout` - Closed automatically due to maximum session duration limit.
- `declined` - Session declined
- `transferred` - Transferred to another agent/operator
- `daily_limit_exceeded` – A session start was blocked because the daily session limit was exceeded. Contact and Session records are created for analytics, but the session is not activated and does not affect billing or usage
## Agent Capabilities
Check what features your agent supports before implementing voice or other advanced features.
| Method & Path | Purpose |
|---------------|---------|
| `GET {agentRoute}/capabilities` | Returns agent capabilities (for example, voice messages, TTS) |
**Response:**
```json
{
"has_stt": true,
"has_tts": false
}
```
## Voice Features
The Chat API supports both speech-to-text (STT) and text-to-speech (TTS) capabilities.
### Speech-to-Text (STT)
| Method & Path | Purpose |
|---------------|---------|
| `POST {agentRoute}/transcribe` | Speech-to-text transcription |
**Supported Audio Formats:**
- `audio/wav` - WAV format
- `audio/mp4` - MP4/M4A format
- `audio/webm` - WebM format (sent as `audio/mp4`)
If transcription fails, verify that:
- the audio format is supported
- the `Content-Type` header matches the file format
- the agent supports STT (`has_stt: true`)
**Request Headers:**
```http
Content-Type: audio/wav
# OR
Content-Type: audio/mp4
```
**Example Usage (JavaScript):**
```javascript
const mimeType = getAudioMimeType();
const contentType =
mimeType === 'audio/webm' || mimeType === 'audio/mp4'
? 'audio/mp4'
: 'audio/wav';
const response = await fetch(`${agentRoute}/transcribe`, {
method: 'POST',
headers: {
'Authorization': `Bearer ${token}`,
'Content-Type': contentType,
},
body: audioBytes
});
const transcribedText = await response.text();
```
**Response:**
Returns the transcribed text as a plain string:
```
"Hello, I need help with my account"
```
### Text-to-Speech (TTS)
| Method & Path | Purpose |
|---------------|---------|
| `GET {agentRoute}/synthesize?text={text}&format={format}` | Text-to-speech synthesis; returns audio |
| `GET {agentRoute}/session/{sessionId}/synthesize?text={text}&format={format}` | Session-specific TTS synthesis |
**Query Parameters:**
- `text` (required): Text to convert to speech
- `format` (optional): Audio format - `wav` or `mp4` (default: `wav`)
- `voice_name` (optional): Specific voice to use
If synthesis fails, verify that:
- the agent supports TTS (`has_tts: true`)
- the `Accept` header matches the requested format
**Synthesize Request Headers:**
```http
Accept: audio/mp4
# OR
Accept: audio/wav
```
**Example Usage (JavaScript):**
```javascript
const synthesizeTextToSpeech = async (
botRoute: string,
text: string,
format: 'mp4' | 'wav' = 'mp4',
): Promise => {
const response = await fetch(`${botRoute}/synthesize?text=${encodeURIComponent(text)}&format=${format}`, {
method: 'GET',
headers: {
'Authorization': `Bearer ${token}`,
'Accept': `audio/${format}`,
},
});
return await response.blob();
};
// Usage example
const audioBlob = await synthesizeTextToSpeech(
botRoute,
'Hello, how can I help you today?',
'mp4',
);
// Create audio URL and play
const audioUrl = URL.createObjectURL(audioBlob);
const audio = new Audio(audioUrl);
await audio.play();
```
**Response:** Binary audio data (Blob) with appropriate `Content-Type` header (`audio/mp4` or `audio/wav`).
## Conversation Management
Each session represents a single conversation. Create a new session for each new interaction.
Conversations include both session metadata and complete chat history.
### Conversation Endpoints
| Method & Path | Purpose |
|---------------|---------|
| `GET {publicRoute}/api/v1/public/conversations?ext_id={userId}` | List conversations of the customer |
| `GET {publicRoute}/api/v1/public/conversations/attachments/{attachment_id}?ext_id={userId}` | Download an attachment |
| `PATCH {publicRoute}/api/v1/public/sessions/{session_id}/logs/{log_id}` | Set a customer reaction (like / dislike) |
### Listing Customer Conversations
**Query Parameters:**
- `ext_id` (required): External customer ID
- `ext_type` (optional): Customer type, defaults to `web`
**Response:**
### Setting Message Reactions
Allow customers to provide feedback on AI responses with like/dislike reactions.
```http
Content-Type: application/json
```
**Set Reaction Request Body:**
```json
{
"feedback": "GOOD",
"ext_id": "user123",
"tenant_id": "00000000-0000-0000-0000-000000000000"
}
```
**Example Usage (JavaScript):**
```javascript
const setMessageReactionRequest = async ({
session_id,
log_id,
url,
data,
}: {
session_id: string;
log_id: string;
url: string;
data: {
feedback: 'GOOD' | 'BAD' | 'NONE';
ext_id: string;
tenant_id?: string;
};
}) => {
const response = await fetch(
`${url}/api/v1/public/sessions/${session_id}/logs/${log_id}`,
{
method: 'PATCH',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify(data),
}
);
return response.json();
};
```
### Downloading Attachments
**Query Parameters:**
- `attachment_id` (path): ID of the attachment to download
- `ext_id` (required): External customer ID
- `ext_type` (optional): Customer type, defaults to `web`
## WebSocket Connections
WebSocket connections enable real-time communication and streaming responses.
### Agent Communication WebSocket
Chat sessions can operate in **streaming mode** where the agent's reply is delivered in real-time chunks.
**Connection URL:**
**Message Types:**
| Payload | Description |
|---------|-------------|
| `type: "message"` | Final bot message |
| `type: "thought"` | Intermediate thoughts |
| `type: "timeout"` | Session timeout notifications |
| `type: "close"` | Session end notifications |
| `role: "OPERATOR"` | Messages from a live operator |
### Conversation Events WebSocket
Monitor conversation events across all customer sessions.
**Connection URL:**
**Event Types:**
These events keep the conversation list up-to-date and highlight unread dialogs.
| Event | Meaning |
|-------|---------|
| `CONVERSATION_CREATED` | New conversation started |
| `CONVERSATION_CLOSED` | Conversation closed |
| `CONVERSATION_NEW_MESSAGE` | New message received |
| `CONVERSATION_BOT_STATUS_MODIFIED` | Agent status updated |
If the WebSocket connection fails, verify that the `session_id` in the agent WebSocket URL or the `user_id` in the conversation events WebSocket URL is valid.
## Data Types and Enums
### Customer Types (`ext_type`)
| Type | Description |
|------|-------------|
| `web` | Web widget customers (default) |
| `mobile` | Mobile app customers |
| `telegram` | Telegram bot customers |
| `whatsapp` | WhatsApp customers |
| `email` | Email customers |
| `sip` | Voice/phone customers |
| `facebook` | Facebook customers |
### Message Roles
| Role | Description |
|------|-------------|
| `HUMAN` | Message from the customer |
| `AI` | Message from the AI agent |
| `OPERATOR` | Message from human operator |
| `COPILOT` | Message from AI copilot assistant |
| `NOTES` | Internal notes |
### Session Modes
| Mode | Description |
|------|-------------|
| `REGULAR` | Standard AI agent session |
| `OPERATOR` | Human operator handling |
| `COPILOT` | AI assistant mode |
### Feedback Types
| Type | Description |
|------|-------------|
| `GOOD` | Positive feedback (like) |
| `BAD` | Negative feedback (dislike) |
| `NONE` | No feedback / reset feedback |
## Error Handling
| Code | Description |
|------|-------------|
| `200` | Success |
| `401` | Unauthorized: invalid or missing API token |
| `404` | Not Found: session or resource does not exist |
| `422` | Validation Error: invalid request parameters |
| `503` | Service Unavailable: agent temporarily unavailable |
For `401 Unauthorized`, verify that the token is copied correctly from the agent's **Advanced** section and that the request includes the `Authorization: Bearer ` header.
---
## Related Resources
- [AI Agent Setup](/basic-setup/agent-tutorial/basics)
- [WebSocket Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API)
- [REST API Best Practices](https://restfulapi.net/)
- Portal
---
## Chat Widget: Integrate Your Agent into Web Application
export const ProjectName = () => {
const {siteConfig} = useDocusaurusContext();
return <>{siteConfig.customFields.projectNameShort}>;
};
export const PortalLink = ({children}) => {
const {siteConfig} = useDocusaurusContext();
const url = siteConfig.customFields.portalUrl;
return {children || url};
};
Integrate your AI agent into any website with a powerful, customizable React chat widget. This widget provides seamless real-time chat functionality with extensive customization options and support for both floating and embedded deployment modes.
---
## Prerequisites
- Access to platform
- A configured AI agent
- Website with ability to edit HTML/add custom code
- Basic understanding of HTML and JavaScript
## Features
- 💬 **Real-time messaging** - Instant chat functionality
- 🎤 **Audio recording** - Voice message support with playback
- 🗣️ **Speech-to-text** - Convert voice to text automatically
- 🔊 **Text-to-speech** - Voice-over capabilities for accessibility
- 🎯 **Flexible deployment** - Floating button or embedded widget
- 📱 **Responsive design** - Optimized for all device sizes
- ⌨️ **RTL support** - Right-to-left text compatibility
- 🔄 **Session management** - Persistent conversation history
- 🎨 **UI customization** - Extensive styling options
## Widget Types
The widget supports two deployment modes:
| Mode | Description | Use Case |
|------|-------------|----------|
| **Floating** | Displays as a floating button that opens a modal chat window | Customer support, help desk |
| **Embedded** | Occupies full width/height of parent container | Dedicated chat pages, integrated experiences |
## Integration Setup
### Step 1: Get the Widget Code
1. **Navigate to Your Agent**
- Open the portal
- Go to the **Agents** section
- Click on the agent you want to configure
2. **Locate the HTML Code Section**
- On the right-hand configuration panel, scroll down to the **HTML Code** section
- Next to the **HTML Code** label, you'll see two icon buttons:
- 👁 **View** — to preview the code
- 📋 **Copy** — to copy the code to clipboard
3. **Copy the Widget Code**
- Click the **Copy** (📋) icon to copy the generated HTML snippet
### Step 2: Add Widget to Your Website
1. **Insert the Code**
- Paste the copied snippet **at the end of your page, just before the closing `