Amazon Connect Integration with Agent AI Voice Via AWS Third Party Applications¶
This document describes the integration process of Amazon Connect with Kore Agent AI – Voice, using AWS third-party applications. This integration enables Amazon Connect to receive voice calls while Agent AI provides real-time support to agents. Audio streams from both the user and agent are captured and processed using Amazon Kinesis Video Streams. AWS Lambda functions manage transcription and token generation for seamless interaction. Agent AI is embedded into the Amazon Connect agent workspace to deliver AI-powered assistance such as Agentic Copilot, Next Best Action, Agent Coaching, Agent Playbook, sentiment analysis, EOC Summary, and more throughout the conversation.
High-level architecture¶
Prerequisites¶
- Amazon Connect instance with admin privileges.
- Kore Agent AI account.
- Basic know-how of Amazon Connect.
- Ability to receive voice calls on Amazon Connect agent desktop.
- AWS Lambda
- An account associated with the AWS Client ID and Secret with Read permissions to Amazon Kinesis Streams.
- Transcription trigger, a microservice that extracts the required parameters from the request body and generates the KVS Processing executable as a separate process with the parameters (like Contact Details, Credentials, and Voice Gateway).
Integration Setup Guide¶
Kore Agent AI¶
To onboard the Kore Agent AI account and create dialog tasks, refer to the Agent AI Setup Guide.
AWS Lambda¶
KVS Trigger¶
This function retrieves call stream metadata and AWS credentials from the environment, generates a credential set (SessionToken, AccessKeyId, SecretAccessKey) for KVS access, and triggers the Transcriber to send transcripts to the Kore bot with the current Conversation ID.
- Download the Lambda from here and upload to the function you create.
- Go to Create function.
-
Create the following environment variables within the Lambda:
- kvsAccessKeyId – AWS Client ID
- kvsSecretAccessKey – AWS Client Secret
- region – add your AWS Region
- transcriberURL – https://agentassist.kore.ai/integrations/amzn/voice/
- For regions other than the US-prod, replace the above domain with your Agent AI domain.
Steps to get the AWS Client ID and Secret
- Ensure the account associated with the AWS Client ID and Secret has Read permissions to Amazon KVS Kinesis Streams.
-
Get your AWS Client ID and Secret from IAM:
-
The final configuration should appear like the following image:
IFrame Token Generator¶
This function generates the Kore Agent AI IFrame widget token to display properly within the Amazon Connect agent workspace.
- Download the Lambda from here and upload this function on Lambda.
AWS Connect Third Party Application Configuration¶
This includes the Kore Agent AI widget that renders within the Amazon Connect Agent Workspace with the context of the current conversation.
-
Enter a Display name for your app – for example, Kore.ai AgentAssist Application.
-
Enter a Namespace for the app – for example, kore.ai-example-ns.
-
Enter “https://agentassist.kore.ai/integrations/amzn/tpa-voice/” in the Access URL field.
-
Select all the instances that you want to enable AgentAssist for in the Instance association – optional field.
Note
Third Party Apps are not supported for SAML based Amazon Connect instances. To use Kore Agent AI with SAML based Amazon Connect Instances, refer to this doc.
Amazon Connect¶
Configuring Amazon Connect Instance¶
-
Select your Amazon Connect instance. (To create a new instance, follow Create an Amazon Connect instance.
-
Click Edit next to Live media streaming. Here, you must create instances of Kinesis Video Streams.
-
Add an appropriate Prefix for the Kinesis Video Streams, and select an AWS Key Management Service.
-
Set an appropriate Data retention period – 1 hour should be enough for Kore.ai AgentAssist use cases.
-
Click Save.
-
Select the Enable data streaming checkbox.
-
Click Create a new Kinesis Stream for this application, or select an existing one from the dropdown list. You can use the same stream for Contact Trace Records (CTRs) and Agent Events.
-
Click Save.
-
Follow the above two steps for the IFrame Token Generator Lambda.
Configuring Amazon Connect Contact Flow¶
- Sign in to your Amazon Connect Instance.
-
Select KoreAgentAssist.json from the file upload menu. You can download it from here.
-
Click Set contact attributes, and enter the required fields:
-
Click Save.
-
Select your Trigger Lambda Function from the dropdown list.
- Click Save.
- Click Kore Token Generator for TPA Lambda.
-
Click Save.
- For Transfer to Flow, select a flow you want to move the user to.
-
To use agent dispositions, configure the Set Event Flow block with Disconnect flow for Agent UI hook by importing this flow and selecting it. If not, you can delete the block and connect the remaining blocks to the disconnect block.
Note
The disposition saving logic is at your discretion. Implement as per your use case. Some examples are:
* Use a Lambda to store it within a document database.
* Pass the data via a webhook to a third-party CRM.
Attaching Contact Flow to Phone Number¶
-
Select the Phone Number to attach to the flow. If you don’t have a number, go through How to get an Amazon Connect phone number in your current country to claim a phone number.
-
Click Save.
Test Your Integration¶
-
Open Agent Workspace from the home screen of your Amazon Connect instance.
-
Change the agent status to Available. All the third-party applications created in the earlier steps will be visible on the right side under the Apps dropdown.
-
Call the Amazon Connect number. Once the incoming call lands into the agent desktop, accept it.
-
Click the Apps section, and open the third-party application created earlier.
-
The Agent AI widget renders on the right side of the screen.
-
The Agent AI widget listens to all the user and agent conversation, and the transcript is visible on the Transcript tab of the widget.
-
Based on the use case/dialog task configuration in your Agent AI portal, real-time suggestions appear on the Assist Home tab of the widget from the user message in the transcription.
-
Once the call is disconnected, a call summary appears. The agent can modify the summary or copy it to save it into the CRM.
-