翻訳待ち:Building a restaurant telephony AI host with Amazon Connect
AI サービスが一時的に利用できないため、復旧後に翻訳を補完します。ソース概要:Learn how to build a voice ordering system for restaurants that answers a phone call and takes an order end to end, with no app, no website, and no sign-in. It uses Amazon Connect for telephony, Amazon Connect Agentic Voice for real-time speech, an Amazon Connect AI agent for reasoning, and Amazon Bedrock AgentCore Gateway to reach backend tools through MCP.
AI サービスが一時的に利用できないため、復旧後に翻訳を補完します。
At many restaurants, a large share of orders still arrive by phone, and those calls usually land on a staff member who is already taking care of customers at the counter. Callers wait on hold, orders get written down by hand, and busy periods make both worse. Adding an app or a website helps customers who prefer to order online, but it does nothing for the person who wants to call and order. In this post, we show you how to build a voice ordering system that answers a phone number and takes the order from greeting to confirmation, with no app, no website, and no sign-in. A caller dials a phone number, and an AI host greets them, answers menu questions, finds a nearby pickup location, and confirms the order out loud. The system uses Amazon Connect Customer for the telephony channel, Amazon Lex V2 with Amazon Connect Agentic Voice for real-time speech, and Amazon Connect Customer AI agents to orchestrate the conversation, connected to a restaurant backend through the Model Context Protocol (MCP) and Amazon Bedrock AgentCore. This solution handles the telephony channel specifically. The audio arrives over the phone network rather than a browser, and the system identifies the caller by phone number rather than by a login. The solution builds the agent logic and the backend services as separate modules, so the ordering logic stays independent from the channel that calls it. The walkthrough shows you how to: Deploy the system with AWS Cloud Development Kit (AWS CDK) Answer an inbound phone call with Amazon Connect and route it through a contact flow. Provide real-time speech recognition and synthesis with Amazon Connect Agentic Voice (Advanced ASR and TTS) Orchestrate the conversation and backend tool calls with an Amazon Connect AI agent. Keep the conversation safe and on topic with an Amazon Connect AI Guardrail. Connect the agent to backend services as discoverable tools through AgentCore Gateway and MCP. Amazon Connect Agentic Voice provides the speech layer natively in Amazon Connect, handling speech recognition for listening and text-to-speech for speaking. The Amazon Lex V2 bot uses it for both, while an Amazon Connect AI agent handles the reasoning and the calls to the backend. A later section covers how Agentic Voice speeds up turn-taking. Solution overview The design keeps three things apart. Amazon Connect handles the call, an Amazon Connect AI agent runs the conversation, and the backend holds the menu, carts, orders, and locations. A call comes in through Amazon Connect, a contact flow opens an Amazon Connect AI agent session and connects the caller to the agent. Amazon Connect Agentic Voice provides speech recognition and synthesis throughout the call, the AI agent reasons over the conversation, and it reaches the backend through MCP tools exposed by AgentCore Gateway. Because MCP is an open standard for connecting an agent to external tools, the backend can change without touching the agent. In this solution, the contact flow, the Amazon Lex V2 speech layer (Amazon Connect Agentic Voice), and the Amazon Connect AI agent are all provisioned and managed through Amazon Connect. You do not stand them up as separate services. A single Amazon Connect deployment brings the telephony, the speech, and the AI agent together. The AgentCore Gateway and the restaurant backend are the parts you build and integrate yourself. The solution deploys the following: Amazon Connect Customer provides the inbound telephony, the contact flow, and the phone number that accepts calls. Amazon Lex V2 hosts the voice bot that the contact flow connects the caller to. It uses Amazon Connect Agentic Voice for speech and routes each turn to the AI agent. Amazon Connect Agentic Voice handles Advanced ASR (with confidence-based end-of-turn detection) and expressive TTS, natively in Amazon Connect. Amazon Connect Customer AI agents provide the orchestration AI agent that drives the conversation, powered by Anthropic Claude Haiku 4.5 in Amazon Bedrock. Amazon Connect AI Guardrails keep the conversation safe and on topic with content filters, denied topics, and profanity filtering. AgentCore Gateway exposes the backend APIs as MCP tools the agent can discover and call by name. Amazon AppIntegrations registers the AgentCore Gateway as an MCP application the AI agent can use. Amazon API Gateway fronts the backend with REST endpoints secured by AWS Identity and Access Management (IAM). AWS Lambda runs the business logic for menus, carts, orders, and location lookups, and pushes the caller’s phone number into the agent session. Amazon DynamoDB stores customer profiles, orders, menu items, carts, and locations. Amazon Location Service provides geocoding and route calculation for pickup recommendations. Architecture diagram Figure 1 shows the solution, which is organized into four sections. Figure 1: The telephony voice ordering solution, organized into four sections. Section A, backend infrastructure. This section deploys the restaurant backend. Amazon DynamoDB holds the customer, order, menu, cart, and location data, and Amazon Location Service handles addresses and routing. AWS Lambda runs the business logic, and Amazon API Gateway exposes it with IAM authorization. Resources deploy in dependency order. Section B, AgentCore Gateway. This section provisions an AgentCore Gateway that reads the REST API’s OpenAPI schema at deploy time and registers each endpoint as a named MCP tool. The gateway uses custom JSON Web Token (JWT) authorization and validates inbound tokens against the Amazon Connect instance. Section C, Amazon Connect instance and AI agent. This section creates the Amazon Connect instance, the Amazon Connect AI Agents assistant, and the orchestration AI agent. It registers the AgentCore Gateway as an MCP server in Amazon AppIntegrations and creates an Amazon Lex V2 bot with Amazon Connect Agentic Voice for Advanced ASR. It then defines the AI Guardrail with content safety policies, defines the AI agent with the Anthropic Claude Haiku 4.5 system prompt and the guardrail attached, publishes the agent version, and associates a security profile that grants the agent access to the backend tools. Section D, Amazon Connect telephony. This section creates the contact flow and claims the phone number. The contact flow is the entry point for every inbound call. It enables logging, sets Agentic Voice for text-to-speech, and captures the caller’s phone number. It then opens an Amazon Connect AI agent session, pushes the caller’s phone number into that session with a Lambda function so the agent can identify the caller, plays the greeting, and connects the caller to the Amazon Lex V2 bot. The Lex bot provides the real-time speech layer, using Agentic Voice Advanced ASR to listen and Agentic Voice TTS to speak, while the AI agent handles reasoning and tool calls. The numbered callouts in Figure 1 trace the solution end to end: A call is initiated to the phone number provisioned by Amazon Connect, either by a customer or forwarded from another line. The Amazon Connect contact flow sets the Agentic Voice, captures the caller’s phone number, opens an Amazon Connect AI Agents session, pushes the caller’s phone number into the session, and plays the greeting to the caller. The contact flow connects the caller to the Amazon Lex V2 bot with Amazon Connect Agentic Voice for speech recognition and synthesis throughout the conversation. Amazon Lex V2 routes the conversation to Amazon Connect AI Agents, delegating the conversation logic to the orchestration AI agent. The Amazon Connect AI agent, powered by Anthropic Claude Haiku 4.5 in Amazon Bedrock and protected by an AI Guardrail for content safety, drives the conversation, resolving the caller’s location, fetching the menu, managing the cart, and placing the order. The AI agent calls the available tools through Amazon Bedrock AgentCore Gateway using the MCP protocol. AgentCore Gateway forwards each tool call to Amazon API Gateway, which routes the request to the appropriate AWS Lambda function. AWS Lambda reads and writes Amazon DynamoDB for cart, order, menu, and location data, and calls Amazon Location Service for geocoding and nearest-location lookup. AWS CDK deploys all eight stacks in a single script. Amazon CloudWatch provides centralized monitoring, logging, and alerting across all services, and all data at rest is encrypted using AWS Key Management Service (AWS KMS). Callouts 1 through 8 happen during a single phone call, callout 9 covers how the solution is built and deployed, and callout 10 covers how it is monitored and secured. The following section sets deployment and operations aside and gets closer to the call itself. Inbound call flow This section follows one call from the caller’s side, from the first ring to the spoken reply. It is the same runtime path as callouts 1 through 6 in Figure 1. Figure 2 shows it as a sequence so the order of events is more straightforward to see. Figure 2: Inbound call flow, with the components inside the Amazon Connect boundary. The dashed boundary marks what Amazon Connect provides. The contact flow, the Amazon Lex V2 speech layer (Amazon Connect Agentic Voice), and the Amazon Connect AI agent all come from one Amazon Connect deployment, so you configure them through Amazon Connect rather than as standalone services. The AgentCore Gateway sits outside the boundary and connects the agent to your backend. The numbered steps in Figure 2 correspond to these stages of the call: The caller dials the phone number, and Amazon Connect answers. The Amazon Connect contact flow sets the Agentic Voice, captures the caller’s phone number, opens an Amazon Connect AI agent session, pushes the number into that session, and plays the greeting before connecting the caller to the speech layer. Amazon Connect Agentic Voice provides speech recognition and synthesis throughout the conversation, passing each turn to the Amazon Connect AI agent. The AI agent calls backend tools through AgentCore Gateway when it needs menu, cart, order, or location data, and the spoken reply flows back to the caller. Prerequisites Before you begin, verify you have the following in place: An AWS account Amazon Bedrock model access for Anthropic Claude Haiku 4.5 in the AWS Region where you deploy, requested on the model access page in the Amazon Bedrock console An Amazon Connect phone number quota of at least one in your account and Region, requested through the Service Quotas console if you have never claimed a number. Node.js 18.x or later, with 24.x recommended. AWS Command Line Interface (AWS CLI) 2.x configured with credentials. git to clone the repository. AWS CDK bootstrapped in your target account and Region (npx cdk bootstrap aws:///) The deployment enables the Contact Lens and bot management settings on the Amazon Connect instance for you, which the Amazon Lex V2 bot with Agentic Voice and the Amazon Connect AI agent require. No Docker or Python is needed. Deploy in a Region where Amazon Connect Agentic Voice, Anthropic Claude Haiku 4.5, Amazon Connect with AI agents, and AgentCore Gateway are all available. US East (N. Virginia), us-east-1, is a good place to start. Deploy the solution with AWS CDK The full solution is available in the sample repository on GitHub. Clone the repository and change into the project directory. git clone https://github.com/aws-samples/sample-restaurant-telephony-ai-host-using-amazon-connect-customer.git cd sample-restaurant-telephony-ai-host-using-amazon-connect-customer Run the deployment script with a deployment prefix. The prefix is added to every resource name, so you can deploy the solution more than once in the same account. ./scripts/deploy-all.sh --deploymentPrefix qsr-cn The script runs a preflight check and then deploys each AWS CDK stack in dependency order, passing the outputs of one stack to the next. It bu [truncated for AI cost control]