# Multi-Agent Support: Gen AI - Voice Bot

### Overview

This document outlines a Multi-Agent GenAI Voice Bot architecture specifically designed for iX Hello. It emphasizes scalable customer support, advanced automation, and seamless transitions to human agents. This system employs multiple specialized AI agents managed by an orchestration layer to efficiently handle complex, end-to-end voice interactions.

### Prerequisites

Before commencing bot creation, ensure the following prerequisites are met:&#x20;

* Access to [iX Hello](https://bots.ixhello.com) Studio Mode.&#x20;
* Familiarity with basic iX Hello navigation.
* Basic knowledge of RESTful API principles and JSON format for handling the data returned by the API.
* Use the below Gen AI bot links to create a custom app without using the Orchestration step
  * To Create a Basic Gen AI [app](https://docs.ixhello.com/ixhc/step-by-step-bot-creation-guide/faq-bot-creation-guide)&#x20;
  * To Create the connection, refer to [this](https://app.gitbook.com/o/-M8Qw0HjmL3rDRYUXBX0/s/-M8XHvUsfyTUFLvToHqD/~/edit/~/changes/1164/general/use-cases/contact-finder-with-rest-api/prerequisites/integrate-api-service-with-ix-hello), to publish on lex refer to [this](https://app.gitbook.com/o/-M8Qw0HjmL3rDRYUXBX0/s/-M8XHvUsfyTUFLvToHqD/~/edit/~/changes/1163/apps/custom-skills-series-step-3-publishing-to-a-channel), to build a custom app refer to [this](https://app.gitbook.com/o/-M8Qw0HjmL3rDRYUXBX0/s/-M8XHvUsfyTUFLvToHqD/~/edit/~/changes/1164/general/use-cases/contact-finder-with-rest-api/build-custom-app)

### Let's create a Custom App

On the left navigation, go to Apps-> Custom Apps -> New Custom App.

<figure><img src="https://1107164708-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M8XHvUsfyTUFLvToHqD%2Fuploads%2F1KqBrUwgUVSjXJy6Kkxz%2Fimage.png?alt=media&#x26;token=1a016fb2-81ba-417e-8714-c9f9179709d9" alt=""><figcaption></figcaption></figure>

<figure><img src="https://1107164708-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M8XHvUsfyTUFLvToHqD%2Fuploads%2FtT1t7LLHnYC8OfTnbQGm%2Fimage.png?alt=media&#x26;token=cad34dc1-4831-4644-a803-fb170ab94264" alt="" width="375"><figcaption></figcaption></figure>

## Data Source

In the top menu tabs, select “Data Sources” then “Create New Data Source”. Provide the following details:

<figure><img src="https://1107164708-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M8XHvUsfyTUFLvToHqD%2Fuploads%2FZozM3ojrRLMGsuk5ucgU%2Fimage.png?alt=media&#x26;token=14baef0b-9530-4d65-a539-6756958fe242" alt=""><figcaption></figcaption></figure>

**Name:** GenerativeAI

**Integration Configuration:** Generative AI

<figure><img src="https://1107164708-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M8XHvUsfyTUFLvToHqD%2Fuploads%2FMOKmNezbu72RT0jPK6pb%2Fimage.png?alt=media&#x26;token=d8a4e5d5-02de-4569-ab90-eb88e6296698" alt="" width="375"><figcaption></figcaption></figure>

**Name:** InternalContent

**Integration Configuration:** Internal Content DS

<figure><img src="https://1107164708-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M8XHvUsfyTUFLvToHqD%2Fuploads%2FNYukw51Z6EUs59nwqrsw%2Fimage.png?alt=media&#x26;token=c5068275-5a2e-4ed2-a30e-a35663c14848" alt="" width="375"><figcaption></figcaption></figure>

**Name:** InternalContent

**Integration Configuration:** Internal Content DS

<figure><img src="https://1107164708-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M8XHvUsfyTUFLvToHqD%2Fuploads%2F6wvyMNKCoumluVrMutWf%2Fimage.png?alt=media&#x26;token=ea36e8a3-05f3-415f-8e29-22f303627b6b" alt="" width="375"><figcaption></figcaption></figure>

### Method Creation

Click on methods and create new methods. Enter the following in the fields

#### **Method Creation for InternalContent Datasource**

**Method: SaveTransferInfo**

* **Name**: SaveTransferInfo
* **Request Type**: AddRecord
* **Parameters:**
  * ContentID: transfer\_data
  * Record: { "{{Context.CurrentDateTimeUTC}}": { "phone\_number": "{{Session.outgoing\_number}}", "client\_name": "{{Session.client\_name}}", "language": "{{Session.language}}", "datetime": "{{Context.CurrentDateTimeUTC}}", "conversation": "{{Session.chat.conversation}}" } }
  * RecordPosition: First
* **Valid Result Template:** Saved
* **Empty Result Template:** Sorry, I am unable to process this request.

#### Sample Result:

<figure><img src="https://1107164708-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M8XHvUsfyTUFLvToHqD%2Fuploads%2FmS8pPUSkBIwtichvj8Kf%2Fimage.png?alt=media&#x26;token=9252b80a-3f50-4169-9da9-bbacd4fc0453" alt="" width="563"><figcaption></figcaption></figure>

#### **Method Creation for PortalDatasource**

**Method: PostScheduleCall**

* **Name**: PostScheduleCall
* **Request Type**: Post
* **Request Header:** {"X-API-KEY": "XXXXXX"}
* **Method Path:** /schedule/
* **Query Path:** ?bot=IXHELLO\_DEMO\_USECASE
* **Request Body:** { "Bot": "IXHELLO\_DEMO\_USECASE", "Phone Number": "{{Session.outgoing\_number}}", "Delay": {{user\_timeframe}}, "language": "{{Session.language}}", "Client Name": "{{Session.client\_name}}", "customerPhoneNumber": "{{Session.customer\_phone\_number}}", "secretCode": "{{Session.secret\_code}}" }
* **Result Type:** Record
* **Valid Result Template:** Call Scheduled { "Client Name": "{{ClientName}}", "Phone Number": "{{PhoneNumber}}", "Amount Owed": {{AmountOwed}}, "Delay": {{TimeDelay}}, "language":"{{Language}}", "bot": "AMEX\_PAYMENT"}
* **Empty Result Template:** Schedule failed

#### Sample Result:

<figure><img src="https://1107164708-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M8XHvUsfyTUFLvToHqD%2Fuploads%2FaMHI7jhwBJiaiuAZFfOW%2Fimage.png?alt=media&#x26;token=a32d25f1-db21-409d-801a-56c0546a2f3f" alt="" width="563"><figcaption></figcaption></figure>

**Method: GetData**

* **Name**: GetData
* **Request Type**: GET
* **Request Header:** {"X-API-KEY": "XXXXXX"}
* **Method Path:** /schedule/list/phone/{{PhoneNumber}}
* **Query Path:** ?bot=IXHELLO\_DEMO\_USECASE
* **Request Body:** Blank
* **Result Type:** ListofRecords
* **Record Template:** {"client\_name": "{{client\_name}}", "customer\_phone\_number": "{{customer\_phone\_number}}", "language": "{{language}}", "outboundNumber": "{{phone\_number}}", "request\_id": {{request\_id}}}
* **Record Json Path:** $.records\[\*]
* **Record Limit:** 1
* **Valid Result Template:** {{Records}}
* **Empty Result Template:** No records found

<figure><img src="https://1107164708-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M8XHvUsfyTUFLvToHqD%2Fuploads%2FRL7bSgajYOebonSC6nvR%2Fimage.png?alt=media&#x26;token=69651364-ef8f-4d98-86b3-87cbe2145c4a" alt="" width="375"><figcaption></figcaption></figure>

#### Sample Response:

<figure><img src="https://1107164708-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M8XHvUsfyTUFLvToHqD%2Fuploads%2FaBTMJ3etJwc9xJkt9jrX%2Fimage.png?alt=media&#x26;token=be3adc3d-830a-4a00-b377-e409caccf95a" alt="" width="563"><figcaption></figcaption></figure>

### Creating an Intent

Let's see in the next document on how the Intent - Orchestration is done.

Navigate to the ‘Intents’ tab and click on the ‘Create New Intent’ button.

<figure><img src="https://1107164708-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M8XHvUsfyTUFLvToHqD%2Fuploads%2FRK6Fk39hb0gZMANLUY0n%2Fimage.png?alt=media&#x26;token=1b765343-f7f5-4f3f-a171-ff390c3f9697" alt=""><figcaption></figcaption></figure>

**Name:** ChatIntent

**Description:** Chat Intent

**Intent Type:** Orchestration

**Dialog Delegation Strategy:** FallbackToSkill

Choose - Set this intent as a fallback Intent

<figure><img src="https://1107164708-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M8XHvUsfyTUFLvToHqD%2Fuploads%2FqTxdIcwvZvy9GfHXb75y%2Fimage.png?alt=media&#x26;token=283d64f1-e3ba-4236-9cea-917c15eba619" alt="" width="375"><figcaption></figcaption></figure>

**For Orchestration follow this** [**document**](https://app.gitbook.com/o/-M8Qw0HjmL3rDRYUXBX0/s/-M8XHvUsfyTUFLvToHqD/orchestration-for-multi-agent)**.**

{% hint style="info" %}
**Further Steps are not needed for this bot as the inputs will be collected by GEN AI in orchestration.**
{% endhint %}

Please find the attached demo recording showcasing the functions and performance of the Multi-Agent Voice Bot.

{% file src="<https://1107164708-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M8XHvUsfyTUFLvToHqD%2Fuploads%2FzMIZ8rTAu0z62fc1AF9P%2FDemo_Use_Case.wav?alt=media&token=1b8042dd-1c1c-45f7-8dd8-736d50e8d0d5>" %}
