AIニュース最前線
最新ニュースAI日報Hacker日報週報動画AIツールトレンド企業

AIニュース最前線

世界中のAI最新情報を日本語で毎時更新

最新ニュース日報トレンド企業プレミアムRSS
© 2026 ainew.jp特定商取引法に基づく表記
ニュース一覧元記事を開く
AWS Machine Learning Blog·2026年4月10日 02:06·約16分で読める

Amazon Bedrock AgentCoreでReactアプリにライブAIブラウザエージェントを組み込む

#AIエージェント#ブラウザ自動化#透明性・説明可能性#React統合#AWS Bedrock#信頼性エンジニアリング
TL;DR

AWSはAmazon Bedrock AgentCoreのBrowserLiveViewコンポーネントを発表し、Reactアプリケーション内にAIエージェントのブラウジングセッションのライブビデオフィードを3行のJSXで埋め込めるようにすることで、AIエージェントの透明性とユーザー信頼を向上させるソリューションを提供した。

AI深層分析2026年4月10日 03:42
4
重要/ 5段階
深度40%
4
関連度30%
5
実用性20%
4
革新性10%
3

キーポイント

1

AIエージェントの透明性向上ソリューション

Amazon Bedrock AgentCoreのBrowserLiveViewコンポーネントは、AIエージェントがウェブサイトをナビゲートしコンテンツと対話する際のリアルタイムビデオフィードを提供し、ユーザーがエージェントの行動を可視化できるようにする。

2

簡単なReactアプリ統合

Bedrock AgentCore TypeScript SDKの一部として提供され、3行のJSXコードでライブブラウザストリームをReactアプリケーションに埋め込むことができ、自前のストリーミングインフラ構築は不要。

3

Amazon DCVプロトコルを活用

BrowserLiveViewコンポーネントはAmazon DCV(Desktop and Cloud Visualization)プロトコルを使用してブラウザセッションをレンダリングし、サーバーからの事前署名付きURLのみで実装可能。

4

実用的なユースケースと価値

ユーザー信頼の向上、規制対応ワークフローでの監査証跡サポート、人間の監督が必要なワークフローでのリアルタイム監視など、様々な実用的価値を提供する。

5

BrowserLiveViewコンポーネントの設定と注意点

BrowserLiveViewコンポーネントは署名付きURLとリモートブラウザの解像度(remoteWidth, remoteHeight)を指定してレンダリングする。これらの値はStep 1で設定したビューポートと一致させる必要があり、不一致だとクロッピングや黒帯が発生する。

6

AIエージェントによるブラウザ操作の実装方法

PlaywrightBrowserクライアントを使用してブラウザセッションを開始し、Bedrock Converse APIと連携してnavigate, click, typeなどのブラウザツールをAIモデルに呼び出させる。サーバー側でツールを実行し、結果をモデルにフィードバックするループを構築する。

7

サンプルアプリケーションの実行手順

GitHubリポジトリからサンプルアプリケーションをクローンし、依存関係をインストールしてAWS認証情報を設定した後、開発サーバーを起動してブラウザでアクセスすることで、エージェントの動作を確認できる。

影響分析・編集コメントを表示

影響分析

この技術はAIエージェントのブラックボックス問題に直接取り組み、ユーザー信頼と透明性というAI導入の根本的課題を解決する。特に金融、医療、顧客サービスなど規制の厳しい分野でのAIエージェント採用を促進し、AIと人間の協調ワークフローの新たな標準を確立する可能性がある。

編集コメント

AIエージェントの「見える化」は単なる技術的機能ではなく、AI採用の心理的・制度的障壁を下げる重要な突破口。特に規制産業での実用化が期待される。

AI搭載アプリケーションを構築する際、ユーザーはウェブサイト上のコンテンツをナビゲートし、代わりにウェブコンテンツと対話するAIエージェントを理解し信頼する必要があります。エージェントが自律的にウェブコンテンツと相互作用する場合、ユーザーは自信と制御を維持するためにそれらのアクションの可視性を必要としますが、現状ではそれが提供されていません。

Amazon Bedrock AgentCore BrowserのBrowserLiveViewコンポーネントは、Reactアプリケーション内でエージェントのブラウジングセッションのリアルタイムビデオフィードを提供することで、この課題に対処します。このコンポーネントはBedrock AgentCore TypeScript SDKの一部であり、3行のJavaScript XML(JSX)でライブブラウザストリームを埋め込むことで統合を簡素化します。

BrowserLiveViewコンポーネントは、エージェントのアクションへの透明性を確保するためにブラウザセッションをレンダリングするAmazon DCVプロトコルを使用します。実装にはサーバーからの署名付きURLが必要ですが、ストリーミングインフラストラクチャを構築する必要はありません。

この投稿では、以下の3つのステップについて説明します。セッションの開始とライブビューURLの生成、Reactアプリケーション内でのストリームのレンダリング、そしてユーザーが視聴しながらブラウザを操作するAIエージェントの接続です。最後に、クローンして実行できる動作サンプルアプリケーションが完成します。

なぜアプリケーションにライブビューを埋め込むのか

独自のアプリケーション内にライブビュー(Live View)を埋め込むことで、大規模なユーザーに対して付加価値を提供できます。

埋め込まれたライブビューを使用すれば、エージェントがナビゲーション、フォーム送信、検索クエリを実行する際、ユーザーはそれらの一連の操作をすべて追跡できます。エージェントが正しいページに移動し、適切な要素と対話しており、ワークフローを順調に進めていることを、ユーザーは即時の視覚的な確認によって得られます。このリアルタイムのフィードバックループにより、最終結果を待つことなく、エンドユーザーはエージェントの動作を直接把握できます。

ブラウジングタスクをAIエージェントに委譲するユーザーは、作業を観察できる場合に、より自信を持てます。テキストによる確認を受けるよりも、エージェントがフォームフィールドを一つひとつ入力していく様子を見る方が安心感があります。規制の厳しいワークフローでは、エージェントの行動に関する視覚的な証拠が監査要件を満たすのに役立ちます。

顧客アカウントの処理や機密データの処理など、人間の監督が必要なワークフローでは、管理者はアプリケーションを離れることなく、埋め込まれたライブビューを通じてエージェントの動作をリアルタイムで監視し、必要に応じて介入することができます。

また、組織はエージェントの行動に関する視覚的な証拠を通じて監査証跡のサポートを得られるため、コンプライアンス要件やトラブルシューティングのシナリオにおいて非常に有用です。Amazon Simple Storage Service(Amazon S3)へのセッション録画とコンソールベースのセッション再生を組み合わせることで、リアルタイムでの観察と事後レビューの両方が可能になります。

動作原理

この統合には3つのコンポーネントがあります。

ユーザーのウェブブラウザでは、BrowserLiveView コンポーネントを含む React アプリケーションが実行されており、このコンポーネントは SigV4 署名付き URL を受け取り、リモートブラウザセッションからの DCV ビデオストリームを受信するために永続的な WebSocket 接続を確立します。React アプリケーションはビデオレンダリングとユーザーインターフェースの表示を担当し、継続的なストリーミングのために WebSocket 接続を維持します。

アプリケーションサーバーは Amazon Bedrock のセッションライフサイクル内における AI エージェントとして機能し、クライアントブラウザとクラウドホスト型のブラウザセッション間の接続を調整します。Amazon Bedrock AgentCore API を使用してセッションを開始し、ライブビューストリームへの安全で時間制限付きのアクセスを許可する SigV4 署名付き URL を生成します。このレイヤーはセッション管理、認証、およびストリーム配信を処理します。

AWS Cloud には、基盤となるブラウザ自動化およびストリーミング機能を提供する Amazon Bedrock AgentCore Browser と Amazon Bedrock サービスがホストされています。Amazon Bedrock AgentCore は、AWS Cloud 内に隔離されたクラウドブラウザセッションをホストし、自動化エンドポイント(Playwright CDP)とライブビューストリーミングエンドポイント(DCV)の両方を提供します。

このアーキテクチャにおける主要な効率性の利点は、DCV Live View ストリームが Amazon Bedrock AgentCore からユーザーのブラウザへ直接流れることです。このストリームはアプリケーションサーバーを経由しません。サーバーは URL の生成とエージェントの実行を担当しますが、ビデオストリームは AWS からクライアントへの直接の WebSocket 接続となります。これにより、レイテンシを最小限に抑え、インフラストラクチャの要件を削減できます。

図 1: 3 つのコンポーネント間のデータフローを示すソリューションアーキテクチャ。図内の番号付き矢印は以下のデータフローを表します:矢印 1(灰色、実線): クライアントは REST を使用してプロンプトを送信し、Application Server からステータスをポーリングします。矢印 2(オレンジ色、実線): Application Server は AI モデルの推論のために Amazon Bedrock Converse API を呼び出します。矢印 3(青色、実線): Application Server は Playwright Chrome DevTools Protocol (CDP) を使用して、Amazon Bedrock AgentCore Browser に対してブラウザツールを実行します。矢印 4(赤色、破線): DCV Live View ストリームは Application Server をバイパスし、Amazon Bedrock AgentCore から User Browser へ直接流れます。

前提条件

開始する前に、以下の準備が整っていることを確認してください:

  • Node.js 20以降
  • サポート対象のAWSリージョンにあるAWSアカウント
  • Amazon Bedrock AgentCoreのブラウザ権限を持つAWS認証情報
  • エージェントを駆動するAIモデルへのアクセス(本記事ではAnthropic Claudeを使用したAmazon Bedrock Converse APIを使用していますが、Live Viewはモデルに依存せず、お好みのモデルプロバイダーまたはエージェントフレームワークを使用できます)

**

重要:** Live View(ステップ1および2)には、Amazon Bedrock AgentCoreの権限のみが必要です。Amazon Bedrockや特定のAIモデルには依存しません。ステップ3のAIエージェントは追加のAmazon Bedrock権限を必要とするAmazon Bedrock Converse APIを使用しますが、これはサンプル固有のものです。お好みのモデルプロバイダーまたはエージェントフレームワークに置き換えることができます。AWS IAM Identity CenterまたはAWS Security Token Service (AWS STS)から一時的な認証情報を使用してください。長期の有効期限を持つアクセスキーは使用しないでください。AWS Identity and Access Management (IAM)の権限を設定する際は、最小権限の原則に従ってください。

Amazon Bedrock AgentCore TypeScript SDKをインストールします:

npm install bedrock-agentcore

ステップ 3 の AI エージェントには、JavaScript 用 AWS SDK も必要です。

npm install @aws-sdk/client-bedrock-runtime

この投稿のコードは 2 つの環境で実行されます。サーバー側のコード(ステップ 1 および 3)は Node.js で、クライアント側のコード(ステップ 2)は Vite でバンドルされた React アプリケーションで実行されます。この投稿の末尾にあるサンプルアプリケーションは、これらすべてをパッケージ化しています。

ステップごとの実装

1: ブラウザセッションの開始とライブビュー URL の生成

アプリケーションサーバーでは、Browser クラスを使用してセッションを開始し、プレサインド URL を生成します。この API はセッション識別子とストリーミング URL を返しますが、サーバーはこれをデフォルトの有効期限 300 秒を持つプレサインド URL に変換します。クエリパラメータには SigV4 認証情報が含まれるため、シークレット情報はブラウザに渡されません。この URL を API エンドポイントを通じてフロントエンドに渡します。

import { Browser } from 'bedrock-agentcore/browser'

const browser = new Browser({

region: 'us-west-2'

})

await browser.startSession({

viewport: { width: 1920, height: 1080 }

})

const signedUrl =

await browser.generateLiveViewUrl()

// Send signedUrl to your frontend via API

2: React アプリで BrowserLiveView コンポーネントをレンダリングする

ブラウザ上で、Bedrock AgentCore TypeScript SDK から BrowserLiveView コンポーネントをインポートし、presigned URL(署名付きURL)を使用してレンダリングします。このコンポーネントは WebSocket 接続、DCV(Desktop Cloud Visualization)プロトコルのネゴシエーション、ビデオストリームのデコード、およびフレームのレンダリングを処理します。アスペクト比を維持しつつ親コンテナに合わせて自動でサイズ調整されます。remoteWidth と remoteHeight は、ステップ 1 で設定したビューポートと一致している必要があります。値が不一致だと、切り抜きや黒帯が表示されます。

import { BrowserLiveView }

from 'bedrock-agentcore/browser/live-view'

**

このコンポーネントを追加すると、presigned URL が有効でブラウザセッションがアクティブである限り、ライブビューはストリーミングを開始します。コンテナ内にリモートブラウザのデスクトップが表示されるはずです。コンテナが空のままの場合、presigned URL が期限切れになっていないか、およびブラウザセッションがまだ実行中であることを確認してください。

3: ブラウザ操作を駆動する AI エージェントに接続する

ライブビューがストリーミングされているので、見ていて面白いものを提供する必要があります。以下の例では Amazon Bedrock Converse API を使用していますが、ライブビューはモデル非依存です。ブラウザを駆動するために、お好みの AI モデルまたはエージェントフレームワークを使用できます。

このコードは PlaywrightBrowser クライアントを作成し、新しい AgentCore Browser セッションを開始して、Playwright Chrome DevTools プロトコルを使用してそれに接続します。これはステップ 1 と同じ種類のクラウドブラウザセッションですが、Live View インターフェースではなく Playwright の自動化インターフェースを通じてアクセスされます。

モデルは、navigate(ナビゲート)、click(クリック)、type(入力)、getText(テキスト取得)、getHtml(HTML 取得)、pressKey(キー押下)など、呼び出すべきブラウザツールを決定します。サーバーはこれらのツールを実行し、その結果を次の反復のためにモデルにフィードバックします。

typescript
import { BedrockRuntimeClient, ConverseCommand }
  from '@aws-sdk/client-bedrock-runtime'
import { PlaywrightBrowser }
  from 'bedrock-agentcore/browser/playwright'

const browser = new PlaywrightBrowser({
  region: 'us-west-2'
})
await browser.startSession()

// ブラウザツールを JSON Schema として定義する
// (navigate, click, type, getText など)

while (step  

モデルは構成可能です。Anthropic Claude、Amazon Nova、またはツール使用をサポートする Amazon Bedrock モデルを使用できます。モデルが行うすべてのツール呼び出しは、Live View を介してユーザーに表示されます。ユーザーはブラウザがナビゲートし、検索ボックスに入力され、結果ページが読み込まれる様子を見ることができます。

注:TypeScript SDK には、これらのブラウザ操作をフレームワークネイティブのツールとしてラップする Vercel AI SDK 統合(BrowserTools)も含まれています。

サンプルアプリケーションで試す

GitHub で、ステップ 1〜3 を統合した完全なサンプルアプリケーションを構築しました。このサンプルには、埋め込まれたライブビューを備えた React ダッシュボード、エージェントの推論とアクションを示すアクティビティログ、そして AI エージェントを実行する Fastify サーバーが含まれています。エージェントは Wikipedia にアクセスし、トピックを検索し、ページコンテンツを読み取り、見つかった内容を要約します。そのすべてのステップをあなたが見守る中で実行されます。GitHub リポジトリ からダウンロードできます。

図 2: サンプルアプリケーションの実行中。左パネルには、エージェントがアクセスした Wikipedia ページをストリーミングする BrowserLiveView コンポーネントが表示されています。右パネルには、タイムスタンプ付きのツール呼び出し(navigate, getText, click)を含むアクティビティログが表示されています。下部には、プロンプト入力フィールドとエージェント起動ボタンが見えます。

サンプルアプリケーションのクローン作成と実行

以下の手順を完了して、サンプルアプリケーションをクローンし、実行してください。

  • リポジトリをクローンし、サンプルフォルダに移動します。

git clone https://github.com/awslabs/bedrock-agentcore-samples-typescript.git

cd bedrock-agentcore-samples-typescript

cd use-cases/browser-live-view-agent

  • 依存関係をインストールします。

npm install

  • AWS 認証情報をエクスポートします。

export AWS_ACCESS_KEY_ID=

export AWS_SECRET_ACCESS_KEY=

export AWS_SESSION_TOKEN=

export AWS_REGION=us-west-2

**

重要:一時認証情報を使用してください。ソース管理に認証情報をコミットしないでください。

  • アプリケーションを起動します。

npm run dev

  • http://localhost:5173 を開き、プロンプトを入力して「エージェントの起動」を選択します。

バンドラーの設定

BrowserLiveView コンポーネントは、Amazon DCV Web Client SDK を使用しており、これは bedrock-agentcore npm パッケージ内にバンドルされたファイルを提供します。DCV を個別にダウンロードまたはインストールする必要はありません。Vite の設定には以下の3つの追加が必要です。

  • resolve.alias は、dcv および dcv-ui のベア指定子を、バンドルされた SDK ファイルにポイントします。
  • resolve.dedupe は、React および共有依存関係がバンドルされたパスではなく、node_modules から解決されることを確認します。
  • viteStaticCopy は、DCV のランタイムファイル(ワーカー、WASM デコーダー)をビルド出力にコピーします。

サンプルアプリケーションの vite.config.ts には、完全な設定が用意されています。BrowserLiveView コンポーネントの詳細については、TypeScript SDK の ライブビューソースディレクトリ を参照してください。

リソースのクリーンアップ

課金を避けるために、作業終了後はブラウザセッションを停止し、アプリケーションを終了してください:

  • アプリケーションのUIで「Stop Session」を選択し、Amazon Bedrock AgentCore Browserセッションを終了します。
  • ターミナルでCtrl+Cを押して、開発サーバーを停止します。
  • このデモのために作成したIAMロールやポリシーがある場合は、IAMコンソールからそれらを削除してください。

Amazon Bedrock AgentCore Browserセッションはアクティブな状態の間、課金されます。料金詳細については、Amazon Bedrock AgentCoreの価格ページを参照してください。

次のステップ

動作するLive Viewの統合が完了した今、以下のような探索をお勧めします。

まず、サンプルアプリケーションをクローンし、AWS認証情報を記入して npm run dev を実行すると、デモ全体が動作する様子を確認できます。手順については、本記事内のサンプルアプリケーションのクローンと実行セクションを参照してください。

サンプルアプリケーションはデフォルトでAnthropic Claudeを使用していますが、BEDROCK_MODEL_ID環境変数を設定することで、ツール使用をサポートするAmazon Novaや他のAmazon Bedrockモデルに切り替えることができます。利用可能なモデルとそのツール使用機能の一覧については、Amazon Bedrockのモデルドキュメントを参照してください。

サンプルアプリケーションの React ダッシュボードは、あなた自身の実装のための出発点です。レイアウトをあなたのデザインシステムに合わせて調整したり、既存のアプリケーションにライブビュー(Live View)を組み込んだり、ユーザーがワークフローの途中で介入できるコントロールを追加したりすることができます。AgentCore SDK を使用して React アプリケーションを構築するためのガイドについては、<a href="https://github.com/aws/bedrock-agentcore-sdk-typescript/blob/main/docs/BROWSER_LIVE_VIEW.md" target="_blank" rel="noopene

原文を表示

When you build AI-powered applications, your users must understand and trust AI agents that navigate websites and interact with web content on their behalf. When an agent interacts with web content autonomously, your users require visibility into those actions to maintain confidence and control, which they don’t currently have.

The Amazon Bedrock AgentCore Browser BrowserLiveView component addresses this challenge by providing a real-time video feed of the agent’s browsing session directly within your React application. This component, part of the Bedrock AgentCore TypeScript SDK, streamlines the integration by embedding a live browser stream with three lines of JavaScript XML (JSX).

The BrowserLiveView component uses the Amazon DCV protocol to render the browser session, creating transparency into agent actions. Implementation requires only a presigned URL from your server, without requiring you to build streaming infrastructure.

This post walks you through three steps: starting a session and generating the Live View URL, rendering the stream in your React application, and wiring up an AI agent that drives the browser while your users watch. At the end, you will have a working sample application you can clone and run.

Why embed Live View in your application

Embedding Live View inside your own application unlocks additional value for your users at scale.

With an embedded Live View, your users follow every navigation, form submission, and search query as the agent performs it. They get immediate visual confirmation that the agent is on the right page, interacting with the correct elements, and progressing through the workflow. This real-time feedback loop gives end users direct insight into agent behavior without waiting for the final result.

Users who delegate browsing tasks to an AI agent are more confident when they can observe the work. Watching the agent fill in a form field by field is more reassuring than receiving a text confirmation. For regulated workflows, visual evidence of agent actions can support audit requirements.

In workflows that require human supervision, like handling customer accounts and processing sensitive data, a supervisor can use the embedded Live View to watch the agent in real time and intervene if needed, without leaving your application.

Organizations also gain audit trail support through visual evidence of agent actions, which proves valuable for compliance requirements and troubleshooting scenarios. Combined with session recordings to Amazon Simple Storage Service (Amazon S3) and console-based session replay, you get both real-time observation and post-hoc review.

How it works

The integration has three components.

The user’s web browser runs a React application containing the BrowserLiveView component, which receives a SigV4-presigned URL and establishes a persistent WebSocket connection to receive the DCV video stream from a remote browser session. The React application handles video rendering and user interface presentation while maintaining the WebSocket connection for continuous streaming.

The application server functions as an AI agent within the Amazon Bedrock session lifecycle, orchestrating the connection between client browsers and cloud-hosted browser sessions. It starts sessions using the Amazon Bedrock AgentCore API and generates SigV4-presigned URLs that grant secure, time-limited access to the Live View stream. This layer handles session management, authentication, and stream distribution.

AWS Cloud hosts Amazon Bedrock AgentCore Browser and Amazon Bedrock services that provide the underlying browser automation and streaming capabilities. Amazon Bedrock AgentCore hosts the isolated cloud browser sessions within AWS Cloud and provides both the automation endpoint (Playwright CDP) and the Live View streaming endpoint (DCV).

The key efficiency advantage with this architecture is that the DCV Live View stream flows directly from Amazon Bedrock AgentCore to the user’s browser. It doesn’t pass through your application server. Your server generates the URL and runs the agent, but the video stream is a direct WebSocket connection from AWS to the client. This helps minimize latency and reduce infrastructure requirements.

Figure 1: Solution architecture showing the data flow between three components. The numbered arrows in the diagram represent the following data flows: Arrow 1 (gray, solid): The client sends prompts and polls status from the Application Server using REST. Arrow 2 (orange, solid): The Application Server calls the Amazon Bedrock Converse API for AI model reasoning. Arrow 3 (blue, solid): The Application Server runs browser tools against Amazon Bedrock AgentCore Browser using Playwright Chrome DevTools Protocol (CDP). Arrow 4 (red, dashed): The DCV Live View stream flows directly from Amazon Bedrock AgentCore to the User Browser, bypassing the Application Server.

Prerequisites

Before you begin, verify that you have the following:

  • Node.js 20 or later
  • An AWS account in a supported AWS Region
  • AWS credentials with Amazon Bedrock AgentCore Browser permissions
  • Access to an AI model to drive the agent (this post uses the Amazon Bedrock Converse API with Anthropic Claude, but Live View is model-agnostic and you can use a model provider or agent framework of your choice)

Important: Live View (Steps 1 and 2) requires only Amazon Bedrock AgentCore permissions. It does not depend on Amazon Bedrock or any specific AI model. The AI agent in Step 3 uses the Amazon Bedrock Converse API, which requires additional Amazon Bedrock permissions, but this is specific to our sample. You can substitute a model provider or agent framework of your choice. Use temporary credentials from AWS IAM Identity Center or AWS Security Token Service (AWS STS). Do not use long-lived access keys. Follow the principle of least privilege when configuring AWS Identity and Access Management (IAM) permissions.

Install the Amazon Bedrock AgentCore TypeScript SDK:

code
npm install bedrock-agentcore

For the AI agent in Step 3, you also need the AWS SDK for JavaScript:

code
npm install @aws-sdk/client-bedrock-runtime

The code in this post runs in two environments: the server-side code (Steps 1 and 3) runs in Node.js, and the client-side code (Step 2) runs in a React application bundled with Vite. The sample application at the end of this post packages everything together.

Step-by-step implementation

1: Start a browser session and generate the Live View URL

On your application server, use the Browser class to start a session and generate the presigned URL. The API returns a session identifier and streaming URL, which the server converts into a presigned URL with a defined expiration time of 300 seconds by default. It contains SigV4 credentials in the query parameters, so no secrets reach the browser. Pass this URL to your frontend through an API endpoint.

code
import { Browser } from 'bedrock-agentcore/browser'

const browser = new Browser({
  region: 'us-west-2'
})
await browser.startSession({
  viewport: { width: 1920, height: 1080 }
})

const signedUrl =
  await browser.generateLiveViewUrl()
// Send signedUrl to your frontend via API

2: Render the BrowserLiveView component in your React app

On your browser, import the BrowserLiveView component from the Bedrock AgentCore TypeScript SDK and render it with the presigned URL. The component handles WebSocket connection, DCV protocol negotiation, video stream decoding, and frame rendering. It auto scales to fit its parent container while preserving its aspect ratio. The remoteWidth and remoteHeight must match the viewport that you set in Step 1. Mismatched values cause cropping or black bars.

code
import { BrowserLiveView }
  from 'bedrock-agentcore/browser/live-view'

After adding this component, the Live View begins streaming as soon as the presigned URL is valid and the browser session is active. You should see the remote browser’s desktop appear within the component’s container. If the container remains empty, verify that the presigned URL hasn’t expired and that the browser session is still running.

3: Connect an AI agent to drive browser actions

With the Live View streaming, you need something interesting to watch. The following example uses the Amazon Bedrock Converse API, but Live View is model agnostic. You can use an AI model or agent framework of your choice to drive the browser.

The code creates a PlaywrightBrowser client, which starts a new AgentCore Browser session and connects to it using the Playwright Chrome DevTools protocol. This is the same type of cloud browser session as Step 1 but accessed through the Playwright automation interface rather than the Live View interface.

The model decides which browser tools to call, including navigate, click, type, getText, getHtml, and pressKey. Your server runs these tools and feeds the results back to the model for the next iteration.

code
import { BedrockRuntimeClient, ConverseCommand }
  from '@aws-sdk/client-bedrock-runtime'
import { PlaywrightBrowser }
  from 'bedrock-agentcore/browser/playwright'

const browser = new PlaywrightBrowser({
  region: 'us-west-2'
})
await browser.startSession()

// Define browser tools as JSON Schema
// (navigate, click, type, getText, and more)

while (step < maxSteps) {
  const response = await bedrockClient.send(
    new ConverseCommand({
      modelId: modelId,
      system: [{ text: systemPrompt }],
      messages,
      toolConfig: browserTools,
    })
  )

  if (response.stopReason === 'tool_use') {
    // Run browser tool, add result
    // to conversation, continue loop
  } else {
    break // Final answer from model
  }
}

The model is configurable. You can use Anthropic Claude, Amazon Nova, or an Amazon Bedrock model that supports tool use. Every tool call that the model makes is visible to your user through the Live View. They see the browser navigate, the search box fill in, and the results page load.

Note: The TypeScript SDK also includes a Vercel AI SDK integration (BrowserTools) that wraps these browser operations as framework-native tools.

Try it using the sample application

We built a complete sample application on GitHub that puts Steps 1–3 together. The sample includes a React dashboard with the embedded Live View, an activity log showing agent reasoning and actions, and a Fastify server running the AI agent. The agent navigates to Wikipedia, searches for a topic, reads the page content, and summarizes what it finds while you watch every step. You can download it from the GitHub repository.

Figure 2: The sample application mid-run. The left panel shows the BrowserLiveView component streaming a Wikipedia page that the agent has navigated to. The right panel shows the activity log with timestamped tool calls (navigate, getText, click). At the bottom, the prompt input field and Launch Agent button are visible.

To clone and run the sample application

Complete the following steps to clone and run the sample application.

  • Clone the repository and navigate to the sample folder.
code
git clone https://github.com/awslabs/bedrock-agentcore-samples-typescript.git
cd bedrock-agentcore-samples-typescript
cd use-cases/browser-live-view-agent
  • Install the dependencies.
code
npm install
  • Export your AWS credentials.
code
export AWS_ACCESS_KEY_ID=
export AWS_SECRET_ACCESS_KEY=
export AWS_SESSION_TOKEN=
export AWS_REGION=us-west-2

Important: Use temporary credentials. Do not commit credentials to source control.

  • Start the application.
code
npm run dev
  • Open http://localhost:5173, enter a prompt, and choose Launch Agent.

Bundler configuration

The BrowserLiveView component uses the Amazon DCV Web Client SDK, which ships vendored files inside the bedrock-agentcore npm package. You don’t need to download or install DCV separately. Your Vite configuration needs three additions:

  • resolve.alias points the dcv and dcv-ui bare specifiers to the vendored SDK files.
  • resolve.dedupe verifies that React and shared dependencies resolve from your node_modules, not from the vendored path.
  • viteStaticCopy copies DCV runtime files (workers, WASM decoders) to your build output.

The sample application’s vite.config.ts has the complete configuration ready to use. For more details on the BrowserLiveView component, see the live-view source directory in the TypeScript SDK.

Clean up resources

To avoid incurring charges, stop the browser session and shut down the application when you’re done:

  • In the application UI, choose Stop Session to end the Amazon Bedrock AgentCore Browser session.
  • In your terminal, press Ctrl+C to stop the development servers.
  • If you created any IAM roles or policies specifically for this demo, delete them from the IAM console.

Amazon Bedrock AgentCore Browser sessions incur charges while active. For pricing details, refer to the Amazon Bedrock AgentCore pricing page.

Next steps

Now that you have a working Live View integration, here are some things to explore.

To get started, clone the sample application, fill in your AWS credentials, and run npm run dev to see the full demo in action. For instructions, refer to the To clone and run the sample application section in this post.

The sample application defaults to Anthropic Claude, but you can switch to Amazon Nova or another Amazon Bedrock model that supports tool use by setting the BEDROCK_MODEL_ID environment variable. For a list of available models and their tool use capabilities, refer to the Amazon Bedrock model documentation.

The React dashboard in the sample application is a starting point for your own implementation. You can adapt the layout to match your design system, integrate the Live View into an existing application, or add controls that let users intervene mid-workflow. For guidance on building React applications with the AgentCore SDK, refer to the <a href="https://github.com/aws/bedrock-agentcore-sdk-typescript/blob/main/docs/BROWSER_LIVE_VIEW.md" target="_blank" rel="noopene

この記事をシェア

関連記事

DeNA Engineering★32026年4月7日 00:00

Pococha開発環境をEKS上で再設計:ブランチ単位の開発とPull Request単位の検証 [DeNAインフラSRE]

DeNAのインフラSREチームが、Pocochaの開発環境をAmazon EC2からAmazon EKSへ移行し、ブランチ単位の開発とPull Request単位の検証を可能にするコンテナベースの環境を構築した。

AWS Machine Learning Blog★42026年4月10日 02:28

大規模エージェント管理の未来:AWS Agent Registryがプレビュー公開

AWSがAWS Agent Registryを発表し、組織内でエージェント・ツール・スキルを発見・共有・再利用できる機能をAmazon Bedrock AgentCoreで提供開始した。

AWS Machine Learning Blog★32026年4月10日 02:33

Amazon Bedrockのモデルライフサイクルを理解する

Amazonが、AI基盤サービス「Bedrock」のモデル管理・更新プロセス(モデルライフサイクル)について解説している。

ニュース一覧に戻る元記事を読む