基于 Amazon Bedrock AgentCore、托管式知识库与 Nova Sonic 构建语音旅行管家
英文标题:Build a voice travel concierge with Amazon Bedrock AgentCore, Managed Knowledge Base and Nova Sonic
AWS 介绍了如何结合 Amazon Bedrock AgentCore、实时语音模型 Amazon Nova 2.5 Sonic 以及 Amazon Bedrock Knowledge Bases,为航司应用构建端到端的语音旅行管家。该方案借助 Model Context Protocol (MCP) 实现 AI Agent 与后端 REST API 的松耦合交互,旅客无需手动切换屏幕即可通过自然语音完成选座、查验延误及政策咨询,并支持无缝转接人工客服。该架构具备会话级 microVM 隔离、异步工具调用与延迟遮蔽能力,并支持通过 AWS CDK 一键自动化部署,为开发者落地低延迟、生产级双向语音 Agent 提供了成熟参考。
1.3 MB
1.3 MB
2.4 KB
345.0 KB
141.2 KB
346.5 KB
388.3 KB
1.3 MB
1.5 MB
464.1 KB
991.3 KB
22.1 KB
25.0 KB
23.2 KB
31.4 KB
233.6 KB
中文
航空公司现有的 App 和网站已支持旅客查询航班、选座和管理预订,而引入自然语音交互层,则让这些任务能够直接通过口头诉求来完成。借助这层语音交互,旅客无需离开当前 App 或在繁琐的屏幕页面间反复跳转,仅凭说话即可更改座位或查询航班延误。构建该系统需要在多个技术环节进行严密工程设计:不仅需要双向流式传输音频,还要在多轮对话中持续维持上下文;同时既要打通现有的后端系统,又不能让 Agent 与后端深度耦合;此外还必须从容应对节假日前夕的高并发流量激增。
本文将向你展示如何基于三项托管服务为航空公司应用增添语音旅行管家(Voice Travel Concierge):Amazon Bedrock AgentCore 是一套 Agent 平台,支持开发者选用任意框架和模型安全地大规模构建、部署和运行 AI Agent;Amazon Nova Sonic 是 Bedrock 上的语音到语音(Speech-to-speech)模型,专为实时语音交互打造;Amazon Bedrock Knowledge Bases 是一项全托管的检索增强生成(RAG)服务,能够基于自有文档对回答进行事实对齐。旅客开口说话,语音管家就能调出行程、更改座位、更新餐食偏好、解答政策疑问,并可在需要时协助接入人工客服。
该语音管家与现有界面协同运行而非替代现有屏幕,因此旅客可以在同一会话中自如地在“点击操作”与“语音交流”之间无缝切换。它运行在按需弹性伸缩的云服务上,让你可以将精力完全集中在体验打造而非底层基础设施上。该 AI 层连接至包含合成数据的航司后端示例,有助于你在将该模式迁移至自有系统时大幅加速落地进程。项目整体采用模块化解耦设计,你可以复用契合现有后端的组件,并将其作为工具(Tools)暴露给 Agent 调用。
你将通过本文学习到以下内容:
- 使用 AWS Cloud Development Kit (AWS CDK) 在 AWS 上部署语音 AI 管家。
- 借助 Strands Agents 框架与支持实时语音的 Amazon Nova 2.5 Sonic 构建 Agent,并托管在 Amazon Bedrock AgentCore 框架提供的 AgentCore runtime 上。
- 通过 Amazon Bedrock AgentCore 的 AgentCore Gateway,借助 Model Context Protocol (MCP) 将 Agent 与后端服务无缝连接。
- 利用 Amazon Bedrock Knowledge Bases 解答航空公司政策类问题。
- 将旅客转接给人工客服,并附带参考编号和预估等待时长。
方案概览
该架构将前端、AI Agent 和后端服务划分为独立的层次,便于针对每一层进行独立开发和弹性扩展。MCP 是一套用于连接 AI 应用与外部工具及数据的开放标准。它在 Agent 与后端之间传递标准化消息,从而确保两者保持松散耦合。
该解决方案部署了以下服务:
- Amazon Cognito:负责用户身份验证并颁发用于签名 API 访问的临时 AWS 凭据。
- Amazon Bedrock AgentCore runtime:托管 Agent,为每个会话提供 microVM 级别的隔离环境。
- Amazon Bedrock AgentCore Gateway:将后端端点公开为可被发现的 MCP 工具。
- Amazon API Gateway:通过 AWS Identity and Access Management (IAM) 鉴权将后端发布为 REST 端点。
- AWS Lambda:运行行程、座位图、旅客信息变更、航班状态、会员里程、政策查询及问题升级等业务逻辑。
- Amazon DynamoDB:存储客户画像、预订记录、旅客信息、座位图、购买历史、个性化偏好、会话记录及航班数据。
- Amazon Bedrock Knowledge Bases:基于航司政策文档检索事实依据,精准回答政策问题。
- Amazon Simple Email Service (Amazon SES):发送电子邮件通知。
- AWS Amplify:托管 React 前端应用。
架构
下图展示了方案架构,分为四个部分:
图 1:涵盖后端、AgentCore Gateway、AgentCore 运行时和前端的端到端架构
A 部分涵盖后端基础设施。 五个 CDK Stack 负责部署 DynamoDB 表、Lambda 函数、API Gateway 端点、Amazon Bedrock Knowledge Bases 以及 Amazon Cognito。
B 部分涵盖 AgentCore Gateway。 一个 CDK Stack 负责创建基于 MCP 协议的 Amazon Bedrock AgentCore Gateway,并将每个后端端点暴露为 Agent 可按名称直接调用的工具。
C 部分涵盖 AgentCore runtime。 两个 CDK Stack 负责配置运行时基础设施。Amazon Elastic Container Registry (Amazon ECR) 存储容器镜像,Amazon Simple Storage Service (Amazon S3) 保存上传的源码,AWS CodeBuild 负责构建 ARM64 架构的 Docker 镜像。Amazon Bedrock AgentCore runtime 在 Strands Agents 框架与 Amazon Nova 2.5 Sonic 的协同下支持 WebSocket 连接并持续运行。
D 部分涵盖前端。 一个 CDK Stack 负责在 AWS Amplify 上部署 React 应用。
用户请求流程
- 用户在浏览器或移动设备上打开托管在 AWS Amplify 上的 Web 应用程序。
- 用户在登录页面输入凭证。Amazon Cognito 验证请求并返回 JSON Web Tokens (JWT) 和临时 AWS 凭据。
- 前端与 Amazon Bedrock AgentCore 建立经 SigV4 签名的 WebSocket 连接,开启语音管家会话。
- 运行时通过 Amazon Cognito 校验 Token,并通过 Amazon Bedrock 初始化 Amazon Nova 2.5 Sonic。
- 用户语音输入请求。Amazon Nova 2.5 Sonic 处理音频并触发工具调用。Agent 通过 MCP 协议调用 AgentCore Gateway,以此检索航班数据、管理预订并更新乘客偏好。
- AgentCore Gateway 将请求转化为 REST API 调用转发至 Amazon API Gateway,后者将其路由至对应的 AWS Lambda 函数。
- AWS Lambda 函数查询 Amazon DynamoDB 表获取预订、乘客、座位图、会员状态和航班信息。邮件通知通过 Amazon SES 发出。
- Amazon Nova 2.5 Sonic 生成带有上下文的语音响应,并通过 AgentCore runtime 经由 WebSocket 连接流式回传给用户。
- 针对政策类咨询,AgentCore Gateway 直接通过 MCP Knowledge Base 连接器查询 Amazon Bedrock Knowledge Bases。知识库将相关的政策段落作为引用依据(Citations)返回给 Agent。
- 当用户请求人工客服介入时,AWS Lambda 会在 Amazon DynamoDB 中记录升级事件并返回参考编号。随后 AWS Amplify 会在用户设备端触发呼叫,将其转接至人工座席。
构建与运维
接下来的两个步骤独立于实时对话之外,用于阐述方案的构建方式及日常运行机制。
- AWS CDK 通过单一脚本完成整套方案的部署。构建流程将 Agent 源码上传至 Amazon S3,并触发 AWS CodeBuild 编译生成容器镜像,随后存入 Amazon ECR 供 AgentCore runtime 调用。
- Amazon CloudWatch 负责收集所有服务的日志、指标与警报,AWS Key Management Service (AWS KMS) 负责静态数据加密。
前置条件
在开始之前,请确认已备齐所需的前置资源与环境配置。
使用 AWS CDK 部署方案
该方案可以通过单个 CDK 脚本完成部署。克隆代码仓库,配置 AWS 访问凭证,然后运行部署脚本。详细部署步骤可参阅 GitHub 仓库中的 README。
示例航司数据模型
API Gateway 发布了具备 IAM 鉴权且集成 Lambda 的 REST API。Amazon DynamoDB 以个位数毫秒级的超低延迟和按需伸缩特性承载示例航司的数据模型。数据覆盖范围包括客户画像、预订记录、旅客信息、座位图、购买历史、个性化偏好、会话记录及航班状态。
使用知识库回答政策问题
旅客经常询问行李额度、改签费用、宠物出行规则以及常旅客条款。本方案基于 Amazon Bedrock Knowledge Bases 运用检索增强生成(RAG)来解答此类问题,使每一次回答均严格对齐航空公司的政策文档。代码仓库预置了行李政策、退票与退款、改签与重新预订、舱位等级规则、常旅客权益、宠物托运、特殊协助以及升舱等方面的样例政策文档。
你只需将文档上传至 Amazon S3 并创建一次知识库。从嵌入(Embedding)、分块(Chunking)、索引构建、存储到最终检索,全流程均由 Amazon Bedrock 全权托管。向量存储基于 Amazon S3 旗下的 Amazon S3 Vectors 能力运行。智能解析(Smart Parsing)技术会对原始 PDF 进行预处理,确保表格和复杂版式结构在检索时依然保持高精准度。当航司政策发生变动时,仅需同步知识库即可立即使新内容生效,无需重新部署流水线。
借助 AgentCore Gateway 可以直接将知识库与 Agent 联通。你只需将知识库添加为 Connectors 目标,并选择标准检索或 Agent 式检索模式,Gateway 便会将其作为具名的 MCP 工具,与后端 API 工具并列暴露。Agent 在运行时能够自动发现并按名称调用它,完全不需要额外编写自定义 Lambda 或检索代码。详细配置步骤请参阅将知识库添加为网关目标。
若要使用自有的政策制度,只需将 PDF 或文本文件放入 policy documents 文件夹,然后重新部署 knowledge base stack 即可。
基于 Amazon Bedrock AgentCore 的语音 AI 处理
每一个会话均在 AgentCore runtime 上作为具备 microVM 隔离的托管容器运行,从而在高并发负载下确保每位旅客的对话互不干扰。AgentCore 原生提供自动化伸缩、内置监控以及会话路由支持。
对于生产级部署,建议引入 Amazon Bedrock Guardrails 以过滤提示词注入(Prompt-injection)风险并验证回答的事实依据。本方案采用的“写入前确认(Confirm-before-write)”模式会在执行重要变更前要求旅客再次口头确认。该模式配合能够追溯至源文档的知识库引用标注,已构成了 Responsible AI 实践坚实的基础底座。
该 Agent 使用 Strands BidiAgents 框架来定义系统提示词(System Prompt)、工具集合以及对话流。Amazon Nova 2.5 Sonic 为语音管家注入了以下关键特性:
- 具备高鲁棒性的多口音语音识别与背景降噪能力。
- 能够适应旅客语气的口头表达响应。
- 极低延迟的双向流式传输能力。
- 异步工具调用机制,可在不中断会话的前提下并行获取数据或发起工具调用。
- 延迟遮蔽(Latency Masking)机制,在等待工具返回结果期间生成过渡性口语回应,保持对话的自然流畅。
- 支持实时插话打断(Barge-in)与自然的轮流交替对话机制。
- 能够在跨越多个交互轮次中精准维持上下文记忆。
前端音频以 16 kHz PCM 格式通过 WebSocket 实时流式传输至 AgentCore runtime。Amazon Nova 2.5 Sonic 转录语音,Agent 决策出正确的工具并通过 MCP 完成调用。AgentCore Gateway 将每一次 MCP 调用转换为 REST 请求,Lambda 执行逻辑并返回结果,最后由 Amazon Nova 2.5 Sonic 将结果自然融入到语音回答中。
Amazon Nova 2.5 Sonic 的新特性
本方案选用了 Amazon Nova 2.5 Sonic,这是一款具备强大推理能力的端到端实时语音到语音模型。对于既要调用后端工具又要严格遵循精细系统提示词的语音管家而言,这种推理能力带来了多项关键实用收益:
更优秀的工具调用与 Agent 级任务达成能力 —— Agent 能够可靠地选择并链式串联多步任务所需的对应工具,例如在同一次对话中先查询行程、紧接着直接变更座位。
强大的指令遵循与逻辑推理能力 —— 模型能够严格遵守系统提示词的要求,包括格式规范(如逐字逐字符拼读确认码和航班号)。
精准可靠的 Responsible-AI 应对 —— 模型在能够对旅客的真实请求给出建设性帮助的同时,稳妥安全地拦截和化解不当输入。
用户身份验证
方案使用 Amazon Cognito User Pools 与 Identity Pools 实现基于角色的访问控制。旅客使用用户名和密码登录并获取 JWT 凭证(包括访问令牌和 ID 令牌)。前端使用 ID 令牌向 Cognito Identity Pool 换取包含访问密钥(Access Key)、私有密钥(Secret Key)和会话令牌(Session Token)的临时 AWS 凭据。这些凭据用于通过 Signature Version 4 (SigV4) 签名机制建立通往 AgentCore runtime 的 WebSocket 连接以及向 API Gateway 发起请求。只有通过身份验证的旅客才能访问该应用及其底层服务 API。
身份验证与 WebSocket 连接流程
前端使用临时 AWS 凭据打开与 AgentCore 运行时的 SigV4 签名 WebSocket 连接……
English / 原文
Airlines already have apps and websites where travelers check flights, pick seats, and manage bookings, and adding a natural voice layer opens those tasks to spoken requests. With this voice layer, a traveler can change a seat or check a delay by speaking, without leaving the app or navigating through screens. Building it requires careful engineering on several fronts. You stream audio in both directions and hold the thread of a conversation across many turns. You also reach your existing backend systems without coupling the agent tightly to them, and you scale when traffic spikes before a holiday weekend.
This post shows you how to add a voice travel concierge to an airline application, built on three managed services. Amazon Bedrock AgentCore is an agentic platform for building, deploying, and operating AI agents securely at scale with your choice of framework and model. Amazon Nova Sonic on Bedrock is a speech-to-speech model for real-time voice. Amazon Bedrock Knowledge Bases is a fully managed retrieval augmented generation service that grounds answers in your own documents. A traveler speaks, and the concierge pulls up their itinerary, changes a seat, updates a meal preference, answers a policy question, and connects them to a live agent on request.
The concierge runs alongside your existing screens rather than replacing them, so travelers move between tapping and talking in the same session. It runs on services that scale on demand, so you spend your time on the experience instead of the infrastructure. The AI layer connects to a sample airline backend with synthetic data, which accelerates your implementation when you adapt the pattern to your own systems. The project splits into modules, so you can reuse the pieces that fit your existing backend and expose them to the agent as tools.
You will learn how to do the following:
- Deploy a voice AI concierge on AWS using the AWS Cloud Development Kit (AWS CDK).
- Build an agent with the Strands Agents framework and Amazon Nova 2.5 Sonic for real-time speech, hosted on AgentCore runtime, a capability of the Amazon Bedrock AgentCore framework.
- Connect the agent to backend services with the Model Context Protocol (MCP) through AgentCore Gateway, a capability of Amazon Bedrock AgentCore.
- Answer airline policy questions with Amazon Bedrock Knowledge Bases.
- Hand a traveler to a live agent with a reference number and an estimated wait time.
Solution overview
The architecture separates the front end, the AI agent, and the backend services into distinct layers, so you can develop and scale each one on its own. MCP is an open standard for connecting AI applications to external tools and data. It carries standardized messages between the agent and the backend, which keeps the two loosely coupled.
The solution deploys the following services.
- Amazon Cognito handles user authentication and temporary AWS credentials for signed API access.
- Amazon Bedrock AgentCore runtime hosts the agent with microVM isolation per session.
- Amazon Bedrock AgentCore Gateway exposes backend endpoints as discoverable MCP tools.
- Amazon API Gateway publishes the backend as REST endpoints with AWS Identity and Access Management (IAM) authorization.
- AWS Lambda runs the business logic for itineraries, seat maps, passenger updates, flight status, loyalty, policy lookups, and escalation.
- Amazon DynamoDB stores customer profiles, bookings, passengers, seat maps, purchase history, preferences, conversations, and flight data.
- Amazon Bedrock Knowledge Bases answers policy questions by grounding responses in your airline policy documents.
- Amazon Simple Email Service (Amazon SES) sends email notifications.
- AWS Amplify hosts the React front end.
Architecture
The following diagram shows the solution architecture, organized into four sections.
Figure 1: End-to-end architecture across the backend, the AgentCore Gateway, the AgentCore runtime, and the front end
Section A covers the backend infrastructure. Five CDK stacks deploy DynamoDB tables, Lambda functions, API Gateway endpoints, Amazon Bedrock Knowledge Bases, and Amazon Cognito.
Section B covers the AgentCore Gateway. One CDK stack creates the Amazon Bedrock AgentCore Gateway with the MCP protocol and exposes every backend endpoint as a tool the agent can call by name.
Section C covers the AgentCore runtime. Two CDK stacks provision the runtime infrastructure. Amazon Elastic Container Registry (Amazon ECR) stores the container image, Amazon Simple Storage Service (Amazon S3) holds source uploads, and AWS CodeBuild produces the ARM64 Docker image. The Amazon Bedrock AgentCore runtime runs with WebSocket support using Strands Agents framework with Amazon Nova 2.5 Sonic.
Section D covers the front end. One CDK stack deploys the React app on AWS Amplify.
User request flow
- The user opens the web application, hosted on AWS Amplify, in a browser or on a mobile device.
- The user enters their credentials on the login page. Amazon Cognito authenticates the request and returns JSON Web Tokens (JWTs) and temporary AWS credentials.
- The front end opens a SigV4-signed WebSocket connection to Amazon Bedrock AgentCore to begin the voice concierge session.
- The runtime validates the token with Amazon Cognito and initializes Amazon Nova 2.5 Sonic through Amazon Bedrock.
- The user speaks a request. Amazon Nova 2.5 Sonic processes the audio and triggers tool calls. The agent handles the tool integration by invoking the AgentCore Gateway using MCP to retrieve flight data, manage bookings, and update passenger preferences.
- The AgentCore Gateway forwards requests as REST API calls to Amazon API Gateway, which routes them to AWS Lambda functions.
- AWS Lambda functions query Amazon DynamoDB tables for bookings, passengers, seat maps, loyalty status, and flight information. Email notifications are sent through Amazon SES.
- Amazon Nova 2.5 Sonic generates a contextual voice response and streams it back to the user over the WebSocket connection through the AgentCore runtime.
- For a policy question, the AgentCore Gateway queries Amazon Bedrock Knowledge Bases directly through the MCP Knowledge Base connector. The knowledge base returns the relevant policy passages as citations to the agent.
- When the user requests a live agent, AWS Lambda logs the escalation in Amazon DynamoDB and returns a reference number. AWS Amplify then triggers the call from the user’s device to connect them to the live agent.
Build and operations
The next two steps sit outside the live conversation. They describe how the solution is built and how it runs day to day.
- AWS CDK deploys the solution with a single script. The build uploads the agent source to Amazon S3 and triggers AWS CodeBuild to produce the container image, which it stores in Amazon ECR for the AgentCore runtime.
- Amazon CloudWatch collects logs, metrics, and alerts across every service, and AWS Key Management Service (AWS KMS) encrypts data at rest.
Prerequisites
Before you begin, confirm that you have the following in place.
Deploy the solution with AWS CDK
The solution deploys with a single CDK script. Clone the repository, configure your AWS credentials, and run the deployment script. For detailed deployment steps, see the README in the GitHub repository.
The sample airline data model
API Gateway publishes a REST API with IAM-authorized endpoints and Lambda integration. Amazon DynamoDB stores the sample airline data model with single-digit millisecond latency and on-demand scaling. The data covers customer profiles, bookings, passengers, seat maps, purchase history, preferences, conversation transcripts, and flight status.
Answering policy questions with a knowledge base
Travelers ask about baggage limits, change fees, pet travel, and loyalty terms. The solution answers those questions using Retrieval Augmented Generation (RAG) through Amazon Bedrock Knowledge Bases, grounding responses in your airline policy documents. The repository ships with sample policy documents for baggage, cancellation and refunds, change and rebooking, fare class rules, loyalty terms, pet travel, special assistance, and upgrades.
You upload your documents to Amazon S3 and create the knowledge base once. From there, Amazon Bedrock handles the rest, including embedding, chunking, indexing, storage, and retrieval. Storage runs on Amazon S3 Vectors, a capability of Amazon S3. Smart Parsing prepares source PDFs so tables and structured layouts retrieve accurately. When your policy documents change, you sync the knowledge base and the new content is available right away. There’s no pipeline to redeploy.
Connecting the knowledge base to the agent is direct through AgentCore Gateway. You add the knowledge base as a Connectors target and choose standard or agentic retrieval, and the Gateway exposes it as a named MCP tool alongside your backend API tools. The agent then discovers it at runtime and calls it by name, with no custom Lambda or retrieval code to write. For the setup steps, see Add a knowledge base as a gateway target.
To use your own policies, drop your PDF or text files into the policy documents folder and redeploy the knowledge base stack.
Voice AI processing with Amazon Bedrock AgentCore
Each session runs as a managed container on AgentCore runtime with microVM isolation, keeping travelers’ conversations separate under load. AgentCore provides automatic scaling, built-in monitoring, and session routing.
For production deployments, add Amazon Bedrock Guardrails to filter prompt-injection attempts and validate response grounding. The confirm-before-write pattern in this solution asks the traveler to confirm before making changes. That pattern, together with the knowledge base citations that trace answers back to source documents, already provides a baseline of responsible AI practice.
The agent uses the Strands BidiAgents framework to define the system prompt, the tools, and the conversation flow. Amazon Nova 2.5 Sonic brings the following capabilities to the concierge.
- Speech recognition across accents and robustness to background noise.
- Spoken responses that adapt to the traveler’s tone.
- Bidirectional streaming with low latency.
- Asynchronous tool calling that fetches data or makes tool calls in parallel without pausing the conversation.
- Latency masking that generates interim spoken responses while waiting for tool results, keeping the conversation natural.
- Barge-in and natural turn-taking.
- Context that carries across many turns.
Audio streams from the front end as 16 kHz PCM over the WebSocket to AgentCore runtime. Amazon Nova 2.5 Sonic transcribes the speech, the agent picks the right tools, and calls them through MCP. The AgentCore Gateway translates each MCP call into a REST request, Lambda runs the logic and returns results, and Amazon Nova 2.5 Sonic folds those results into a spoken reply.
What’s new in Amazon Nova 2.5 Sonic
This solution uses Amazon Nova 2.5 Sonic, a speech-to-speech model with strong reasoning for real-time voice. For a voice concierge that calls backend tools and follows a detailed system prompt, that reasoning shows up in a few practical ways:
Better tool calling and agentic task completion – The agent selects and chains the right tools reliably across multi-step requests, such as looking up an itinerary and then changing a seat in one conversation.
Strong instruction following and reasoning – The model adheres closely to the system prompt, including formatting rules like reading confirmation codes and flight numbers one character at a time.
Accurate responsible-AI handling – The model responds helpfully to genuine traveler requests while safely handling inappropriate ones.
User authentication
The solution uses Amazon Cognito User Pools and Identity Pools for role-based access. A traveler signs in with a username and password and receives JWTs, an access token and an ID token. The front end exchanges the ID token with the Cognito Identity Pool for temporary AWS credentials that consist of an access key, a secret key, and a session token. Those credentials sign the WebSocket connection to AgentCore runtime and the requests to API Gateway using Signature Version 4 (SigV4). Only authenticated travelers reach the application and the service APIs.
Authentication and WebSocket connection flow
The front end uses the temporary AWS credentials to open a SigV4-signed WebSocket connection to AgentCore runtime and sends the access token for identity verification. The browser then streams 16 kHz PCM audio and receives voice responses and tool notifications over the same connection. No server-side proxy sits in the middle.
The following figure shows the authentication and WebSocket connection sequence between the browser, Amazon Cognito, and the AgentCore runtime.
Figure 2: A traveler authenticates with Amazon Cognito, the browser opens a SigV4-signed WebSocket to AgentCore runtime, and Amazon Nova 2.5 Sonic streams voice both ways
A traveler asks to see their seats. Nova 2.5 Sonic transcribes the request and the agent selects the tools it needs. It calls them in parallel through the AgentCore Gateway using MCP, and the Gateway translates each call into a REST request to API Gateway. Lambda functions query DynamoDB and return the results, and Nova 2.5 Sonic streams a spoken response that blends everything together. Because the tool calls run asynchronously, the conversation doesn’t stall while data loads.
The following figure shows how the agent processes a spoken request and dynamically calls backend tools through the AgentCore Gateway:
Figure 3: A spoken request travels through Nova 2.5 Sonic, the AgentCore Gateway, API Gateway, Lambda, and DynamoDB, and the voice response streams back
Answering a policy question from the knowledge base
When a traveler asks about the baggage policy, the agent reaches Amazon Bedrock Knowledge Bases through the AgentCore Gateway using its native connector. The knowledge base runs agentic retrieval with a managed reranker and returns relevant policy passages as citations. Nova 2.5 Sonic composes the answer and speaks it back to the traveler.
The following figure shows the agent answering a policy question by retrieving grounded passages from Amazon Bedrock Knowledge Bases:
Figure 4: A policy question is answered by Amazon Bedrock Knowledge Bases and spoken back to the traveler
Escalating to a live agent
The concierge hands a traveler to a person when it cannot fulfill a request or when the traveler asks. After the traveler confirms, the agent calls the EscalateToAgent tool. Lambda records the escalation in DynamoDB and returns a reference number with an estimated wait time. The agent shares that reference number, and the Amplify front end places the call to the support line. This sample doesn’t include a contact center application, so connecting to a person depends on the support number you configure.
The following figure shows the escalation flow when a traveler requests a live agent:
Figure 5: The agent logs the escalation in DynamoDB, shares a reference number, and the front end places the call to a live agent
Concierge walkthrough
Open the Amplify URL in your browser and sign in with the AppUser credentials. Choose the microphone button to start a voice conversation. The agent greets you by name and pulls up your itinerary in the background. From there you can speak naturally to change a seat, check a delay, review a policy, or reach a live agent. The following video shows a full session from greeting to escalation.
The whole conversation runs hands-free over a single WebSocket connection. The agent confirms every change before it writes. It speaks flight numbers one character at a time, so they’re clear to hear, and it calls backend tools in the background so there are no noticeable delays.
Clean up
To stop incurring charges, remove the deployed resources. Preview the deletions first, then run the cleanup.
./cleanup-all.sh --dry-run
./cleanup-all.sh
The script destroys resources in reverse order, starting with the front end, then the AgentCore runtime, the AgentCore Gateway, and the backend infrastructure.
Conclusion
This post showed you how to build a voice travel concierge on AWS. It uses Amazon Cognito for authentication, Amazon Bedrock AgentCore for agent hosting, API Gateway and Lambda for business logic, DynamoDB for storage, and Amazon Bedrock Knowledge Bases for policy answers. The layered design separates the front end, the agent, and the backend so each one develops and scales on its own. The concierge manages itineraries, seat changes, meal preferences, flight status, loyalty questions, policy lookups, and live agent escalation through MCP tools. Amazon Nova 2.5 Sonic brings low-latency voice, parallel tool calling, and natural interruption handling. Pay-per-use pricing and automatic scaling keep costs in step with traffic, and with MCP integration you can add a new Lambda function without touching agent code. To get started, visit the solution repository on GitHub and adapt it to your own airline systems.
Additional resources
About the authors
Ravi Kumar
Ravi is a Senior Technical Account Manager in AWS Enterprise Support who helps customers in the travel and hospitality industry to streamline their cloud operations on AWS. He is a results-driven IT professional with over 20 years of experience. Ravi is passionate about generative AI and actively explores its applications in cloud computing. Outside of work, Ravi enjoys creative activities like painting. He also likes playing cricket and traveling to new places.
Salman Ahmed
Salman is a Senior Technical Account Manager at AWS. He specializes in guiding customers through the design, implementation, and support of AWS solutions. Combining his networking expertise with a drive to explore new technologies, he helps organizations successfully navigate their cloud journey. Outside of work, he enjoys photography, traveling, and watching his favorite sports teams.
Sergio Barraza
Sergio is a Senior Technical Account Manager at AWS, helping customers design and optimize cloud solutions. With more than 25 years in software development, he guides customers through AWS services adoption. Outside work, Sergio is a multi-instrument musician playing guitar, piano, and drums, and he also practices Wing Chun Kung Fu.
Ankush Goyal
Ankush is a Senior Technical Account Manager at AWS who helps customers optimize their cloud architecture and operations. He works closely with enterprise customers to design scalable, resilient solutions on AWS. Ankush is focused on generative AI and enjoys helping teams put new technology to practical use. Outside of work, he enjoys spending time with family and exploring the outdoors.




