Skip to content

Amazon Connect CCP Integration: Agent AI Voice

This document describes the integration process of Amazon Connect with Agent AI—Voice, using the AWS CCP Integration approach. 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 Streams. AWS Lambda functions manage transcription and token generation for seamless interaction. Agent AI provides AI-powered assistance, including Agentic Copilot, Next Best Action, Agent Coaching, Agent Playbook, sentiment analysis, EOC Summary, and more throughout the conversation.

High-Level Architecture

architecture

Prerequisites

Category Requirement
AWS / Amazon Connect - An Amazon Connect instance with Administrator privileges.
- The instance should be in a region that supports the required services, such as Kinesis Video Streams and Lambda.
- If using Telephony: claimed phone numbers (DID or toll-free) as needed.
Contact Control Panel (CCP) / Agent Desktop - Supported browser for agents (latest version of Chrome recommended; Firefox may have limitations around sample rates and media usage). Refer to the AWS Documentation for details.
- Workstations meeting minimum hardware/network standards (CPU, RAM, network bandwidth). Refer to the AWS Documentation for details.
- Network/firewall settings configured: allow outbound HTTPS (443), WebRTC ports/domains, approved origins/domains in Connect for CCP, and any custom hosting of CCP. Refer to the AWS Documentation for details.
Streaming and Transcription Components - Amazon Kinesis Video Streams (KVS) availability in region: permissions to create/stream video/audio data.
- AWS Lambda permissions to read from KVS, generate temporary AWS credentials for access, and trigger downstream processing such as the transcriber bot.
- Bot/webhook configuration to receive transcription/context.
- SSL/valid certificates for any custom-hosted CCP or widget, if hosted outside Amazon Connect’s domain.
Components - Active Agent AI account with necessary roles/permissions for dialog tasks, webhook endpoints, and transcription configuration.
- Familiarity with dialog/task definitions and handling real-time input.
Security / Identity - Identity management in Amazon Connect / AWS IAM roles for Lambda and KVS.
- Approved origins configured for web apps (for custom CCP or embedded widget) in Amazon Connect.
- Appropriate policies for least-privilege on AWS services used.
Migration / Versioning - If accounts were using AudioSockets, ensure migration to Voice Gateway.
- Version compatibility of the custom CCP or Streams API, if making customizations.

Components Required

The following components are required:

  • Agent AI
  • AWS Lambda
  • Amazon Kinesis Streams
  • Amazon Connect

Pricing and Cost Considerations

When integrating Agent AI with Amazon Connect, admins must consider potential AWS costs such as call usage (per-minute), phone number rental, Lambda executions, Kinesis Streams (ingestion/storage), transcription services, data storage/transfer, and regional telephony rates. Actual costs vary by usage and region.

Setup Guide

Agent AI

To onboard the Agent AI account and create dialog tasks, refer to the About Agent AI doc.

AWS Lambda

Function: KVS Trigger

Function 1: KVS Trigger (Choose any other name)

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 AI Agent with the current Conversation ID.

  1. Download the Lambda from here and upload it to the function you create.
  2. Go to Create function.
  3. Enter a name in the Function name field. create-function

  4. Go to Upload from. upload-from

    • Upload the Lambda zipped file.
    • Click Save.
    • Go to Runtime settings.
    • Click Edit and change the Handler name from index.handler to kvs_trigger.handler.
      runtime-settings
  5. Go to Configuration > Environment variables.
    environment-variable

  6. Create the following environment variables within the Lambda:

    • kvsAccessKeyId – AWS Client ID
    • kvsSecretAccessKey – AWS Client Secret
    • region – add your AWS Region
    • transcriberURLhttps://platform.kore.ai/integrations/amzn/voice/
    • For regions other than the US-prod, replace the above domain with your Agent AI domain.
  7. 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:
      • Go to IAM > Users.
      • Click Users > Security credentials tab.
      • Click Create access key.
      • Select Use case as Application running on an AWS compute service.
      • Click next.
      • Enter a description tag, and then click create access key.
        create-access-key
  8. The final configuration appears as shown in the following image:
    final-configuration

Function 2: Retrieve Agent AI Widget Credentials

This function is responsible for returning all the credentials required to render the Agent AI widget on the Amazon Connect desktop. In this Lambda, you store all the required data in the environment variable and expose it to the API Gateway URL, which is used later in the CCP-voice configuration page.

  1. Download the Lambda from here and upload it to the function once you create a new Lambda function.
  2. Environment variable List:

    See the following image for AWS Connect Access URL: aws-connect-access-url

  3. The next step is to add an API Gateway to access this Lambda:

    • Go to Configuration > Triggers.
    • Click Add trigger.
    • Select API Gateway.
    • Select Create a new API. (API Type: HTTP API)
      create-a-new-api

    • Copy this API endpoint URL, and paste it in the URL field of Contact Control Panel as Agent Desktop section.

Amazon Connect

  1. Sign in to your Amazon Connect instance.
  2. Go to Amazon Connect > Instances.
  3. Create a new Amazon Connect instance, or sign in to an existing one.
    amazon-connect-instance

  4. Enable all the required options under the Telephony Options section.
    telephony-options

  5. Go to Approved origins, and add the domain/s where you have hosted your CCP instance/s.
    approved-origins

  6. Purchase/claim a phone number from Amazon Connect. Use this guide for reference.
    claim-phone-number

  7. Create/import a contact flow in the Amazon Connect instance. Refer to this article for help.
    import-contact-flow

  8. You can import the contact flow from this link.

  9. Click Set contact attributes, and enter the required fields:

    To get the SIP URI from Agent AI:

    1. Go to Agent AI > Flows & Channels, and click Voice Gateway.
    2. Click SIP Numbers > Configure SIP Trunk.
    3. On the Configure SIP Trunk page, in the Product Selection section, select Agent AI.
    4. Click the Copy button next to the SIP URI field.
      configure-sip-trunk

    5. Paste the copied SIP URI value into the contact attributes sipUri field in the Amazon Connect flow.

    To get the agentassistURL and accountID values:

    1. agentassistUrl: Add your Agent AI URL created on Agent AI.
    2. wssUrl: Add “wss://savg-webserver.kore.ai”.
    3. accountId: Add your Agent AI Account ID created on Agent AI.
    4. languageCode: Add “en”
      set-contact-attributes

    5. Click Save.

    6. Click Start Stream and Transcription in Kore Lambda.
      invoke-aws-lambda-function

    7. Select your Trigger Lambda Function from the dropdown list, and select the first function which was created in the initial step.

    8. Click Save.
    9. For Transfer to Flow, select a flow you want to move the user to. For example, save this KVSQueueFlow.json in a file, import this flow to Flows, and add Queue details for routing.
    10. 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.

    11. Click Save, and publish the flow.

  10. Attach the contact flow to the purchased phone number. Refer to Attach a claimed or ported phone number to a flow for help.
    amazon-connect-phone-number

  11. Use the phone number to test the Amazon Connect CCP solutions with the Agent AI widget.

Contact Control Panel (CCP) as Agent Desktop

  • The CCP solution is hosted in https://agentassist.kore.ai/integrations/amzn/ccp-voice/. You can also use the same URL to load your Amazon Connect instance and Agent AI in the same page.
  • First-time users are redirected to the configure page, where they must paste the copied API Gateway URL
    ccp-as-agent-desktop

  • Once you paste the above URL and click the SAVE DETAILS button, it redirects you to the CCP screen and a dummy Agent AI widget loads up. Initially, it asks you to log in with your Amazon Connect credentials, and only after successful authentication, the Amazon Connect CCP is visible.

  • Amazon Connect Contact Control Panel is used as the Agent Desktop to track new conversations on the client side and render the conversation-specific Agent AI widget within the Agent Desktop.
    agentai-widget

    Note

    Customers can host the above integration solution within their own domain by getting the Integration SDK from their representative.