AWS Machine Learning Blog 07月19日 00:16
Deploy a full stack voice AI agent with Amazon Nova Sonic
index_new5.html
../../../zaker_core/zaker_tpl_static/wap/tpl_guoji1.html

 

本文介绍了如何利用Amazon Nova Sonic和AWS云服务构建一个智能语音客服解决方案,该方案能够实现自然流畅的语音交互,并能访问实时客户数据。通过AWS CDK部署,该解决方案提供了一个可扩展、可定制的云架构,包括前端、通信、处理和智能层。文章详细阐述了解决方案的组成部分,以及如何通过修改系统提示和添加新工具来定制AI代理的功能,例如客户信息查询和知识库搜索,最终目标是提升客户满意度和运营效率。

🌟 **Amazon Nova Sonic赋能自然语音交互**:Amazon Nova Sonic是Amazon Bedrock中的一项语音到语音模型,能够实现实时、拟人化的语音对话,无需独立的语音识别和文本转语音组件,从而显著提升客户体验。

🏗️ **云端部署的完整解决方案**:文章提供了一个基于AWS CDK的完整云部署架构,作为构建概念验证应用的坚实基础。该架构可根据具体业务需求进行定制,并包含预配置的基础设施组件,简化了部署流程。

⚙️ **多层次架构支撑智能客服**:该解决方案由前端、通信、处理和智能层构成。前端负责内容交付和用户交互;通信层处理实时连接和用户认证;处理层利用ECS和Fargate运行后端服务;智能层则集成了Nova Sonic模型、DynamoDB和Bedrock知识库,实现核心AI功能。

🔧 **高度可定制的AI代理**:该方案允许用户通过修改系统提示来调整AI代理的行为,实现快速迭代。此外,还可以通过MCP框架实现自定义工具,如客户信息查询和知识库搜索,以扩展AI代理的能力,满足多样化的业务场景需求。

🚀 **提升客户满意度与运营效率**:AI语音代理能够同时处理多项对话,提供全天候一致的服务,并实现即时扩展,同时保持服务质量并降低运营成本。此解决方案为企业提供了实现这些优势的途径,驱动客户满意度和生产力的提升。

AI-powered speech solutions are transforming contact centers by enabling natural conversations between customers and AI agents, shortening wait times, and dramatically reducing operational costs—all without sacrificing the human-like interaction customers expect. With the recent launch of Amazon Nova Sonic in Amazon Bedrock, you can now build sophisticated conversational AI agents that communicate naturally through voice, without the need for separate speech recognition and text-to-speech components. Amazon Nova Sonic is a speech-to-speech model in Amazon Bedrock that enables real-time, human-like voice conversations.

Whereas many early Amazon Nova Sonic implementations focused on local development, this solution provides a complete cloud-deployed architecture that you can use as a foundation for building real proof of concept applications. This asset is deployable through the AWS Cloud Development Kit (AWS CDK) and provides a foundation for building further Amazon Nova use cases using preconfigured infrastructure components, while allowing you to customize the architecture to address your specific business requirements.

In this post, we show how to create an AI-powered call center agent for a fictional company called AnyTelco. The agent, named Telly, can handle customer inquiries about plans and services while accessing real-time customer data using custom tools implemented with the Model Context Protocol (MCP) framework.

Solution overview

The following diagram provides an overview of the deployable solution.

The solution is composed of the following layers:

The following sequence diagram highlights the flow when a user initiates conversation. The user only signs in one time, but authentication Steps 3 and 4 happen every time the user starts a new session. The conversational loop in Steps 6–12 is repeated throughout the conversational interaction. Steps a–c only happen when the Amazon Nova Sonic agent decides to use a tool. In scenarios without tool use, the flow goes directly from Step 9 to Step 10.

Prerequisites

Before getting started, verify that you have the following:

Deploy the solution

You can find the solution and full deployment instructions on the GitHub repository. The solution uses the AWS CDK to automate infrastructure deployment. Use the following code terminal commands to get started in your AWS Command Line Interface (AWS CLI) environment:

git clone https://github.com/aws-samples/sample-sonic-cdk-agent.git cd nova-s2s-call-center # Configure environment variablescp template.env .env# Edit .env with your settings# Deploy the solution ./deploy.sh 

The deployment creates two AWS CloudFormation stacks:

The output of the second stack gives you a CloudFront distribution link, which takes you to the login page.

You can create an Amazon Cognito admin user with the following AWS CLI command:

aws cognito-idp admin-create-user \  --user-pool-id YOUR_USER_POOL_ID \  --username USERNAME \  --user-attributes Name=email,Value=USER_EMAIL \  --temporary-password TEMPORARY_PASSWORD \  --region YOUR_AWS_REGION

The preceding command uses the following parameters:

Log in with your temporary password from the CloudFront distribution link, and you will be asked to set a new password.

You can choose Start Session to start a conversation with your assistant. Experiment with prompts and different tools for your use case.

Customizing the application

A key feature of this solution is its flexibility—you can tailor the AI agent’s capabilities to your specific use case. The sample implementation demonstrates this extensibility through custom tools and knowledge integration:

These features showcase how to enhance the functionality of Amazon Nova Sonic with external data sources and domain-specific knowledge. The architecture is designed for seamless customization in several key areas.

Modifying the system prompt

The solution includes a UI in which you can adjust the AI agent’s behavior by modifying its system prompt. This enables rapid iteration on the agent’s personality, knowledge base, and conversation style without redeploying the entire application.

Adding new tools

You can also extend the AI agent’s capabilities by implementing additional tools using the MCP framework. The process involves:

For example, the following code illustrates how to add a knowledge base lookup tool:

@mcp_server.tool(    name="lookup",    description="Runs query against a knowledge base to retrieve information.")async def lookup_tool(    query: Annotated[str, Field(description="the query to search")]) -> dict:    """Look up information in the knowledge base"""    results = knowledge_base_lookup.main(query)    return results

The decorator handles registration with the MCP server, and the function body contains your tool’s implementation logic.

Expanding the knowledge base

The solution uses Amazon Bedrock Knowledge Bases to provide the AI agent with company-specific information. You can update this knowledge base with:

Clean up

You can remove the stacks with the following command:

# move to the cdk folder, assuming you are in the project root foldercd cdk# Removes both stacks sequentiallynpx cdk destroy --all

Conclusion

AI agents are transforming how organizations approach customer service, with solutions offering the ability to handle multiple conversations simultaneously, provide consistent service around the clock, and scale instantly while maintaining quality and reducing operational costs. This solution makes those benefits accessible by providing a deployable foundation for Amazon Nova Sonic applications on AWS. The solution demonstrates how AI agents can effectively handle customer inquiries, access real-time data, and provide personalized service—all while maintaining the natural conversational flow that customers expect.

By combining the Amazon Nova Sonic model with a robust cloud architecture, secure authentication, and flexible tool integration, organizations can quickly move from concept to proof of concept. This solution is not just helping build voice AI applications, it’s helping companies drive better customer satisfaction and productivity across a range of industries.

To learn more, refer to the following resources:


About the authors

Reilly Manton is a Solutions Architect in AWS Telecoms Prototyping. He combines visionary thinking and technical expertise to build innovative solutions. Focusing on generative AI and machine learning, he empowers telco customers to enhance their technological capabilities.

Shuto Araki is a Software Development Engineer at AWS. He works with customers in telecom industry focusing on AI security and networks. Outside of work, he enjoys cycling throughout the Netherlands.

Ratan Kumar is a Principal Solutions Architect at Amazon Web Services.A trusted technology advisor with over 20 years of experience working across a range of industry domains, Ratan’s passion lies in empowering enterprise customers innovate and transform their business by unlocking the potential of AWS cloud.

Chad Hendren is a Principal Solutions Architect at Amazon Web Services. His passion is AI/ML and Generative AI applied to Customer Experience. He is a published author and inventor with 30 years of telecommunications experience.

Fish AI Reader

Fish AI Reader

AI辅助创作,多种专业模板,深度分析,高质量内容生成。从观点提取到深度思考,FishAI为您提供全方位的创作支持。新版本引入自定义参数,让您的创作更加个性化和精准。

FishAI

FishAI

鱼阅,AI 时代的下一个智能信息助手,助你摆脱信息焦虑

联系邮箱 441953276@qq.com

相关标签

Amazon Nova Sonic 智能语音客服 AI Agent AWS 客户体验
相关文章