How to configure AI Chat Agents

How to configure AI Chat Agents

This document provides instructions for configuring AI chat agents in x-bees and Collaboration 7, with integrations available for Generative AI, Webhooks, AWS SQS, Dialogflow CX and OpenAI Assistant.

Developer documentation: https://docs.wildix.com/.

Created: August 2024

Updated: June 2025

Permalink: https://wildix.atlassian.net/wiki/x/4APOAQ


Introduction

AI chat agents are powerful tools for managing customer interactions, designed to efficiently handle a wide range of requests and tasks. You can integrate the following AI chat agents with x-bees and Collaboration 7: 

  • Generative AI lets you create highly interactive and intelligent chat agent without any coding expertise. You just need to provide clear instructions and the AI model generates dynamic, context-aware responses.
  • Webhooks provide real-time communication by sending HTTP POST requests to a specified URL when certain events occur. This allows for immediate processing and response, making it ideal for time-sensitive interactions
  • AWS SQS offers a reliable and scalable solution for message queuing, ensuring that even high volumes of chat events are handled efficiently. It decouples the processing of events, allowing your AI chat agent to manage requests asynchronously and at scale
  • Dialogflow CX enhances the natural language understanding (NLU) of your AI chat agent, enabling complex and multi-turn conversations with users. This integration is well-suited for advanced dialog management and contextual responses
  • OpenAI Assistant brings sophisticated natural language processing (NLP) capabilities. This integration is ideal for creating more human-like and contextually aware interactions

Note: Setting up AI chat agents with Webhooks, AWS SQS, Dialogflow CX and OpenAI Assistant requires some technical knowledge, or a specialist who meets this requirement and can peform the setup. 

AI Chat Agent Creation

It is possible to set up to 50 AI chat agents per organization.

To create an AI chat agent, proceed with the following steps:

  • Navigate to WMS -> PBX -> Integrations -> Cloud integrations
     

  • Select Chat Bots and click Add new Chatbot


  • Enter a name for your AI chat agent
  • Upload a picture (optional)
  • Select the integration type for processing chat events:
    • Generative AI 
    • Webhook
    • AWS SQS
    • Dialogflow CX
    • OpenAI Assistant


  • Configure the chosen integration type (see instructions below) 
  • To let users interact with the bot, proceed to the Visibility Settings and enable the Allow users to find the bot using search checkbox:
     

  • Click Add to save and activate your AI chat agent

Generative AI

When setting up Generative AI as the integration type, it's important to create a clear and detailed prompt for the AI chat agent, as this greatly affects its performance and reliability. Since prompt engineering is an ongoing process, you can improve prompt effectiveness over time based on user feedback.

You can organize your system prompts into clear sections, addressing a specific aspect of the AI chat agent's behavior. For example:

  • Identity: describe the AI agent’s persona, defining its role and setting the interaction context.
  • Style: provide instructions on how the agent should communicate with users, including such details such as tone, language, and level of formality.
  • Response Guidelines: outline the desired structure of the AI’s responses, including any required formats and limitations, if any.
  • Task and Goals: clarify the tasks the agent is expected to perform and the steps it should take to achieve its objectives.


After creating the bot, click on Manage API keys to create API key:

  • Click Create new API Key

  • Enter a name for identification
  • Click Create and copy the secret using the Click to reveal button:

Add Tools 

In case of Generative AI integration type, you can enhance capabilities of your AI chat agent with the following tools:

  • Handover: allows to transfer the chat to an agent or a service
  • Delegate: allows to delegate user’s request to another AI chat agent
  • Suggestions: gives possibility to configure quick replies 
  • Third-party Function: gives possibility to integrate AI chat agent with various API options

To add a tool:

  1. Click Add Tool -> choose the necessary option
  2. Fill out the required fields
    For example, for Handover, you need to provide description (1), choose destination – whether you wish to handover the conversation to an agent or a service (2), select the responsible agent (3) and choose if the AI chat agent has to generate reply and perform handover, generate a reply as instructed (you need to provide instructions) or handover immediately, without reply (4):

You can add multiple tools for one AI chat agent. If you need to delete a tool, click the delete icon:

Webhook

When configuring a Webhook as the integration type, you need to specify the following fields:

  1. Target:

    • Enter the URL that the Webhook will use to send POST requests

      This URL should be publicly accessible and secured with a valid HTTPS certificate. It should be designed to accept HTTP POST requests with JSON payloads and respond with status codes in the 200-299 range as quickly as possible.

      It's important to ensure that your Webhook endpoint can handle multiple identical calls in case of retries due to network or server failures. AI chat agent platforms may attempt to redeliver event payloads up to 3 times if the initial delivery is unsuccessful.

  2. Secret:

    • The secret ensures that only requests from Wildix system are accepted, preventing unauthorized access or potential security breaches. The secret key is included in the headers of each POST request sent by the Webhook. Your server should validate this key to ensure the request is legitimate before processing the event data

  3. After creating the bot, click on Manage API keys to create API key:

    • Click Create new API Key
    • Enter a name for identification
    • Click Create and copy the secret using the Click to reveal button

You can configure a test Webhook bot using these instructions:  https://docs.wildix.com/guides/2024/07/20/chatbot-simple/.

AWS SQS

When configuring AWS SQS as the integration type, you need to specify the following fields to establish the connection between x-bees/ Collaboration 7 and your AWS SQS queue:

  1. Target:

    • Enter the URL of your SQS queue. This is where the chat events are sent, for example, https://sqs.amazonaws.com/11111/wildix-events-queue
  2. Key:

    • Enter your AWS Access Key ID here. This key is used to sign the request that x-bees/ Collaboration 7 sends to AWS SQS
  3. Secret:

    • Enter your AWS Secret Access Key. This secret is paired with your AWS Key to securely sign the requests


  4. After creating the bot, click on Manage API keys to create API key:

    • Click Create new API Key
    • Enter a name for identification
    • Click Create and copy the secret using the Click to reveal button

Dialogflow CX

To configure Dialogflow CX as the integration type, you'll need to provide specific information to establish the connection between x-bees/ Collaboration 7 and your Dialogflow CX agent. The fields you need to fill in are as follows:

  1. Private Key:

    • Upload the private key file associated with your Google Cloud service account
  2. Location:

    • Enter the region where your Dialogflow CX agent is deployed. This is typically a region-specific identifier, for example, us-central1, europe-west1
  3. Language:

    • Specify the language that your Dialogflow CX agent will use to understand and respond to user inputs. The language code should match the languages supported by your Dialogflow CX agent, for example, en for English, es for Spanish
  4. Agent ID:

    • Enter the unique identifier of your Dialogflow CX agent. This ID links your AI chat agent to the specific Dialogflow CX agent that you’ve configured in Google Cloud

It is possible to set up a handover to allow a AI chat agent to transfer a chat to one or multiple agentshttps://docs.wildix.com/docs/messaging/bots/integrations/dialogflow.

OpenAI Assistant

When configuring OpenAI Assistant as the integration type, you need to specify the following fields to enable the connection between x-bees/ Collaboration 7 and OpenAI's API:

  1. API Key:

    • The OpenAI API Key is a unique identifier that allows x-bees/ Collaboration 7 to authenticate with OpenAI's services. It grants access to the OpenAI API, enabling you to send requests and receive responses from the Assistant

  2. Assistant ID:

    • The OpeAI Assistant ID s a unique identifier of a specific OpenAI Assistant you created. It is used to direct the AI chat agent's requests to the correct OpenAI Assistant


It is possible to set up a handover to allow a AI chat agent to transfer a chat to one or multiple agents: https://docs.wildix.com/docs/messaging/bots/integrations/openai.

Access Settings

For Generative AI, Dialogflow CX and OpenAI Assistant integration types, you can configure Access Settings:

In Access Settings, you can choose if you what to make AI chat agent available to everydoby or restrict access to internal users only (option Organization). By default, chat agent is available to everybody. 

Processing Predefined Replies 

Chatbots can display and react to predefined reply options. The reply options include buttons that allow users to perform actions, such as opening a URL or triggering specific responses (e.g., "Yes," "No"). Based on user selection, when a button is pressed, the chatbot can update messages, replacing or modifying previous responses (e.g. removing the "Yes," "No" options after user selects Yes/ No). 

To configure predefined replies, you can use Conversations API (documentation: https://docs.wildix.com/api-reference/rest/x-bees/conversations/#/operations/SendMessage and https://docs.wildix.com/api-reference/typescript/xbees-conversations-client/xbees-conversations-client.sendmessagecommand/) or integrate Dialogflow to define response options. 

Also, in case you are using Welcome message with quick replies for website widget and the conversation is routed to chat agent, you can configure the chat agent (e.g. by creating necessary prompts with Generative AI integration type) to provide responsed based on user selection.

Bot application

Conversation with AI chat agent

You can find the AI chat agents in Search: 

When you click on it, one-on-one conversation with the chat agent opens and you can send your request: 

If you wish to have group conversation with an AI chat agent, create the conversation and invite the chat agent: 

Website Widget 

Once you set up a bot, you can configure a website widget to enable customer interaction with the bot. 

  1. Go to WMS -> PBX -> Integrations -> Cloud integrations
  2. Choose Kite and select the necessary widget or create a new one
  3. Under Routing settings, select bot option and choose a specific bot from the list


  4. Click Save to apply the settings
  5. Embed the widget on your website

For more details, check out the guide Website widget configuration.