代理應用
AWS Open-Sources WhatsApp AgentCore Reference Architecture for Text, Voice Messages, and Calls
AWS has released a CDK-deployable restaurant agent example in which three isolated runtimes share the same memory and MCP backend tools. The voice path uses Nova 2 Sonic for speech-to-speech processing directly, but WebRTC, TURN, identity linking, and fixed networking costs still require independent governance.

AWS has released a complete [reference implementation for a multimodal WhatsApp food-ordering agent](https://aws.amazon.com/blogs/machine-learning/deploy-a-multimodal-whatsapp-ordering-assistant-with-amazon-bedrock-agentcore/) that connects text, voice messages, and real-time calls to the same business account. It does not use a single model for every medium: the system creates three AgentCore Runtimes, with Nova 2 Lite handling text and Nova 2 Sonic handling voice messages and calls. Each session runs in an isolated microVM, while the three paths share AgentCore Memory through a hashed customer identifier.
The public [GitHub example](https://github.com/aws-samples/sample-multimodal-whatsapp-restaurant-agent) separates the channel, agent, and order-backend layers. The WhatsApp webhook first validates the Meta signature, sends the event to SQS, and immediately returns HTTP 200. A background worker then downloads media, selects a runtime, and invokes the agent. Menu, cart, ordering, and location-query functionality is not embedded directly in the prompt. Instead, AgentCore Gateway wraps the REST backend as MCP tools such as `GetMenu`, `AddToCart`, and `PlaceOrder`, backed by Lambda, DynamoDB, and Amazon Location Service.
For voice messages, the system decodes OGG Opus into 16 kHz PCM, performs speech-to-speech processing directly, and then encodes the output back into OGG, with no separate transcription service in the path. Calls are more complex: the Meta Calling API supplies a WebRTC SDP offer, and the `aiortc` runtime inside a VPC waits for ICE gathering to complete before returning a single SDP answer. DTLS/SRTP media is carried through a managed TURN relay provided by Kinesis Video Streams. These details make the example more representative of a real-world communications system than a typical chatbot tutorial.
However, it remains a reference architecture rather than a production-ready system validated through load and failure testing. Deployment requires multiple AWS and Meta permissions, while model and AgentCore availability is limited by region. The NAT gateway for the calling VPC also introduces a fixed cost. Although cross-channel memory links identities using a peppered hash of the phone number, operators must still address consent, retention periods, deletion, and erroneous identity merges. The next areas worth watching are interruption handling, tool idempotency, payment authorization, voice latency, and human handoff—not merely whether the demonstration can complete an order.