This document explains how to integrate the Agent AI widget into the Five9 Agent Desktop. It provides step-by-step instructions for a smooth and efficient setup. This integration supports key Agent AI features, including Automation, Agent Coaching, Agent Playbook, sentiment analysis, Transcription, with end-of-call summary, Custom Data, and Secure Custom Data passing, such as agent name and ID to the Agent AI widget.Documentation Index
Fetch the complete documentation index at: https://koreai.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
- Five9 administrators with access to the Admin Console and privileges to set up the configurations.
- Five9 administrators who can receive calls on Five9 Agent desktop.
- Five9 VoiceStream set up for your instance. Contact your Five9 representative for help.
- Platform administrators with access to Agent AI instance and know-how of Agent AI bots.
- Kore App credentials, such as Agent AI Widget URL, Bot ID, Client ID, Client Secret, Account ID, and SIP URI.
Definitions
| Key | Definition | Reference |
|---|---|---|
Identifiers | A unique identifier in the Data Table to fetch bot details at run time. It can be a skill name or a campaign name. | |
SecureCustomDataConfig) | Defines the key–value pairs in SecureCustomData, a session-level store for sensitive data. Use the SecureCustomDataConfig to pass sensitive information to the Agent AI Bot. Provide a JSON object with keys and their corresponding xpath (paths to locate the value in Five9 Call Variables).This column is optional. | Sample:{"skillName": "Call.skill_name","agentName": "Agent.full_name"} |
CustomDataConfig | Use this to pass information to the Agent AI bot. The KVPs you need to include in CustomData. JSON object containing the necessary keys and xpath (paths to locate the value in Five9 Call Variables). Optional column. Use it to send custom data to Agent AI. | Sample:{"skillName": "Call.skill_name","agentName": "Agent.full_name"} |
Configurations on Platform
- Bot Information in Agent AI Third-Party Configuration
- Access Custom Data and Secure Custom Data in Agent AI Bot
Configurations on Five9 Admin Console
- Five9 account setup for incoming phone call
- Create connector
- Create voice stream
- Create custom call variables
Interaction between Five9 and Agent AI

Five9 Agent AI - Voice Flow Steps
- Customer calls Five9 Virtual Contact Center.
- Agent accepts the call on Five9 Agent Desktop.
- Five9 sends call metadata via HTTP POST /callevents to Audiosocket Server.
- Five9 opens gRPC StreamingVoice bidirectional stream (audio encoding: LINEAR16, 8000Hz).
- Five9 adapter routes audio to Voice Gateway.
- Voice Gateway sends audio stream to Kore-managed ASR.
- ASR returns real-time transcriptions to Voice Gateway.
- The system forwards the transcriptions to Agent Assist backend.
- Agent Assist backend shares the transcripts with Agent Desktop Widget (Agent Assist Transcript Tab).
- Agent Assist backend shares the transcripts with Agent Assist bot, and the bot recognizes the intents and sends responses back to the Agent Assist Widget. This process continues until the end of the call.
Agent AI Bot Mapping for Skills or Campaigns
Third-Party Configuration maps Agent AI bots to specific skills or campaigns. Use it to set the bot’s language, custom data, and secure custom data. Example: To associate Agent AI Bot1 with Skill1, create a record for Agent AI Bot1 and set the Queue Identifier to Skill1. Map each skill or campaign to only one Agent AI bot. This setup ensures the correct Agent AI widget is rendered for conversations routed based on the defined skill or campaign. Refer to third-party configuration doc for instructions on creating records for an Agent AI bot. Example: You have a skill named Chat_Skill, that handles incoming chat requests, and you want the Agent AI widget to render for conversations routed to this skill. You must create the following details of the third-party configuration record in your Agent AI account:



Create Connector
- Sign in to Five9 Administrator Console.
- Search for connectors in the search bar, and select Connectors.
-
Click the Create button.

- Provide a name in the Connector Name field.
-
Enter the URL as
{Agent AI URL}/integrations/five9/. -
Enter the method as GET.

- Click Next.
-
In the Parameters section, click the Add dropdown list, and select Field.

-
Select call_id, session_id, domain_id, id, skill_name / campaign_name (choose either skill_name or campaign_name, depending on which you use to map the bot in Agent AI), and click Ok.


-
Click the Edit icon against the parameters and change as per the following:
- call_id -> callid
- domain_id -> domainid
- id -> agentid
- session_id -> conversationid
- skill_name/campaign_name -> identifiers
-
In the Parameters section, click the Add dropdown, and select Constant.

-
Enter Name as accountid and the Value should be the accountid of your Agent AI account. Find this ID by navigating to Agent AI > Flows & Channels > Channels > Digital > Web/Mobile Client > JWT App Details. Refer to this doc.

-
Click Ok > Next.

- By default, Call is selected for Trigger Event and On Call Accepted is selected for On Call Event.
- Click Done.
Five9 Account Setup for Incoming Phone Call
- Buy a phone number by following the Numbers Inventory doc.
-
Create IVR script by following the Creating an IVR Script doc.
Sample IVR Script:




- Create a skill and add agents to the skill by following the Skills doc.
-
Create an inbound campaign by following the Create Inbound Campaigns doc.
After you create the inbound campaign, run it.
Create VoiceStream
- Sign in to Five9 Admin Console.
-
Search for VoiceStream, and click VoiceStream.

- Click Create.
- Enter a unique VoiceStream subscription name in the Name field.
- Select Other (Self Service) in Streaming Destination field.
- Select gRPC as Streaming Protocol.
-
Configure the following Destinations and provide Trust Token value as KoreGrpc.
- Primary Streaming Destination: savg-us-grpc-audiosocket.kore.ai:443
- CTI Call Event Destination: https://savg-webserver.kore.ai/audiosocket/five9/callevents
- VoiceStream Event Destination: https://savg-webserver.kore.ai/audiosocket/five9/callevents
- Click Done.
- Configure the Trust Token (provided by Kore) while creating the subscription. It’s validated at Kore by call event get API.
Create Custom Call Variables
- Sign in to Five9 Admin Console.
- Search for variables, and open Variables.
- Click Create.
- Give the group Name as Kore, and click Create.
-
Click Kore.

- Click Create Variable.
- Give the variable Name as botid. For the question Will this variable contain sensitive data?, select option No, select the Datatype as String, and then click Next.
- For the question Will the data in this variable be needed in reports?, select No.
- Click Next.
- For the question Should the values of this variable come from a predefined list?, Select No and provide your Bot Client ID in the Set Default Value field.
- Click Done.
- Click Create Variable.
- Repeat the same steps and create a variable with the name sipuri, and a default value containing the sipuri configured for your Agent AI Bot.
- Click Done.
Access Custom Data and Secure Custom Data in the Agent AI Bot
You can access the Custom Data and Secure Custom Data in Welcome Events in Agent AI configuration page and in Dialog Tasks in the Agent AI automation page. You can access the Custom Data as{{context.session.UserContext.customData.<key>}}.
Follow this doc for the detailed steps on how to access Custom Data.
You can access the Secure Custom Data as {{context.session.UserContext.secureCustomData.<key>}}
Follow the same steps of this doc for detailed information on how to access Secure Custom Data, with the exception of the path being {{context.session.UserContext.secureCustomData.<key>}}