Amazon Nova Actによる競合価格情報の自動化
AWSのAmazon Nova Actというオープンソースのブラウザ自動化SDKを活用し、自然言語指示で競合価格を自動収集・分析するシステムを構築する方法を紹介する記事です。
キーポイント
手動競合価格監視の課題
従来の手動監視は時間とリソースを浪費し、データ品質やスケーラビリティに問題があり、遅れた情報に基づく意思決定は収益機会の損失を招く。
Amazon Nova Actによる自動化ソリューション
自然言語指示でWebサイトをナビゲートしデータを抽出するインテリジェントエージェントを構築できるオープンソースSDKを提供し、手動ワークフローを効率化する。
業界横断的な適用可能性
Eコマースだけでなく、保険、金融サービス、旅行・ホスピタリティなど、競合分析が必要な幅広い業界で同様の課題と自動化のニーズが存在する。
並列処理による価格収集
ThreadPoolExecutorを使用して最大10のブラウザセッションで並列に価格情報を収集し、効率化を図っています。
エラーハンドリング
ActError例外をキャッチしてエラー発生時にソースをスキップし、処理を継続できるようにしています。
キャプチャ処理の推奨方法
Nova Actはキャプチャを自動解決せず、倫理的理由から人間による手動解決を推奨している。ローカル実行時はact_get()で検出し、headless=Falseでユーザーがブラウザで解決できる。ACBTではHITL機能でリアルタイムに人間がセッションを引き継げる。
エラー処理とワークフロー監視
Nova ActはActErrorsを通じてエラーを表面化し、開発者がリトライやフォールバックロジックを実装できる。AWSコンソールではワークフローの詳細なトレース、スクリーンショット、ログを確認でき、デバッグとパフォーマンス分析を支援する。
影響分析・編集コメントを表示
影響分析
この記事は、特定のAWSサービス(Amazon Nova Act)の実用的な応用例を示す技術解説であり、競合分析の自動化という普遍的なビジネス課題に対する具体的な解決策を提供している。ただし、業界全体を変革するような画期的な技術発表ではなく、既存ツールの応用事例に焦点を当てている。
編集コメント
AWSブログからの実用的な技術解説記事。特定のサービス(Nova Act)の応用例として競合分析の自動化を紹介しており、開発者やデータ活用担当者にとって参考になる内容だが、より広範なAI/ML業界ニュースというよりは、AWSエコシステム内のソリューション事例と言える。
EC チームが市場での優位性を維持するためには、競合他社の価格を監視することが不可欠です。しかし、多くのチームは依然として手動追跡に縛られ、毎日個別のウェブサイトを確認するために数時間を浪費しています。この非効率的なアプローチは意思決定を遅らせ、運用コストを増大させ、収益の逸失や機会の損失につながる人的ミスのリスクを高めます。
Amazon Nova Act は、自然言語による指示を用いてウェブサイトをナビゲートしデータを抽出できるインテリジェントエージェントを構築するために使用されるオープンソースのブラウザ自動化 SDK です。本稿では、手動ワークフローを合理化し、リアルタイムの市場洞察に基づいたデータ駆動型の価格決定をチームが支援する、自動化された競合他社価格インテリジェンスシステムの構築方法について解説します。
手動による競合他社価格インテリジェンスの隠れたコスト
EC チームが競争力を維持するためには、タイムリーかつ正確な市場データが必要です。従来のワークフローは手動でありミスが発生しやすく、特定の製品について複数の競合他社のウェブサイトを検索し、価格やプロモーションデータを記録し、分析のためにこれらをスプレッドシートに統合するというプロセスを伴います。このプロセスにはいくつかの重要な課題があります:
- 時間とリソースの消費:手動での価格監視は、毎日スタッフの時間を数時間消費し、製品カタログが拡大するにつれてスケーラビリティに欠けるため、大きな運用コストとなります。
- データ品質の問題:手動データ入力には不整合や人的ミスが生じやすく、誤った情報に基づいて不適切な価格設定が行われる可能性があります。
- スケーラビリティの限界:製品カタログが拡大するにつれて、手動プロセスはますます持続不可能となり、競合分析においてボトルネックを生み出します。
- 洞察の遅れ:最も重要な問題はタイミングです。競合他社の価格は一日中急速に変化するため、古くなったデータに基づく意思決定は収益の損失や機会の逸失を招く可能性があります。
これらの課題は電子商取引に限定されません。保険会社は市場での競争力を維持するために、競合他社の保険条項、補償範囲、除外事項、および保険料構造を定期的にレビューしています。金融サービス機関も、ローン金利、クレジットカードのオファー、手数料構造などを、時間のかかる手動チェックを通じて分析しています。旅行・ホスピタリティ業界では、フライト、宿泊施設、パッケージなどの価格変動を監視し、提供内容を動的に調整しています。業種に関わらず、同じような課題が存在します。手動調査は遅く、労働集約的であり、人的ミスを起こしやすいものです。価格が時間単位で変化する市場では、これらの遅延により競争力を維持することがほぼ不可能になります。
Amazon Nova Act を活用した自動化
Amazon Nova Act は、開発者が Web ブラウザ内で動作するエージェントを構築できるよう支援するための AWS サービスであり、対応する SDK も提供されています。開発者は Python でより小さくターゲットを絞ったコマンドを組み合わせて自動化を構成し、ブラウザ操作のための自然言語指示と、テスト、ブレークポイント、アサーション、並列化のためのスレッドプールなどのプログラム論理を組み合わせます。ツール呼び出し機能を通じて、開発者はブラウザアクションに API 呼び出しも併せて有効化できます。これにより、チームは自動化の実行方法とスケール方法を完全に制御できるようになります。Nova Act は、競合監視、コンテンツ検証、カタログ更新、多段階のブラウジングワークフローなどのタスクを自動化エージェントが処理するアジェンティック・コマースシナリオをサポートしています。競合価格インテリジェンスは特に適しており、その理由は SDK がレイアウト変更や動的コンテンツといった実世界の Web サイトの挙動に対応するように設計されているからです。
EC サイトでは頻繁にレイアウトが変更され、短期間のプロモーションが実施されたり、バナーやコンポーネントがローテーションされたりします。これらの変化は、固定された要素セレクタや硬直したナビゲーションパスに依存する従来のルールベースのスクリプトをしばしば破綻させます。Nova Act の柔軟で自然言語コマンド駆動のアプローチは、ページが進化してもエージェントの稼働を継続させるものであり、生産環境向けの競合インテリジェンスシステムに必要な耐性を提供します。
共通の構築ブロック
Nova Act には、ブラウザ自動化を簡素化する一連の構築ブロックが含まれています。これは、EC 企業が人手を介さずにウェブサイトから製品価格を収集・記録するために利用できます。これを実現する構築ブロックには以下のようなものがあります。
ウェブページからの情報抽出
Nova Act の抽出機能を用いると、エージェントはレンダリングされたウェブページから構造化データを直接収集できます。返却したいスキーマを表す Pydantic モデルを定義し、そのスキーマを使用して現在のブラウザページに関する質問に答えるよう act_get() 呼び出しを実行します。これにより、抽出されたデータが強力な型付けされ、検証済みとなり、下流の処理で即座に利用可能になります。
Nova.act_get("'iPad Pro 13-inch (M4 chip), 256GB Wi-Fi'を検索する", schema=ProductData.model_json_schema())
ウェブページへの移動
このステップでは、エージェントを特定のウェブページへリダイレクトして開始点とします。希望の開始点で新しいブラウザセッションが開かれ、エージェントがアクションを実行したりデータを抽出したりできるようになります。
nova.go_to_url(website_url)
複数のセッションを並列実行
価格インテリジェンスのワークロードでは、短時間で数十件の競合他社のページを確認する必要があるケースが頻繁にあります。単一の Nova Act インスタンスは一度にブラウザを一つしか起動できませんが、複数のインスタンスを同時に実行することは可能です。各インスタンスは軽量であるため、並列で複数起動して作業を分散させることが実用的です。これにより、異なる Nova Act インスタンスが同時に別々のタスクを処理する、マップ・リデュース型のブラウザ自動化アプローチが可能になります。検索やデータ抽出の処理を多数のインスタンスに並列化することで、組織は総実行時間を短縮し、最小限のレイテンシで大規模な製品カタログを監視できるようになります。
from concurrent.futures import ThreadPoolExecutor, as_completed
from nova_act import ActError, NovaAct
完全なリストをここに蓄積します。
all_prices = []
アクティブなブラウザセッションの最大数に最大ワーカー数を設定します。
with ThreadPoolExecutor(max_workers=10) as executor:
# 並列で全ての価格を取得します。
future_to_source = {
executor.submit(
check_source_price, product_name, source_name, source_url, headless
): source_name
for source_name, source_url in sources
}
# 結果を all_books に収集します。
for future in as_completed(future_to_source.keys()):
try:
source = future_to_source[future]
source_price = future.result()
if source_price is not None:
all_prices.extend(source_price.source)
except ActError as exc:
print(f"エラーによりソース価格をスキップします: {exc}")
print(f"{len(all_prices)}件のソース価格が見つかりました:\n{all_books}")
キャプチャ
一部のウェブサイトでは、自動化されたブラウジング中にキャプチャ(CAPTCHA)が表示されることがあります。倫理的な理由から、自動的な解決策を試みるのではなく、人間にキャプチャの解決を依頼することをお勧めします。Nova Act はユーザーに代わってキャプチャを解決するものではありません。
ローカルで Nova Act を実行する場合、ワークフローは act_get() 呼び出しを使用して、キャプチャが存在するかどうかを検出できます。キャプチャが検出された場合、ワークフローは一時停止し、ターミナルで起動されたプロセス内で input() を呼び出すなどして、ユーザーに手動での完了を促すことができます。これを実現するには、ヘッド付きモード(headless=False に設定します。これがデフォルトです)でワークフローを実行し、ユーザーがブラウザウィンドウと直接対話できるようにしてください。
Nova Act ワークフローを AgentCore Browser Tool (ACBT) とともにデプロイする際、組み込みの ヒューマン・イン・ザ・ループ(HITL)機能 を利用できます。ACBT は、AgentCore AWS コンソールからのライブストリーミングを備えたサーバーレスブラウザインフラストラクチャを提供します。キャプチャ(CAPTCHA)に遭遇した場合、UI 乗っ取り機能を通じて人間オペレーターがリアルタイムでブラウザセッションを引き継ぎ、課題を解決した後に制御権を Nova Act ワークフローに戻すことができます。
result = nova.act("画面にキャプチャがありますか?", schema=BOOL_SCHEMA) if result.matches_schema and result.parsed_response:
input("キャプチャを解決して完了したら Enter キーを押してください")
...
エラーの処理
Nova Act クライアントが起動した後、act() 呼び出し中にエラーが発生する可能性があります。これらの問題は、動的なレイアウト、要素の欠落、または予期せぬページの変更によって引き起こされます。Nova Act はこれらを ActError として表面化させるため、開発者はこれを捕捉して操作を再試行したり、フォールバックロジックを適用したり、詳細情報をログに記録してさらに分析を行ったりできます。これにより、価格インテリジェンスエージェントはサイレントフェイル(静かな失敗)を避け、ウェブサイトが予測不能な動作を示した場合でも実行を継続できるようになります。
Nova Act ワークフローの構築と監視
AI パワー型 IDE を活用した構築
Nova Act の自動化ワークフローを構築する開発者は、Nova Act IDE 拡張機能を備えた AI パワー型の開発環境を利用することで、実験とプロトタイピングのスピードを上げることができます。この拡張機能は、Kiro、Visual Studio Code、Cursor など人気の高い IDE で利用可能で、インテリジェントなコード生成や文脈に応じた支援を、お好みの開発環境に直接持ち込みます。Amazon Nova Act 用の IDE 拡張機能は、自然言語によるプロンプトを生産レベルのコードに変換することで、開発スピードを向上させます。ドキュメントを検索したり、反復的なボイラープレートコードを書いたりする代わりに、自動化の目標を記述するだけで済みます。これは、ThreadPoolExecutor のロジックをすばやく構築し、Pydantic スキーマ(データ検証用スキーマ)を設計し、堅牢なエラーハンドリングを実装するなど、競合価格インテリジェンスのような複雑なタスクにおいて特に役立ちます。
Nova Act コンソールでのワークフローの観察
Nova Act AWS コンソールでは、AWS Management Console を介して AWS 環境からの詳細なトレースとアーティファクトを提供し、ワークフローの実行状況を可視化します。これにより、自動化されたワークフローをリアルタイムで管理・監視するための一元化された場所が提供されます。ワークフロー実行 の高レベルなビューから、個々のセッション、アク(Act)、およびステップの詳細へとナビゲートできます。この可視性により、エージェントがどのように意思決定を行い、ループを実行するかを正確に示すことで、デバッグやパフォーマンス分析が可能になります。Amazon S3 に保存されたスクリーンショット、ログ、データへの直接アクセスにより、異なるツール間を行き来することなく迅速に問題のトラブルシューティングが行えます。これにより、トラブルシューティングプロセスが合理化され、実験から本番環境への展開までの反復サイクルが加速します。
ソリューションの実行
自動化された市場調査を開始していただくお手伝いとして、価格モニタリングの重労働を処理する Python ベースのサンプルプロジェクトをリリースしました。このソリューションは Amazon Nova Act を使用して複数のブラウザセッションを同時に起動し、さまざまな競合他社のサイト上で製品を検索します。自分でタブを切り替える代わりに、スクリプトがウェブをナビゲートして価格やプロモーションを探し出し、それを独自の価格モデルで使用できるようクリーンで構造化された形式にまとめます。以下のセクションでは、競争力のある価格インテリジェンスエージェントの構築を開始する方法について説明します。探索した後、AWS へのデプロイが可能となり、AWS Management Console でワークフローを監視できます。
競争力のある価格インテリジェンスエージェントは、Amazon Nova Samples GitHub リポジトリ内の AWS Samples ソリューションとして、「価格比較」ユースケースの一部として利用可能です。
1. 前提条件
開発環境には以下のものが含まれている必要があります:Python 3.10 以降と Nova Act SDK。
2. Nova Act API キーの取得
https://nova.amazon.com/act にアクセスして API キーを生成してください。Nova Act Playground を使用する場合、または API キー認証で Nova Act 開発者ツールを選択する場合は、nova.amazon.com の利用規約 に従ってアクセスおよび利用が行われます。
3. リポジトリのクローン、API キーの設定、依存関係のインストール
始めるには、リポジトリをクローンし、アプリケーションが認証できるように API キーを設定し、必要な Python の依存関係をインストールしてください。これにより、ローカル環境で問題なくプロジェクトを実行できるよう準備が整います。API キーは Nova Act で生成できます。
# リポジトリのクローン
https://github.com/aws-samples/amazon-nova-samples.git
cd nova-act/usecases/price_comparison
仮想環境の作成とアクティベーション(オプションですが推奨)
python3 -m venv .venv
source .venv/bin/activate
Windows の場合:
.venv\Scripts\activate
Python の依存関係のインストール
pip install -r requirements.txt
Nova Act API キーの設定 export NOVA_ACT_API_KEY="your_api_key"
4. スクリプトの実行
環境設定が完了したら、エージェントを実行して競合他社の価格インテリジェンス(price intelligence)を実施できます。このスクリプトは、製品名(オプション)と競合他社ウェブサイトのリスト(オプション)を受け取り、並列で Nova Act ブラウザセッションを開始し、各サイトを検索して価格やプロモーションの詳細を抽出し、構造化された集計結果を返します。
前述の例では、Amazon、Target、Best Buy、Costco などの主要小売業者を含むスクリプトデフォルトの競合他社リストを使用しています。スクリプト実行時に独自の競合他社 URL リストを指定することで、これらのデフォルトを上書きできます。
python -m main.py \
--product_name "iPad Pro 13-inch, 256GB Wi-Fi" \
--product_sku "MVX23LL/A" \
--headless
エージェントは、各競合他社サイトごとに並行して複数の Nova Act ブラウザセッションを開始します。各セッションでは小売業者のウェブサイトをロードし、キャプチャ(Captcha)が存在するかどうかを確認し、解決が必要な場合はユーザーの入力を待機します。クリアされた後、エージェントは製品を検索し、返された結果を確認し、最も関連性の高い出品をクリックして、価格とプロモーション情報を抽出します。これらのフローを並行実行することで、エージェントは複数サイト間の比較を効率的に完了できます。
例えば、Amazon を対象とする場合、エージェントは新しいブラウザセッションを開き、amazon.com に移動して、製品に対するサイト固有の検索を実行します。返された結果を検査し、クエリに最も密接に一致する製品の出品を特定し、価格、プロモーション、在庫状況、および関連メタデータなどの重要な詳細を抽出します。このプロセスは、以下のターミナル出力に示される各推論ステップで反映されています(本例の価格は参考値であり、実際の市場価格を表すものではありません):
583c> act("画面にキャプチャがありますか?JSON スキーマ形式で出力してください:{"type": "boolean"}")
583c> ...
583c> think("私は Amazon のホームページにいます。私のタスクは、画面にキャプチャがあるかどうかを返すことです。ページを見回してキャプチャを探そうと思います。キャプチャに見えるものは何も見つかりません。また、表示されるためにキャプチャが必要と思われるものも見当たりません。ページにキャプチャがないことを示すため、false を返すべきです。");
...
583c> act("'iPad Pro 13 インチ (M4 チップ), 256GB Wi-Fi'を検索してください。")
583c> ...
583c> think("私は Amazon のホームページにいます。私のタスクは、'iPad Pro 13 インチ (M4 チップ), 256GB Wi-Fi'を検索することです。空の検索フィールドが見えます。この検索フィールドに'iPad Pro 13 インチ (M4 チップ), 256GB Wi-Fi'と入力する必要があります。");
583c> ...
583c> think("検索フィールドに'iPad Pro 13 インチ (M4 チップ), 256GB Wi-Fi'が入力されているのが見えますが、検索はまだ開始されていません。したがって、私の直前のアクションは正しくありませんでした。検索フィールドの右側に検索ボタンが見え、これを使用して検索を完了できます。検索を完了するために、この検索ボタンをクリックします。");
...
583c> think("私は今、'iPad Pro 13 インチ (M4 チップ), 256GB Wi-Fi'の検索結果ページにいます。私のタスクは完了したので、戻ります。");
...
583c> think("私は Amazon の検索結果ページにいます(対象:"iPad Pro 13 インチ (M4 チップ), 256GB Wi-Fi")。私のタスクはすべての結果を確認し、最も関連性の高いものを見つけて、価格とプロモーションの詳細を抽出することです。指定された JSON 形式で情報を返す必要があります。製品の一覧が見えますが、最初の数件はスポンサー付きです。最も関連性が高く、非スポンサーの製品を見つけるために、ページを下にスクロールする必要があります。");
583c> ...
583c> think("ページが下にスクロールされ、より多くの製品が見えるようになりました。直前のスクロールアクションは成功しました。最初の非スポンサー製品として"Apple iPad Pro 13 インチ (M4): Apple Intelligence 向けに設計、Ultra Retina XDR ディスプレイ、256GB、12MP フロント/バックカメラ、LiDAR スキャナ、Wi-Fi 6E、Face ID、一日中続くバッテリー寿命 — スペースブラック"が見えます。製品の詳細ページへ移動して価格とプロモーション詳細を見つけるために、この製品をクリックすべきです。");
583c> ...
583c> think("私は今、"Apple iPad Pro (M4) 13 インチ (M4 チップ), 256GB Wi-Fi"の製品ページにいます。直前の製品クリックアクションは成功しました。製品の価格は$1,039.99 で、19% オフのプロモーションが行われていることがわかります。指定された JSON 形式で価格とプロモーション詳細を返すべきです。");
4. 出力の確認
エージェントがすべての競合他社サイトを検索し終えると、各小売業者、一致した製品、抽出された価格、プロモーションの詳細、および追加メタデータを列挙した統合テーブルを返します。このテーブルから、1 つのビュー内で複数のソース間の結果を比較することができます。例えば、出力は以下のようになります(本例の価格は参考値であり、実際の市場価格を表すものではありません):
| ソース | 製品名 | 製品 SKU | 価格 | プロモーション詳細 |
|---|---|---|---|---|
| Amazon | Apple iPad Pro (M4) 13-inch (M4 chip), 256GB Wi-Fi | MVX23LL/A | $1,039.99 | 19% オフ |
| Best Buy | Apple - 13-inch iPad Pro M4 chip Built for Apple Intelligence Wi-Fi 256GB with OLED - Silver | MVX23LL/A | $1239.00 | $50 引き |
| Costco | iPad Pro 13-inch (M4 chip), 256GB Wi-Fi | MVX23LL/A | $1039.99 | $200 オフ; 割引は 2025 年 11 月 12 日から 11 月 22 日まで有効。在庫限り。会員 1 人あたり最大 2 個まで |
| Target | Apple iPad Pro (M4) WiFi with Standard glass | MVX23LL/A | $999.00 | 水曜日にセール終了
エージェントは抽出された結果を CSV ファイルに書き込み、後で価格管理ツール、ダッシュボード、または内部 API と統合します。
結論
Amazon Nova Act は、ブラウザ自動化を複雑な技術タスクからシンプルな自然言語インターフェースへと変革し、小売業者が手動ワークフローを自動化し、運用コストを削減し、リアルタイムの市場インサイトを獲得できるようにします。手動データ収集に費やす時間を大幅に短縮することで、チームは戦略的な価格決定に注力できるようになります。このソリューションは、監視ニーズが増大してもリソースに比例した増加を必要とせず、効率的にスケーリング可能です。Nova Act は開発者にとって
原文を表示
Monitoring competitor prices is essential for ecommerce teams to maintain a market edge. However, many teams remain trapped in manual tracking, wasting hours daily checking individual websites. This inefficient approach delays decision-making, raises operational costs, and risks human errors that result in missed revenue and lost opportunities.
Amazon Nova Act is an open-source browser automation SDK used to build intelligent agents that can navigate websites and extract data using natural language instructions. This post demonstrates how to build an automated competitive price intelligence system that streamlines manual workflows, supporting teams to make data-driven pricing decisions with real-time market insights.
The hidden cost of manual competitive price intelligence
Ecommerce teams need timely and accurate market data to stay competitive. Traditional workflows are manual and error-prone, involving searching multiple competitor websites for certain products, recording pricing and promotional data, and consolidating this data into spreadsheets for analysis. This process presents several critical challenges:
- Time and resource consumption: Manual price monitoring consumes hours of staff time every day, representing a significant operational cost that scales poorly as product catalogs grow.
- Data quality issues: Manual data entry introduces inconsistency and human error, potentially leading to incorrect pricing decisions based on flawed information.
- Scalability limitations: As product catalogs expand, manual processes become increasingly unsustainable, creating bottlenecks in competitive analysis.
- Delayed insights: The most critical issue is timing. Competitor pricing can change rapidly throughout the day, meaning decisions made on stale data can result in lost revenue or missed opportunities.
These challenges extend far beyond ecommerce. Insurance providers routinely review competitor policies, inclusions, exclusions, and premium structures to maintain market competitiveness. Financial services institutions analyze loan rates, credit card offers, and fee structures through time-consuming manual checks. Travel and hospitality businesses monitor fluctuating prices for flights, accommodations, and packages to adjust their offerings dynamically. Regardless of the industry, the same struggles exist. Manual research is slow, labor-intensive, and prone to human error. In markets where prices change by the hour, these delays make it almost impossible to stay competitive.
Automating with Amazon Nova Act
Amazon Nova Act is an AWS service, with an accompanying SDK, designed to help developers build agents that can act within web browsers. Developers structure their automations by composing smaller, targeted commands in Python, combining natural language instructions for browser interactions with programmatic logic such as tests, breakpoints, assertions, or thread-pooling for parallelization. Through its tool calling capability, developers can also enable API calls alongside browser actions. This gives teams full control over how their automations run and scale. Nova Act supports agentic commerce scenarios where automated agents handle tasks such as competitive monitoring, content validation, catalogue updates, and multi-step browsing workflows. Competitive price intelligence is a strong fit because the SDK is designed to cope with real-world website behavior, including layout changes and dynamic content.
Ecommerce sites frequently change layouts, run short-lived promotions, or rotate banners and components. These shifts often break traditional rules-based scripts that rely on fixed element selectors or rigid navigation paths. Nova Act’s flexible, natural language command-driven approach helps agents continue operating even as pages evolve, providing the resilience needed for production competitive intelligence systems.
Common building blocks
Nova Act includes a set of building blocks that simplify browser automation. This can be used by ecommerce companies to collect and record product prices from websites without human intervention. The building blocks that enable this include:
Extracting information from a webpage
With the extraction capabilities in Nova Act, agents can gather structured data directly from a rendered webpage. You can define a Pydantic model that represents the schema that they want returned, then ask an act_get() call to answer a question about the current browser page using that schema. This keeps the extracted data strongly typed, validated, and ready for downstream use.
Nova.act_get("Search for 'iPad Pro 13-inch (M4 chip), 256GB Wi-Fi'.", schema=ProductData.model_json_schema())Navigate to a webpage
This step redirects the agent to a specific webpage as a starting point. A new browser session opens at a desired starting point, enabling the agent to take actions or extract data.
nova.go_to_url(website_url)Running multiple sessions in parallel
Price intelligence workloads often require checking dozens of competitor pages in a short period. A single Nova Act instance can invoke only one browser at a time, but multiple instances can run concurrently. Each instance is lightweight, making it practical to spin up several in parallel and distribute work across them. This enables a map‑reduce style approach to browser automation where different Nova Act instances handle separate tasks at the same time. By parallelizing searches or extraction work across many instances, organizations can reduce total execution time and monitor large product catalogs with minimal latency.
from concurrent.futures import ThreadPoolExecutor, as_completed
from nova_act import ActError, NovaAct
# Accumulate the complete list here.
all_prices = []
# Set max workers to the max number of active browser sessions.
with ThreadPoolExecutor(max_workers=10) as executor:
# Get all prices in parallel.
future_to_source = {
executor.submit(
check_source_price, product_name, source_name, source_url, headless
): source_name
for source_name, source_url in sources
}
# Collect the results in all_books.
for future in as_completed(future_to_source.keys()):
try:
source = future_to_source[future]
source_price = future.result()
if source_price is not None:
all_prices.extend(source_price.source)
except ActError as exc:
print(f"Skipping source price due to error: {exc}")
print(f"Found {len(all_prices)} source prices:\n{all_books}")Captchas
Some websites present captchas during automated browsing. For ethical reasons, we recommend involving a human to solve captchas rather than attempting automated solutions. Nova Act does not solve captchas on the user’s behalf.
When running Nova Act locally, your workflow can use an act_get() call to detect whether a captcha is present. If one is detected, the workflow can pause and prompt the user to complete it manually, for example, by calling input() in a terminal-launched process. To enable this, run your workflow in headed mode (set headless=False, which is the default) so the user can interact with the browser window directly.
When deploying Nova Act workflows with AgentCore Browser Tool (ACBT), you can use its built-in human-in-the-loop (HITL) capabilities. ACBT provides serverless browser infrastructure with live streaming from the AgentCore AWS Console. When a captcha is encountered, a human operator can take over the browser session in real-time through the UI takeover feature, solve the challenge, and return control to the Nova Act workflow.
result = nova.act("Is there a captcha on the screen?", schema=BOOL_SCHEMA) if result.matches_schema and result.parsed_response:
input("Please solve the captcha and hit return when done")
...Handling errors
Once the Nova Act client is started, it may encounter errors during an act() call. These issues can arise from dynamic layouts, missing elements, or unexpected page changes. Nova Act surfaces these situations as ActErrors so that developers can catch them, retry operations, apply fallback logic, or log details for further analysis. This helps price intelligence agents avoid silent failures and continue running even when websites behave unpredictably.
Building and Monitoring Nova Act workflows
Building with AI-powered IDEs
Developers building Nova Act automation workflows can accelerate experimentation and prototyping by using AI-powered development environments with Nova Act IDE extensions. The extension is available for popular IDEs including Kiro, Visual Studio Code, and Cursor, bringing intelligent code generation and context-aware assistance directly into your preferred development environment. The IDE extension for Amazon Nova Act speeds up development by turning natural language prompts into production-ready code. Instead of digging through documentation or writing repetitive boilerplate, you can simply describe your automation goals. This is helpful for complex tasks like competitive price intelligence, where the extension can help you quickly structure ThreadPoolExecutor logic, design Pydantic schemas, and build robust error handling.
Observing workflows in the Nova Act console
The Nova Act AWS console provides visibility into your workflow execution with detailed traces and artifacts from your AWS environment via the AWS Management Console. It provides a central place to manage and monitor automation workflows in real-time. You can navigate from a high-level view of the workflow runs into the specific details of individual sessions, acts, and steps. This visibility helps you to debug and analyze performance by showing you exactly how the agent makes decisions and executes loops. With direct access to screenshots, logs, and data stored in Amazon S3, you can troubleshoot issues quickly without switching between different tools. This streamlines the troubleshooting process and accelerates the iteration cycle from experimentation to production deployment.
Running the solution
To help you get started with automated market research, we’ve released a Python-based sample project that handles the heavy lifting of price monitoring. This solution uses Amazon Nova Act to launch multiple browser sessions at once, searching for products across various competitor sites simultaneously. Instead of going through tabs yourself, the script navigates the web to find prices and promotions. It then gathers everything into a clean, structured format so you can use it in your own pricing models. The following sections will describe how you can get started building the competitive price intelligence agent. After exploring, you can deploy to AWS and monitor your workflows in the AWS Management Console.
The competitive price intelligence agent is available as an AWS Samples solution in the Amazon Nova Samples GitHub repository as part of the Price Comparison use case.
1. Prerequisites
Your development environment must include: Python: 3.10 or later and the Nova Act SDK.
2. Get Nova Act API key:
Navigate to https://nova.amazon.com/act and generate an API key. When using the Nova Act Playground or choosing Nova Act developer tools with API key authentication, access and use are subject to the nova.amazon.com Terms of Use.
3. Clone the repo, set the API key, and install the dependencies:
To get started, clone the repository, set your API key so the application can authenticate, and install the required Python dependencies. This prepares your environment so you can run the project locally without issues. An API Key can be generated on Nova Act.
# Clone the repo
https://github.com/aws-samples/amazon-nova-samples.git
cd nova-act/usecases/price_comparison
# Create and activate a virtual environment (optional but recommended)
python3 -m venv .venv
source .venv/bin/activate
# Windows:
.venv\Scripts\activate
# Install Python dependencies
pip install -r requirements.txt
# Set the Nova Act API Key export NOVA_ACT_API_KEY="your_api_key"4. Running the script
Once your environment is set up, you can run the agent to perform competitive price intelligence. The script takes a product name (optional) and a list of competitor websites (optional), launches concurrent Nova Act browser sessions, searches each site, extracts price and promotional details, and returns a structured, aggregated result.
The previous example uses the script’s default competitor list, which includes major retailers such as Amazon, Target, Best Buy, and Costco. You can override these defaults by supplying your own list of competitor URLs when running the script.
python -m main.py \
--product_name "iPad Pro 13-inch, 256GB Wi-Fi" \
--product_sku "MVX23LL/A" \
--headlessThe agent launches multiple Nova Act browser sessions in parallel, one per competitor site. Each session loads the retailer’s website, checks whether a captcha is present, and pauses for user input if one needs to be solved. Once clear, the agent searches for the product, reviews the returned results, clicks the most relevant listing, and extracts the price and promotional information. Running these flows concurrently allows the agent to complete a multi-site comparison efficiently.
For example, when targeting Amazon, the agent opens a fresh browser session, navigates to amazon.com, and performs a site-specific search for the product. It inspects the returned results, identifies the product listing that most closely matches the query, and extracts key details such as price, promotions, availability, and relevant metadata. This process is reflected in the following terminal output that reflects each reasoning step (prices in this example are illustrative and not representative of real market prices):
583c> act("Is there a captcha on the screen?, format output with jsonschema: {"type": "boolean"}")
583c> ...
583c> think("I am on the Amazon homepage. My task is to return whether there is a captcha on the screen. I can look around the page to try and find a captcha. I don't see anything that looks like a captcha. I also don't see anything that seems like it would require a captcha to be displayed. I should return false to indicate that there is no captcha on the page.");
...
583c> act("Search for 'iPad Pro 13-inch (M4 chip), 256GB Wi-Fi'.")
583c> ...
583c> think("I am on the amazon homepage. My task is to search for 'iPad Pro 13-inch (M4 chip), 256GB Wi-Fi'. I see an empty search field. I need to type 'iPad Pro 13-inch (M4 chip), 256GB Wi-Fi' into the search field.");
583c> ...
583c> think("I see that the search field is populated with 'iPad Pro 13-inch (M4 chip), 256GB Wi-Fi', but the search has not been initiated. Therefore, my last action was not correct. I see a search button to the right of the search field which can be used to complete the search. I will click on the search button to complete the search.");
...
583c> think("I am now on the search results page for 'iPad Pro 13-inch (M4 chip), 256GB Wi-Fi'. My task is complete, and I need to return.");
...
583c> think("I am on the Amazon search results page for "iPad Pro 13-inch (M4 chip), 256GB Wi-Fi". My task is to review all the results and find the most relevant one, then extract the price and any promotion details. I need to return the information in the specified JSON format. I see a list of products, but the first few are sponsored. I should scroll down the page to find the most relevant, non-sponsored product.");
583c> ...
583c> think("The page has scrolled down and I see more products. My prior action of scrolling down was successful. I see the first non-sponsored product, which is the "Apple iPad Pro 13-Inch (M4): Built for Apple Intelligence, Ultra Retina XDR Display, 256GB, 12MP Front/Back Camera, LiDAR Scanner, Wi-Fi 6E, Face ID, All-Day Battery Life — Space Black". I should click on the product to navigate to its page and find the price and promotion details.");
583c> ...
583c> think("I am now on the product page for the "Apple iPad Pro (M4) 13-inch (M4 chip), 256GB Wi-Fi". My prior action of clicking on the product was successful. I see the price of the product is $1,039.99 and there is a promotion for 19% off. I should return the price and promotion details in the specified JSON format.");4. Reviewing the output
After the agent finishes searching all competitor sites, it returns a consolidated table that lists each retailer, the matched product, the extracted price, the promotion details, and additional metadata. From this table, you can compare results across multiple sources in one view. For example, the output might look as follows (prices in this example are illustrative and not representative of real market prices):
| Source | Product Name | Product SKU | Price | Promotion Details |
|--------|--------------|-------|-------|-------------------|
| Amazon | Apple iPad Pro (M4) 13-inch (M4 chip), 256GB Wi-Fi | MVX23LL/A | $1,039.99 | 19% off |
| Best Buy | Apple - 13-inch iPad Pro M4 chip Built for Apple Intelligence Wi-Fi 256GB with OLED - Silver | MVX23LL/A | $1239.00 | Save $50 |
| Costco | iPad Pro 13-inch (M4 chip), 256GB Wi-Fi | MVX23LL/A | $1039.99 | $200 OFF; savings is valid 11/12/25 through 11/22/25. While supplies last. Limit 2 per member. |
| Target | Apple iPad Pro (M4) WiFi with Standard glass | MVX23LL/A | $999.00 | Sale ends Wednesday |The agent writes the extracted results to a CSV file to later integrate with pricing tools, dashboards, or internal APIs.
Conclusion
Amazon Nova Act transforms browser automation from a complex technical task into a simple natural language interface, so retailers can automate manual workflows, reduce operational costs, and gain real-time market insights. By significantly reducing the time spent on manual data collection, teams can shift their focus to strategic pricing decisions. The solution scales efficiently as monitoring needs grow, without requiring proportional increases in resources. Nova Act enables developers
関連記事
今日のまとめ
AI日報で今日の重要ニュースをまとめ読み