Authors: Andrew Young, Reilly Manton
This solution introduces a comprehensive analytics dashboard for monitoring and enhancing Amazon Bedrock's Nova speech-to-speech model interactions in a customer support context. The dashboard provides real-time sentiment analysis with visual trend graphs, overall call sentiment visualization via donut charts, AI-powered agent guidance, and key performance metrics including agent/customer talk time percentages and response times. All frontend analytics are powered by Amazon's Nova Lite model, while the backend S2S model features knowledge base integration for improved response accuracy, creating a powerful toolkit for enhancing telco customer support operations.
- npm
- AWS Account with Bedrock access to Nova S2S model
- AWS CLI credentials
- Microphone and speakers
From the root folder, run npm install
- Deploy an EC2 server by running
cdk deployinsidesrc/server/deploy/ - To launch the client app, run
npm run client
There are 2 ways to run this server: over a telephony provider such as Vonage / Twilio / a SIP endpoint, or over the web.
If you need inbound telephony, we strongly recommend running the server remotely on an EC2 instance and using SSL. There are other ways to do this such as ngrok or localtunnel, but EC2 is by far the most secure and we do not endorse the other approaches. These approaches will accept web and SIP traffic.
If you do not need inbound telephony, or you only want to test the server, then you can simply host the server on localhost. This will accept only web traffic
- Export your environment variables locally:
> export AWS_ACCESS_KEY_ID="your-access-key"
> export AWS_SECRET_ACCESS_KEY="your-secret-key"
> export AWS_DEFAULT_REGION="us-east-1"- Update your .env file with the location of your web server (e.g.
localhostor a DNS URL likemydomain.example.com) - If you want to access your server over localhost from a web application, then you have nothing further to do. Simply access the app using your client. Note that you will not be able to accept inbound calls over the internet. If you want to accept inbound calls, you should instead run the server remotely using SSL (see below)
scpover the full contents ofsrc/server/
> scp -r -i <path-to-PEM-file> ./* ec2-user@<ec2-ip-address>:~- SSH into your EC2 instance using your private key that you created when you deployed the app.
> ssh -i <path-to-PEM-file> ec2-user@<ec2-ip-address>- On your SSH server, run
npm installto install all packages. - Ensure that your networking configuration will accept traffic to port
443and port3000(with our CDK package, this is true by default) - Export your environment variables locally:
> export AWS_ACCESS_KEY_ID="your-access-key"
> export AWS_SECRET_ACCESS_KEY="your-secret-key"
> export AWS_DEFAULT_REGION="us-east-1"- To run the application, run:
> sudo AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY AWS_SESSION_TOKEN=$AWS_SESSION_TOKEN ts-node server.ts- Go to vonage.com
- If you don't already have an account, sign up for a Vonage account and ensure you have enough balance.
- Once you have an account, log in to the Vonage Communications API dashboard.
- On the left-side menu, click Applications.
- On the main screen, click
+ Create new application - Under Capabilities, enable Voice capabilities.
- For the Answer URL, make it an
HTTP GETto<your-hostname>/webhook/answer - For the Event URL, make it an
HTTP POSTto<your-hostname>/webhook/event - For the Fallback URL, make it an
HTTP POSTto<your-hostname>/webhook/fallback - Create and associate a phone number to your application. You may need to purchase a phone number to do this.
- Ensure that the Server is running with environment variables configured, and able to receive traffic
- Place a call to the phone number that you created in your app
- If you wish to have other participants join the call, paste the call ID (which you can find in the Server logs) into the client (front-end) dashboard.
- Your call will now be working, and anything you say into your device will be picked up by the client and server app.
- to customize the AI insights and user sentiment prompting, see
ui-stream/src/bedrockSentimentAnalyzer.ts
