Amazon Nova 2 Sonic を活用した医療予約エージェントの構築方法
AWS は、Amazon Nova 2 Sonic と Bedrock AgentCore を活用した音声 AI エージェントの構築ガイドを公開し、医療現場の欠席率削減に向けた実用的なソリューションを提供している。
キーポイント
音声対話型エージェントの実装
Amazon Nova 2 Sonic の音声対話機能と Bedrock AgentCore を組み合わせ、患者認証から予約変更までを自然な会話で処理するエージェントを構築する方法を解説している。
医療現場の課題解決への応用
米国医療における 5〜30% に及ぶ欠席率(no-show rate)という深刻な経済的損失に対し、スケーラブルな自動通話システムで対応する具体的なユースケースを提示している。
サーバーレスアーキテクチャの構成
Cognito による認証、DynamoDB でのデータ永続化、SNS 通知、そして React フロントエンドとの WebSocket 連携を含む、完全なサーバーレスデプロイメントの構成を示している。
従来の手法との技術的比較
STT、LLM、TTS を個別に連結する従来アプローチの遅延や文脈欠落の問題を指摘し、エンドツーエンドの音声対話(Speech-to-Speech)による効率化を強調している。
Amazon Nova 2 Sonic の初期設定
us-east-1 リージョンでモデルを起動し、入力・出力サンプリングレート 16kHz と「Tiffany」ボイスを指定して音声入力を構成しています。
医療用ツールの統合
7 つの医療関連ツールをプロバイダー設定に含めることで、エージェントが実際の予約処理や情報提供を実行可能になっています。
モジュール型のツール設計
各機能(予約変更、健康情報収集など)を個別のPython関数として実装し、システムプロンプトと組み合わせることで、新機能の追加や既存ツールの交換が容易に可能。
影響分析・編集コメントを表示
影響分析
この記事は、生成 AI が単なるテキスト処理から、実社会のインフラ(医療予約システム)を直接支える音声インターフェースへと進化することを示す重要な事例です。特に、遅延や文脈欠落という技術的課題を「Speech-to-Speech」アーキテクチャで解決し、具体的なビジネス指標(収益損失、患者ケアの遅れ)と結びつけている点が高く評価されます。
編集コメント
医療現場の深刻な課題に対し、最新の音声 AI モデルを具体的なアーキテクチャで解決する実践的なアプローチが示されており、業界実装への道筋が明確です。
クリニックや病院ネットワークを運営している方なら、予約の欠席によるコストをご存じのことと思います。米国の医療業界全体での平均的な欠席率は専門分野によって異なりますが、5〜30%の範囲にあり[1]、これは年間約1,500億ドルの損失をもたらすという報告もあります。各空いた予約枠は、収益の喪失、提供者(医療従事者)の時間遊休、および患者ケアの遅延を意味します。標準的な対応策である、患者一人ひとりに電話をかけて確認や再調整を行う方法は、スケーラビリティに欠けます。
本記事では、Amazon Nova 2 Sonic と Amazon Bedrock AgentCore を活用して、予約リマインダーの会話に対応する音声エージェントを構築する方法を解説します。このエージェントは、音声による患者認証を行い、予約の確認・キャンセル・再調整を管理し、訪問前の健康情報を収集し、必要に応じて人間スタッフへエスカレーションします。これにより、日常的な通話を大規模に処理でき、欠席率の低下につながります。本サンプルでは、問題解決におけるエージェント側の側面、すなわち音声会話とツールオーケストレーションに焦点を当てています。テスト用のブラウザベースインターフェースも含まれています。実際の電話回線への接続や発信を行うには、Amazon Connect Customer などのテレフォニーサービスとの統合が必要です。
[1] https://www.healthcarefinancenews.com/news/missed-appointments-cost-providers-150-billion-annually-report-says
このウォークスルーでは、完全な構築プロセスを解説します。Amazon Nova 2 Sonic の音声対音声機能を活用して自然な予約会話を行う動作する音声エージェントが Amazon Bedrock で利用可能になります。また、患者認証、スケジュール調整、エスカレーションのために Strands Agents SDK を用いて構築された 7 つの医療特化型ツールも用意されています。サーバーレスデプロイメントは、Amazon Bedrock AgentCore 上で実行され、Amazon Cognito による認証、Amazon DynamoDB による永続化、および Amazon Simple Notification Service (Amazon SNS) による通知が利用されます。ブラウザベースの React フロントエンドは、認証された WebSocket 接続を介して双方向オーディオをストリーミングします。
ソリューション概要
予約通話を効果的に自動化するには、単一の対話内で複数のステップ(本人確認、予約詳細の提示、変更処理、健康情報の収集)を処理できる会話型 AI システムが必要です。
従来のアプローチでは、個別のサービスを連鎖させています。音声認識モデルが患者の言葉を文字起こしし、テキストベースの大規模言語モデル(LLM)が応答を生成し、音声合成モデルがそれを読み上げます。各引き継ぎには遅延が生じ、文脈が失われます。文字起こしの段階では、トーンやためらい、緊急性といった声のニュアンスが捨てられてしまいます。LLM は患者が何を言ったかしか理解できず、「どのように」言ったかは聞き取れません。医療現場では、患者の不安や混乱に応じてエージェントの応答方法を変える必要があるため、この情報の喪失は重大な問題となります。
本エージェントは、2 つの AWS サービスを組み合わせることで異なるアプローチを採用しています。
Amazon Nova 2 Sonic
Amazon Nova 2 Sonic は、双方向ストリーミングによるリアルタイム会話型 AI を可能にする、Amazon Bedrock で利用可能な音声対音声モデルです。個別の文字起こし、推論、合成サービスを連鎖させるのではなく、Nova 2 Sonic は単一のモデル内で音声をネイティブに処理するため、トーンや速度といった声の文脈が文字起こしの過程で失われることがありません。Nova 2 Sonic がどのように音声を処理し、音響的文脈に適応するかについては、Amazon Nova Sonic の紹介 ブログ記事をご覧ください。
このエージェントにおいて、Nova 2 Sonic はいくつかの重要な機能を提供します。ネイティブの音声対音声処理により、会話のやり取りを通じて声のニュアンスが保持されるため、エージェントは hesitation(躊躇)や concern(懸念)を察知しながらも文脈を失いません。ツール呼び出しの精度が高いことで、多段階の医療ワークフローが軌道に乗ります。モデルは、いつ認証を行うべきか、いつスケジュールを検索すべきか、そしていつ予約を行うべきかを理解しています。低遅延の双方向ストリーミングにより、会話は応答性に富んでいます。また、このモデルは家庭や臨床環境で一般的に見られる背景雑音や、訛りのある英語にも対応するように設計されています。最後に、多言語サポートにより、エージェントは設定変更なしに会話中に患者が好む言語へ切り替えることができます。対応言語については Amazon Nova 2 Sonic のドキュメント をご覧ください。
Amazon Bedrock AgentCore
Amazon Bedrock AgentCore は、エンタープライズセキュリティを備えた大規模な AI エージェント実行のためのサーバーレスでフレームワークに依存しないランタイムを提供します。エージェントロジックはコンテナとしてデプロイされ、AgentCore がインフラストラクチャ、スケーリング、および AWS Identity and Access Management (IAM) による認証 WebSocket エンドポイントを処理します。本実装では、Nova 2 Sonic との双方向音声ストリーミングを管理するために、Strands Agents SDK の BidiAgent クラスを使用しています。
アーキテクチャ
以下の図は、各コンポーネントがどのように接続されているかを示しています。React フロントエンドは、SigV4 で署名された WebSocket 接続を介して Amazon Bedrock AgentCore と通信します。Nova 2 Sonic を基盤とする Strands BidiAgent がリアルタイムの音声会話を処理し、DynamoDB テーブルから読み書きを行う医療用ツールや、Amazon SNS への公開を実行します。

*図 1: 医療予約エージェントのアーキテクチャ*
React フロントエンドはブラウザ内でマイクからの音声をキャプチャし、WebSocket を介してエージェントにストリーミングします。WebSocket はクライアントとサーバー間の永続的な双方向接続を維持するプロトコルです。この接続を保護するため、フロントエンドは Amazon Cognito(一時的な AWS 認証情報を発行するアイデンティティサービス)を通じてユーザーの認証を行い、AWS の標準的なリクエスト署名プロトコルである SigV4 を用いて各リクエストに署名します。
Amazon Bedrock AgentCore Runtime は、コンテナ化された Strands BidiAgent をホストし、インフラストラクチャの管理とスケーリングを担当します。Nova 2 Sonic は音声入力を受け取り、会話の推論を行い、必要に応じてツールを呼び出し、音声応答を生成します。3 つの DynamoDB テーブルには、患者記録、予約詳細、利用可能な時間枠が格納されています。Amazon SNS は、患者が人間との通話を希望した場合にエスカレーション通知を公開します。
Wiring it together
Strands SDK は双方向音声ストリーミングの複雑さを処理します。エージェント全体のセットアップは数行で完了します:
from strands.experimental.bidi import BidiAgent
from strands.experimental.bidi.models import BidiNovaSonicModel
model = BidiNovaSonicModel(
region="us-east-1",
model_id="amazon.nova-2-sonic-v1:0",
provider_config={
"audio": {
"input_sample_rate": 16000,
"output_sample_rate": 16000,
"voice": "tiffany",
}
},
tools=tools, # 以下に列挙する 7 つの医療用ツール
)
agent = BidiAgent(
model=model,
tools=tools,
system_prompt=system_prompt,
)
WebSocket ハンドラ内で、入力と出力を接続します
await agent.run(
inputs=[receive_audio],
outputs=[send_audio],
)
BidiAgent にはツールリストとシステムプロンプトを渡して Nova 2 Sonic を指し示すだけで、SDK がストリーミングセッションを管理します。オーディオを受信し、モデルが判断したタイミングでツールを呼び出し、音声応答を返送します。
Healthcare tools
音声エージェントは、通話の各ステップを進めるために 7 つのツールを使用します。各ツールは、Strands Agents SDK の@tool デコレータで装飾された Python 関数として実装されています。Nova 2 Sonic は患者の発言に基づいて、どのツールをいつ呼び出すかを判断します。例えば、患者が予約の再調整を求めた場合、Nova 2 Sonic は find_available_slots を呼び出して DynamoDB にクエリを実行し、音声で選択肢を提示した上で、book_appointment_slot を呼び出して変更を確定させます。
このツールベースの設計により、エージェントの残りを再記述することなく、個々のツールの交換や拡張が可能になります。新しい機能(例えば保険情報の収集など)を追加するには、1 つの新しい @tool 関数を作成し、システムプロンプトを更新するだけです。
ツール
その機能
動作方法
authenticate_patient
氏名と社会保障番号 (SSN) の下 4 桁を用いて本人確認を行います。グローバルセカンダリインデックス (GSI) を通じて DynamoDB の Patients テーブルにクエリを実行します。1 つの名前組み合わせあたり最大 3 回の試行制限を適用します。成功した場合、患者の詳細と今後の予約情報を返します。
confirm_appointment
既存の予約を確認します。
DynamoDB 上で予約ステータスを「Scheduled」または「Rescheduled」から「Confirmed」に更新します。二重確認を防ぐための冪等性チェックを含みます。
cancel_appointment
予約をキャンセルします(任意の理由を指定可能)。
ステータスを「Canceled」に更新し、タイムスタンプ付きの注記を追加します。「Scheduled」、「Confirmed」、または「Rescheduled」の予約のみが対象となります。
find_available_slots
再スケジュールのための空き時間枠を検索します。
予約記録からプロバイダーを参照し、ProviderDateIndex GSI を通じて AvailableSlots テーブルにクエリを実行します。音声会話を簡潔に保つため、最大 3 つの選択肢を返します。
book_appointment_slot
選択された時間枠を予約します。
DynamoDB の条件付き書き込みを使用して、並行リクエスト下で二重予約が発生しないように、その時間枠を原子的に「使用中」マークに更新し、予約情報を新しい日付と時刻で更新します。
record_health_update
受診前の健康情報を記録します。
タイムスタンプ付きのメモを予約記録に追加します。医療状態、アレルギー、同伴者の有無、特定の懸念事項の 4 つの項目を収集しますが、これらは一度に一つずつ質問されます。
escalate_to_agent
通話内容を人間による折り返し連絡が必要な案件としてフラグ付けます。
6 桁のリファレンス番号を生成し、予約ステータスを「エスカレート済み」に更新するとともに、患者情報とエスカレーション理由を含む Amazon SNS メッセージを公開します。
How the agent handles a call
エージェントが患者に接続すると、BidiAgent は 4 つのフェーズを通じて通話全体を管理します。会話の流れは エージェントのシステムプロンプト に定義されており、ユースケースに合わせてカスタマイズ可能です。以下は再予約フローからの抜粋で、プロンプトがどのようにマルチツールオーケストレーションを駆動するかを示しています。
予約変更フロー
患者様が予約の変更を希望される場合:
- ご希望の時間帯(午前・午後、特定の日付)をお伺いします
- find_available_slots ツールを使用して利用可能なスロットを検索します
- 2〜3 の選択肢を提示し、患者様に選んでいただきます
- 変更完了後、確認時と同様の健康情報(4 つの質問)を収集します
Nova 2 Sonic は、各ツールをいつ呼び出すかを決定するためにこれらの指示に従います。プロンプトを編集することで、新しいフローを追加したり既存のものを変更したりできます。
必ず JSON 形式で返してください。translation フィールドのみ。他のフィールド (technical_terms 等)は一切追加しないこと — 余計なフィールドを書こうとして本文翻訳がトークン上限で打ち切られる事故を防ぐため:
{"translation": "## 予約変更フロー\n患者様が予約の変更を希望される場合:\n1. ご希望の時間帯(午前・午後、特定の日付)をお伺いします\n2. find_available_slots ツールを使用して利用可能なスロットを検索します\n3. 2〜3 の選択肢を提示し、患者様に選んでいただきます\n4. 変更完了後、確認時と同様の健康情報(4 つの質問)を収集します \n\nNova 2 Sonic は、各ツールをいつ呼び出すかを決定するためにこれらの指示に従います。プロンプトを編集することで、新しいフローを追加したり既存のものを変更したりできます。"}
- 認証 – Nova 2 Sonic は患者に挨拶し、氏名と社会保障番号の最後の 4 桁を尋ねます。確認前に、エージェントは聞き取った内容を繰り返し、患者に確認を求めます。これにより、名前や数字の音声認識エラーを検出できます。authenticate_patient ツールは DynamoDB を照会して本人確認を行います。3 回の試行で認証が失敗した場合、セキュリティのため人間担当者にエスカレーションされます。
- 予約管理 – 認証後、Nova 2 Sonic は担当医の名前、日付、時刻を含む今後の予約詳細を表示します。患者は確認、キャンセル、または再スケジュールを選択できます。再スケジュールの場合、エージェントは希望時間帯(午前か午後)や希望日付などの好みを聞き取り、利用可能なスロットを照会し、最大 3 つの選択肢を提示して新しい時間を予約します。
- 健康情報収集 – 確認済みまたは再スケジュールされた予約に対して、エージェントは受診前の健康情報を収集します。既存の病状、アレルギー、同伴者の有無、今回の受診に関する特定の懸念事項について質問します。自然な会話の流れとなるよう、各質問は一度に一つずつ行われます。
- エスカレーション – いかなる時点でも、患者が人間との通話を希望する場合、エージェントはその理由を記録し、6 桁の参照番号を生成して Amazon SNS 通知を発信します。これにより、スタッフは 24 時間以内に患者へ折り返し電話を行うことができます。
エージェントのデプロイ
完全なソースコードは、GitHub リポジトリ で利用可能です。以下の手順に従って、お客様の AWS アカウントでエージェントをデプロイしてください。
事前準備
開始する前に、必ず以下が用意されていることを確認してください:
- Amazon Bedrock およびターゲットとする AWS リージョン内で Nova 2 Sonic モデルへのアクセス権限を持つ AWS アカウント。
- お客様のアカウントにインストールされ、ブートストラップされた AWS Cloud Development Kit (AWS CDK) v2。
- Python 3.12 以降。
- Node.js 20 以降。
- Docker。
ステップ 1: リポジトリのクローン
git clone https://github.com/aws-samples/sample-Nova-Sonic-AgentCore-Healthcare-Call-Center.git
cd sample-Nova-Sonic-AgentCore-Healthcare-Call-Center
ステップ 2: インフラストラクチャのデプロイ
AWS CDK スack は、必要なすべてのリソース(Cognito ユーザーおよびアイデンティティプール、DynamoDB テーブル、Amazon SNS トピック、コンテナ化されたエージェントを含む AgentCore ランタイム)をプロビジョニングします。
cd infrastructure
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
cdk deploy --require-approval never
デプロイが完了したら、AWS CloudFormation の出力を確認してください。フロントエンドを設定するには、Cognito ユーザープール ID、クライアント ID、アイデンティティプール ID、および AgentCore ランタイム ARN が必要です。
ステップ 3: テストユーザーの作成
テスト用の Cognito ユーザーを作成します。以下の YOUR_COGNITO_USER_POOL_ID を、CDK の出力から取得した値に置き換えてください:
aws cognito-idp admin-create-user \
--user-pool-id \
--username testuser \
--temporary-password TempPass123!
aws cognito-idp admin-set-user-password \
--user-pool-id \
--username testuser \
--password \
--permanent
ステップ 4: フロントエンドの設定と実行
環境変数のテンプレートファイルをコピーし、CDK の出力結果から値を入力してください:
cd ../frontend
npm install
cp .env.example .env
CDK の出力値を .env ファイルに編集して入力
npm run dev
ブラウザで http://localhost:5173 を開き、テストユーザーでサインインし、メニューから患者を選択してStart Call(通話開始)をクリックすると、音声通話が開始されます。
ステップ 5: デモデータの初期化
CDK スackはデプロイ中に自動的にサンプルの患者レコードを初期化します。データの再初期化やカスタマイズが必要な場合は、以下を実行してください:
python3 scripts/seed_data.py
テストには、以下の事前に設定された患者のいずれかを使用できます:
患者名
SSN の下 4 桁
John Smith
1234
Jane Doe
5678
Michael Johnson
9012
サンプル会話
以下の通話記録はテストデプロイからのものです。ここでは、エージェントが患者の認証を行い、新しい予約時間を見つけ、予約を確定し、受診前の健康情報を収集する完全な再調整のやり取りを示しています。

*図2:ライブの患者通話中のヘルスケア音声アシスタントインターフェース*
エージェント:「こんにちは、アムス・ヘルスケアのノヴァです。今後の予約についてご連絡しています。本人確認のため、お名前と社会保障番号の最後の 4 桁をお聞かせいただけますか?」
患者:「ジョン・スミス、1234 です。」
エージェント:「確認いたします。お名前はジョン・スミス、社会保障番号は 1, 2, 3, 4 でよろしいでしょうか?」
患者:「はい、その通りです。」
エージェント:「ご確認ありがとうございます。6 月 14 日午後 4 時 30 分に予定されているジョンソン医師との年次健診についてご連絡しています。この予約を確認されますか?」
患者:「実は、予約を変更したいのです。」
原文を表示
If you run a clinic or hospital network, you already know the cost of missed appointments. The average no-show rate across US healthcare sits between 5–30 percent, depending on specialty. Each empty slot represents lost revenue, idle provider time, and delayed patient care. The standard fix, calling patients one by one to confirm or reschedule, doesn’t scale.
In this post, you will learn how to build a voice agent that handles appointment reminder conversations using Amazon Nova 2 Sonic and Amazon Bedrock AgentCore. The agent authenticates patients by voice, manages appointments (confirm, cancel, or reschedule), collects pre-visit health information, and escalates to human staff when needed. You handle routine calls at scale, which can help reduce no-show rates. This sample focuses on the agentic side of the problem: voice conversation and tool orchestration. A browser-based interface is included for testing. To connect the agent to actual phone lines for outbound dialing, you would integrate a telephony service such as Amazon Connect Customer.
This walkthrough takes you through the full build. You get a working voice agent on Amazon Bedrock that conducts natural appointment conversations using the speech-to-speech capabilities of Amazon Nova 2 Sonic, plus seven healthcare-specific tools built with the Strands Agents SDK for patient authentication, scheduling, and escalation. The serverless deployment runs on Amazon Bedrock AgentCore with Amazon Cognito authentication, Amazon DynamoDB persistence, and Amazon Simple Notification Service (Amazon SNS) notifications. A browser-based React frontend streams bidirectional audio over authenticated WebSocket connections.
Solution overview
To automate appointment calls effectively, you need a conversational AI system that handles multiple steps in a single interaction: verifying identity, presenting appointment details, processing changes, and collecting health information.
A traditional approach chains together separate services. A speech-to-text model transcribes the patient’s words, a text-based large language model (LLM) generates a response, and a text-to-speech model reads it back. Each handoff introduces latency and drops context. The transcription step discards vocal cues like tone, hesitation, and urgency. The LLM doesn’t hear *how* the patient said something, only *what* they said. In healthcare, where a patient’s anxiety or confusion should change how the agent responds, that loss matters.
This agent takes a different approach by combining two AWS services.
Amazon Nova 2 Sonic
Amazon Nova 2 Sonic is a speech-to-speech model available on Amazon Bedrock that enables real-time conversational AI with bidirectional streaming. Instead of chaining separate transcription, reasoning, and synthesis services, Nova 2 Sonic processes speech natively in a single model—so vocal context like tone and pace isn’t lost to transcription. For more information about how Nova 2 Sonic processes speech and adapts to acoustic context, see the Introducing Amazon Nova Sonic blog post.
For this agent, Nova 2 Sonic provides several key capabilities. Its native speech-to-speech processing retains vocal nuance across turns, so the agent picks up on hesitation or concern without losing context. Tool-calling accuracy keeps multi-step healthcare workflows on track. The model knows when to authenticate, when to query schedules, and when to book. Low-latency bidirectional streaming keeps conversations responsive. The model is also designed to handle background noise common in home and clinical environments, and accented English. Finally, multilingual support lets the agent switch to the patient’s preferred language mid-conversation without configuration changes. See the Amazon Nova 2 Sonic documentation for supported languages.
Amazon Bedrock AgentCore
Amazon Bedrock AgentCore provides a serverless, framework-agnostic runtime for running AI agents at scale with enterprise security. You deploy your agent logic as a container, and AgentCore handles infrastructure, scaling, and AWS Identity and Access Management (IAM)-authenticated WebSocket endpoints. This implementation uses the Strands Agents SDK’s BidiAgent class to manage bidirectional voice streaming with Nova 2 Sonic.
Architecture
The following diagram shows how the components connect. A React frontend communicates with Amazon Bedrock AgentCore through a SigV4-signed WebSocket connection. The Strands BidiAgent, powered by Nova 2 Sonic, handles real-time voice conversations and invokes healthcare tools that read from and write to DynamoDB tables and publish to Amazon SNS.

*Figure 1: Architecture for the healthcare appointment agent*
The React frontend captures microphone audio in the browser and streams it to the agent over a WebSocket, a protocol that keeps a persistent two-way connection open between client and server. To secure that connection, the frontend authenticates users through Amazon Cognito (an identity service that issues temporary AWS credentials) and signs each request with SigV4, the standard AWS request-signing protocol.
Amazon Bedrock AgentCore Runtime hosts the containerized Strands BidiAgent, managing infrastructure and scaling. Nova 2 Sonic receives audio input, reasons for the conversation, invokes tools when needed, and generates audio responses. Three DynamoDB tables store patient records, appointment details, and available time slots. Amazon SNS publishes escalation notifications when a patient asks to speak with a human.
Wiring it together
The Strands SDK handles the complexity of bidirectional voice streaming. The entire agent setup fits in a few lines:
from strands.experimental.bidi import BidiAgent
from strands.experimental.bidi.models import BidiNovaSonicModel
model = BidiNovaSonicModel(
region="us-east-1",
model_id="amazon.nova-2-sonic-v1:0",
provider_config={
"audio": {
"input_sample_rate": 16000,
"output_sample_rate": 16000,
"voice": "tiffany",
}
},
tools=tools, # The seven healthcare tools listed below
)
agent = BidiAgent(
model=model,
tools=tools,
system_prompt=system_prompt,
)
# In the WebSocket handler, connect inputs and outputs
await agent.run(
inputs=[receive_audio],
outputs=[send_audio],
)You pass your tools list and system prompt to BidiAgent, point it at Nova 2 Sonic, and the SDK manages the streaming session. It receives audio, invokes tools when the model decides to, and sends audio responses back.
Healthcare tools
The voice agent uses seven tools to move through each call. Each tool is implemented as a Python function decorated with the Strands Agents SDK’s @tool decorator. Nova 2 Sonic decides when to invoke each tool based on what the patient says. For example, when a patient asks to reschedule, Nova 2 Sonic calls find_available_slots to query DynamoDB, presents the options by voice, and then calls book_appointment_slot to finalize the change.
This tool-based design means you can swap or extend individual tools without rewriting the rest of the agent. To add a new capability (for example, collecting insurance information), you write one new @tool function and update the system prompt.
Tool
What it does
How it works
authenticate_patient
Verifies identity using first name, last name, and last four digits of SSN.
Queries the DynamoDB Patients table through a Global Secondary Index (GSI). Enforces a three-attempt limit per name combination. On success, returns patient details and upcoming appointments.
confirm_appointment
Confirms an existing appointment.
Updates appointment status from Scheduled or Rescheduled to Confirmed in DynamoDB. Includes idempotent checks to prevent double-confirmation.
cancel_appointment
Cancels an appointment with an optional reason.
Updates status to Canceled with a timestamped note. Only operates on Scheduled, Confirmed, or Rescheduled appointments.
find_available_slots
Queries open time slots for rescheduling.
Looks up the provider from the appointment record and queries the AvailableSlots table through the ProviderDateIndex GSI. Returns up to three options to keep the voice conversation concise.
book_appointment_slot
Books a selected time slot.
Uses DynamoDB conditional writes to atomically mark the slot as taken, preventing double-booking under concurrent requests. Updates the appointment with the new date and time.
record_health_update
Captures pre-visit health information.
Appends timestamped notes to the appointment record. Collects four items (medical conditions, allergies, accompaniment, specific concerns); each asked one at a time.
escalate_to_agent
Flags the call for human callback.
Generates a six-digit reference number, updates the appointment status to Escalated, and publishes an Amazon SNS message with patient information and the escalation reason.
How the agent handles a call
When the agent connects to a patient, the BidiAgent manages the full conversation through four phases. The conversation flow is defined in the agent’s system prompt, which you can customize for your use case. Here is an excerpt from the reschedule flow, which shows how the prompt drives multi-tool orchestration:
## RESCHEDULE FLOW
If the patient wants to reschedule:
1. Ask about their preferred time (morning/afternoon, specific days)
2. Use the find_available_slots tool to find available slots
3. Present 2-3 options and let them choose
4. After rescheduling, gather health information (same 4 questions as confirmation)Nova 2 Sonic follows these instructions to decide when to invoke each tool. You can add new flows or modify existing ones by editing the prompt.
- Authentication – Nova 2 Sonic greets the patient and asks for their full name and the last four digits of their Social Security Number. Before verifying, the agent repeats back what it heard and asks the patient to confirm. This catches speech recognition errors on names or digits. The authenticate_patient tool queries DynamoDB to verify the identity. If verification fails after three attempts, the agent escalates to a human for security.
- Appointment management – After verification, Nova 2 Sonic presents the upcoming appointment details, including provider name, date, and time. The patient chooses to confirm, cancel, or reschedule. If they reschedule, the agent gathers preferences (morning or afternoon, preferred dates), queries available slots, presents up to three options, and books the new time.
- Health information collection – For confirmed or rescheduled appointments, the agent collects pre-visit health information. It asks about existing medical conditions, allergies, whether someone will accompany the patient, and any specific concerns for the visit. Each question is asked one at a time for natural conversation flow.
- Escalation – At any point, if the patient asks to speak with a human, the agent captures the reason, generates a six-digit reference number, and publishes an Amazon SNS notification so staff can call the patient back within 24 hours.
Deploying the agent
The complete source code is available in the GitHub repository. Follow these steps to deploy the agent in your AWS account.
Prerequisites
Before you start, make sure you have the following:
- An AWS account with access to Amazon Bedrock and the Nova 2 Sonic model in your target AWS Region.
- AWS Cloud Development Kit (AWS CDK) v2 installed and bootstrapped in your account.
- Python 3.12 or later.
- Node.js 20 or later.
- Docker.
Step 1: Clone the repository
git clone https://github.com/aws-samples/sample-Nova-Sonic-AgentCore-Healthcare-Call-Center.git
cd sample-Nova-Sonic-AgentCore-Healthcare-Call-CenterStep 2: Deploy the infrastructure
The AWS CDK stack provisions all the resources you need: Cognito user and identity pools, DynamoDB tables, an Amazon SNS topic, and the AgentCore Runtime with your containerized agent.
cd infrastructure
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
cdk deploy --require-approval neverWhen the deployment finishes, note the AWS CloudFormation outputs. You need the Cognito User Pool ID, Client ID, Identity Pool ID, and AgentCore Runtime ARN to configure the frontend.
Step 3: Create a test user
Create a Cognito user for testing. Replace `` with the value from your CDK output:
aws cognito-idp admin-create-user \
--user-pool-id \
--username testuser \
--temporary-password TempPass123!
aws cognito-idp admin-set-user-password \
--user-pool-id \
--username testuser \
--password \
--permanentStep 4: Configure and run the frontend
Copy the environment template and fill in the values from your CDK output:
cd ../frontend
npm install
cp .env.example .env
# Edit .env with your CDK output values
npm run devOpen http://localhost:5173 in your browser, sign in with your test user, choose a patient from the menu, and choose Start Call to begin a voice conversation.
Step 5: Seed demo data
The CDK stack seeds sample patient records automatically during deployment. If you need to re-seed or customize the data, run:
python3 scripts/seed_data.pyFor testing, use any of these pre-configured patients:
Patient name
SSN last 4
John Smith
1234
Jane Doe
5678
Michael Johnson
9012
Sample conversation
The following transcript comes from a test deployment. It shows a complete rescheduling interaction where the agent authenticates the patient, finds a new time slot, books it, and collects pre-visit health details.

*Figure 2: The Healthcare Voice Assistant interface during a live patient call*
Watch the full demo on YouTube.
Agent: “Hello, this is Nova from Acme Healthcare. I’m calling about your upcoming appointment. For verification, may I have your full name and the last four digits of your Social Security Number?”
Patient: “John Smith, 1234.”
Agent: “Let me confirm. I heard John Smith, one, two, three, four. Is that correct?”
Patient: “Yes, that’s right.”
Agent: “Thank you for verifying. I’m calling about your Annual Checkup with Dr. Johnson scheduled for June 14th at 4:30 PM. Would you like to confirm this appointment?”
Patient: “Actually, I need to reschedule.”
Agent:
関連記事
Loka が Amazon Nova 2 Sonic を活用した低遅延・自然な音声エージェントを構築
Loka は AWS ベースのソリューションで、Amazon Nova 2 Sonic を用いて顧客との対話を自然かつ低遅延に実現する会話型 AI エージェントを開発し、音声推論精度も向上させた。
Amazon Bedrock AgentCore を活用したタンパク質研究コパイロットの構築方法
AWS は、Amazon Bedrock AgentCore を使用して、研究者が自然言語でペプチドを検索し、AI が結果を要約するタンパク質研究用コパイロットを構築する方法を発表しました。
Fitbit Air は AI 健康データの混乱に対してより賢明なアプローチを採用
The Verge の記事は、Google Health Coach が睡眠不足や心拍変動の低下などに基づきユーザーの体調が崩壊寸前と警告する現状を指摘し、AI による健康指導の過剰反応という課題を浮き彫りにしている。
今日のまとめ
AI日報で今日の重要ニュースをまとめ読み