Amazon Bedrock AgentCore で NLP を活用した AI パワー搭載のダッシュボード自動化エージェントを構築
AWS は、Amazon Bedrock AgentCore と Strands Agents を活用したマルチエージェントアーキテクチャにより、自然言語によるダッシュボードの自動作成・変更を可能にするソリューションを発表し、BI 業務の迅速化を実現しました。
キーポイント
自然言語による BI データ操作の実現
ビジネスアナリストが IT チームへの依存なく、自然言語でダッシュボードの変更を指示できる仕組みを提供し、従来の数日かかるプロセスを短縮します。
専門特化型マルチエージェントアーキテクチャ
検索・メタデータ取得を行う「Find Dashboard Agent」、変更実行を行う「Modify Dashboard Agent」、リクエストを振り分ける「Orchestrator Agent」の 3 つが連携して動作します。
セキュリティと監査証跡の確保
Amazon Bedrock AgentCore のゲートウェイ機能により、データへのアクセス制御や変更の検証、および生産環境での完全な監査証跡を維持しながら自動化を実現します。
AWS 製品群の統合活用
Amazon Bedrock AgentCore、Strands Agents フレームワーク、Amazon Nova モデル、そして Amazon QuickSight を組み合わせた包括的なソリューションです。
ツール関数の実装とロジック
Amazon QuickSightのダッシュボード一覧を取得し、検索キーワードがない場合は全リストを返すか、部分一致(大文字小文字区別なし)でフィルタリングして結果を返すPython関数が定義されています。
Strands Agentによるオーケストレーション
定義されたツール関数(ダッシュボード検索やカラム取得など)をStrands Agentに統合し、自然言語クエリで呼び出せるように@toolデコレータで公開することで、AIエージェントが自律的に操作できるようにしています。
オーケストレーターとエージェントの役割分担
オーケストレーターは直接 API を呼び出すのではなく、自然言語理解と API 実行を内部で行う「エージェントツール」を介して操作を行うことで、マルチエージェントアーキテクチャを実現しています。
影響分析・編集コメントを表示
影響分析
この発表は、BI ツールの利用障壁を大幅に下げ、データドリブンな意思決定プロセスを劇的に加速させる可能性があります。特に、IT リソースのボトルネック解消と、自然言語インターフェースによる直感的な操作体験は、企業のデータ活用スピードを根本から変革する重要な一歩です。
編集コメント
IT チームの負荷を軽減しつつ、ビジネスサイドの敏捷性を高める「AI エージェントによる BI オートメーション」の実用化事例として注目すべき内容です。
ビジネスアナリストは、変化するビジネス要件に対応するためにダッシュボードの修正を数日間待つことがよくあります。従来のプロセスでは、IT チームに修正依頼を提出し、同チームが要件を解釈し、API ドキュメントを参照し、テーブルスキーマを理解して変更を展開します。このアプローチは適切な監督と品質管理を保証しますが、迅速なダッシュボード更新が必要な場合、数日間のターンアラウンドタイム(処理時間)が発生する可能性があります。
本ソリューションは、Amazon Bedrock AgentCore、Strands Agents、および Amazon Quick の変換機能を組み合わせることで、AI エージェントの構築と運用を安全かつスケーラブルに行いながら、データを実行可能なビジネスインサイトに変換するための堅牢で拡張可能かつ知的なシステムを実現します。
ソリューションの概要
本ソリューションでは、Amazon Bedrock AgentCore と Strands フレームワークを構築したマルチエージェントアーキテクチャを使用します。Amazon Bedrock AgentCore は、スケーラブルかつ安全に効果的なエージェントを構築・展開・運用するためのアジェンティックプラットフォームであり、インフラ管理は不要です。インテリジェントなメモリと、ツールやデータへの安全で制御されたアクセスを可能にするゲートウェイにより、生産環境への迅速な導入を実現します。本プラットフォームでは、本番グレードのセキュリティと動的スケーリングをサポートし、運用中のパフォーマンスと品質を監視します。Strands Agents は、AWS サービスとの統合を備えたコードファースト型フレームワークです。また、本ソリューションでは Amazon QuickSight も活用しており、これは AI 駆動の BI(ビジネスインテリジェンス)機能を提供し、散在するデータを戦略的な洞察へと変換することで、すべての関係者がより迅速な意思決定を行い、より優れたビジネス成果を達成できるよう支援します。
このアーキテクチャは、連携して動作する 3 つの専門エージェントで構成されています。*Find Dashboard Agent*(ダッシュボード検索エージェント)は、ダッシュボードの検索や、ダッシュボードおよびデータセットからの列メタデータの取得など、発見オペレーションを実行します。*Modify Dashboard Agent*(ダッシュボード修正エージェント)は、列の検証、テーブルビジュアルの更新、新しいダッシュボードバージョンの作成を通じて、設定変更を実行します。*Orchestrator Agent*(オーケストレーターエージェント)は、意図分類に基づいてユーザーのリクエストを適切な専門エージェントへルーティングします。
オーケストレーターエージェントは、ユーザーとのインタラクションの入り口として機能します。ユーザーが「テストダッシュボードに姓を追加する」などの自然言語クエリを提出すると、Amazon Nova はそのリクエストが会話型か操作型かを分類します。会話型のクエリには、Nova の大規模言語モデル(LLM)の能力を用いて直接回答が返されます。一方、操作型のリクエストは Strands フレームワークを経由して専門のエージェントにルーティングされ、利用可能なデータセット列に対して変更内容が検証された上で、セキュリティ制御や監査証跡を維持しつつ、ロールバック用に元のダッシュボードを保持したまま自律的に実行されます。
以下の図解は、本ソリューションのアーキテクチャとワークフローを示しています。

本アーキテクチャには、以下のコンポーネントが含まれます:
- Amazon Bedrock AgentCore – Strands エージェントのオーケストレーターおよび専門的なサブエージェントをホストします。
- Amazon Nova – 自然言語処理(NLP)および推論機能を提供します。
- Amazon Quick – ダッシュボードの検索および変更操作の対象サービスです。
- AgentCore Memory – 会話の文脈とセッション状態を維持します。
- Amazon Bedrock AgentCore Observability – エージェントの意思決定をログ記録し、API の相互作用を追跡します。
Quick のセルフサービスを実現するためのエージェント型 AI ソリューションを実装するには、以下の高レベルな手順を完了してください:
- ダッシュボード検索エージェント、ダッシュボード修正エージェント、オーケストレーターエージェントの 3 つのエージェントを構築します。
- これらのエージェントを Amazon Bedrock AgentCore にデプロイします。
- AWS Management Console を通じてエージェントをテストします。
前提条件
このソリューションを実装するには、以下の前提条件を満たす必要があります:
- Amazon Bedrock、Amazon QuickSight、および AWS Identity and Access Management (IAM) の権限を持つ AWS アカウント。新しいダッシュボードの作成については、「Create an Amazon Quick dashboard」を参照してください。
- 既存のダッシュボードを持つアクティブな Amazon QuickSight アカウント(作成ガイドあり)。
- エージェントが QuickSight Application Programming Interfaces (APIs) にアクセスできるように設定された IAM 権限:
quicksight:ListDashboards
- quicksight:DescribeDashboard
- quicksight:DescribeDashboardDefinition
- quicksight:DescribeDataSet
- quicksight:CreateDashboard
- Python 3.10 以降(直接コードデプロイには Python 3.10〜3.13 がサポートされています)。
- uv パッケージマネージャーのインストール済み(インストールガイドあり)。
- 適切な認証情報で設定された AWS Command Line Interface (AWS CLI)。
- Python および AWS サービスに関する基本的な理解。
ウォークスルー
Amazon Bedrock AgentCore* を使用して、AI パワー型のダッシュボード自動化ソリューションを構築、デプロイ、テストするには、以下の 4 つの手順に従ってください:
ステップ 1: ダッシュボードの検索および修正を行う QuickSight のセルフサービスエージェントを構築する
QuickSight のセルフサービスソリューションを支える 3 つのコアエージェントを構築します:
- 検索用ダッシュボードエージェントを見つける。
- 変更用ダッシュボードエージェントを修正する。
- これらの間で調整を行うオーケストレーターエージェント。
各エージェントの役割と実装について詳しく見ていきましょう。
1.1 検索用ダッシュボードエージェントの構築
このエージェントは、その後の表示や変更アクションに必要なダッシュボードの発見(ディスカバリー)操作を処理します。例えば、ユーザーが「'testing'という名前のレポートを表示して」という自然言語クエリを入力すると、オーケストレーターがこのエージェントを呼び出し、list_dashboards API を実行してダッシュボードのメタデータを取得し、検索条件に基づいて結果をフィルタリングし、一致するダッシュボードを構造化された形式で返します。
この発見用エージェントは、3 つの中核機能を提供します。すなわち、完全一致と部分一致の両方に対応したダッシュボード検索、アカウント内の利用可能なダッシュボードの一覧表示、およびダッシュボードとその基盤となるデータセットからカラム情報を取得する機能です。これらの発見機能は、対象となるダッシュボードを特定することが変更や取得を実行する前に必要であるため、ダッシュボード操作の前提条件となります。
各機能は Strands @tool 関数として実装されています。以下のスニペットは、部分一致マッチングを使用して結果をフィルタリングしながら list_dashboards API を呼び出す検索用ダッシュボードツールを示しています:
from strands import Agent, tool
from strands.models import BedrockModel
@tooldef find_dashboard_tool(dashboard_name: str = "") -> str:
"""名前によってクイックダッシュボードを検索します(部分一致をサポート)"""
client = boto3.client('quicksight', region_name=REGION)
response = client.list_dashboards(AwsAccountId=AWS_ACCOUNT_ID)
dashboards = response.get('DashboardSummaryList', [])
# 検索語が指定されていない場合は、すべてのダッシュボードをリスト表示
if not dashboard_name or dashboard_name.strip() == "":
all_names = [d['Name'] for d in dashboards]
return f"All dashboards ({len(all_names)}): {all_names}"
# 大文字小文字を区別しない部分一致でフィルタリング
matches = [d['Name'] for d in dashboards if dashboard_name.lower() in d['Name'].lower()]
return f"Found {len(matches)} dashboards: {matches}"
エージェントはその後、これらのツール関数を Strands Agent(ストランドズエージェント)にラップし、@tool デコレータとして公開することで、オーケストレーターが自然言語クエリでこれを呼び出せるようにします:
_find_agent = Agent(
model=BedrockModel(model_id=MODEL_ID),
tools=[find_dashboard_tool, get_columns_tool],
system_prompt="You are the Find Dashboard Agent. Help users find dashboards and view columns."
)
@tool
def find_dashboard_agent(query: str) -> str:
"""オーケストレーターが呼び出すためにツールとして公開されたエージェントラッパー"""
response = _find_agent(query)
return str(response)
このツールとしてのエージェントパターンが、マルチエージェントアーキテクチャを可能にしています。オーケストレーターは Quick APIs に直接呼び出しを行うのではなく、このエージェントを呼び出し、自然言語の理解と API 呼び出しを内部で処理させます。
1.2 ダッシュボード変更用エージェントの構築
発見機能が整ったことで、次のエージェントは検証ファーストのワークフローを通じてダッシュボード設定の変更を担当します。例えば、「テストダッシュボードに姓を追加してください」というユーザーリクエストを想定しましょう。オーケストレーターはこのリクエストを変更ダッシュボードエージェントへルーティングし、そのエージェントはデータセットスキーマ内に列が存在するかを検証し、describe_dashboard_definition API を使用して完全なダッシュボード定義を取得し、テーブル視覚化フィールドウェルとフィールドオプションを更新し、create_dashboard API を使用して新しいダッシュボードバージョンを作成します。
この変更用エージェントは、主に 2 つの操作をサポートしています。1 つ目は、リクエストされた列が基盤となるデータセットに存在するがまだ追加されていないことを検証した上で、ダッシュボードに列を追加することです。2 つ目は、現在表示されている列であることを確認した上で、ダッシュボードから列を削除することです。既存のダッシュボードを変更するのではなく、一意の識別子を持つ新しいダッシュボードを作成することで、監査目的のためにオリジナルを保持し、必要に応じてロールバックをサポートします。
この検証ファーストのアプローチは、データの整合性を検証し設定エラーを防ぐのに役立ちます。また、オリジナルのダッシュボードを保持することはガバナンス要件への準拠を支え、変更に対する監査証跡を提供します。
以下のスニペットは、コア修正ツールの内容を示しています。このツールはリクエストを検証し、ダッシュボード定義のテーブル視覚化フィールドウェルを更新して、新しいダッシュボードを作成します。
@tool
def modify_dashboard(dashboard_name: str, action: str, column_name: str) -> str:
"""カラムを追加または削除することでダッシュボードを変更する"""
client = boto3.client('quicksight', region_name=REGION)
info = _get_dashboard_and_dataset_info(dashboard_name)
変更を行う前に検証を優先:カラムの状態を確認
if action == "add":
if column_name in info["dashboard_columns"]:
return f"カラム '{column_name}' は既にダッシュボードに含まれています。"
if column_name not in info["dataset_columns"]:
return f"カラム '{column_name}' はデータセットに存在しません。"
elif action == "remove":
if column_name not in info["dashboard_columns"]:
return f"カラム '{column_name}' はダッシュボードに含まれていません。"
ダッシュボード定義内のテーブル視覚化フィールドウェルを更新
updated_definition = info["definition"]
for sheet in updated_definition.get('Sheets', []):
for visual in sheet.get('Visuals', []):
if 'TableVisual' in visual:
field_wells = visual['TableVisual']['ChartConfiguration']['FieldWells']
existing_fields = field_wells['TableAggregatedFieldWells']['GroupBy']
if action == "add":
existing_fields.append({
'CategoricalDimensionField': {
'FieldId': str(uuid.uuid4()),
'Column': {
'DataSetIdentifier': dataset_id,
'ColumnName': column_name
}
}
})
elif action == "remove":
existing_fields = [f for f in existing_fields
if f['CategoricalDimensionField']['Column']['ColumnName'] != column_name]
Create new dashboard with UUID suffix, original is preserved for rollback
new_uuid = str(uuid.uuid4())[:8]
client.create_dashboard(
AwsAccountId=AWS_ACCOUNT_ID,
DashboardId=f"dashboard_{new_uuid}",
Name=f"{info['dashboard_name']}_dashboard_{new_uuid}",
Definition=updated_definition
)
Find Dashboard Agentと同様に、このツールはStrands Agentにラップされ、オーケストレーターに対して@toolとして公開されています:
_modify_agent = Agent(
model=BedrockModel(model_id=MODEL_ID),
tools=[modify_dashboard],
system_prompt="You are the Modify Dashboard Agent. You add or remove columns from dashboards."
)
@tool
def modify_dashboard_agent(query: str) -> str:
"""Agent wrapper for the orchestrator to invoke with natural language"""
response = _modify_agent(query)
return str(response)
このエージェントは、ユーザーの自然言語クエリからダッシュボード名、アクション、および列名を抽出し、それらを検証して実行する modify_dashboard ツールに渡します。
1.3 オーケストレーターエージェントの作成
最終コンポーネントは、Strands フレームワーク内で Find Dashboard Agent と Modify Dashboard Agent をツールとして調整・統合します。このオーケストレーターは、ルーティングロジックを指示するシステムプロンプトを定義し、どのエージェントが発見オペレーションを担当し、どのエージェントが変更オペレーションを担当するかを指定します。設定には両方の専門化されたエージェントのツール登録が含まれており、これによりオーケストレーターは分類された意図に基づいてそれらを呼び出すことができます。
ルーティングロジックは自然言語理解を通じて複数のクエリパターンを処理します。ダッシュボード名や列名などの明示的なパラメータを含む直接的な要求は、即座に適切な専門化されたエージェントに委任されます。必要なパラメータを欠いた曖昧な要求については、ルーティング前に不足している情報を収集するためのフォローアップ質問がトリガーされます。この実装パターンにより、オーケストレーターは実行役ではなく調整役として機能し、Quick API の操作を専門化されたエージェントに委任しつつ、意図の分析とルーティング決定にのみ注力します。
以下のスニペットは、オーケストレーターが両方のエージェントをツールとして登録し、システムプロンプトを通じてルーティングロジックを定義する様子を示しています:
from find_dashboard_agent import find_dashboard_agent
from modify_dashboard_agent import modify_dashboard_agent
orchestrator = Agent(
model=BedrockModel(model_id=MODEL_ID),
tools=[find_dashboard_agent, modify_dashboard_agent],
system_prompt="""You are an Amazon Quick Orchestrator. Route user requests to specialized agents.
AGENTS:
- find_dashboard_agent: ダッシュボードの検索、一覧表示、列の表示
- modify_dashboard_agent: 列の追加・削除
ROUTING LOGIC:
- "find", "show", "list", "get", "columns" → find_dashboard_agent
- "add", "remove", "modify", "delete" → modify_dashboard_agent"""
)
Bedrock AgentCore の統合により、このオーケストレーターがユーザーリクエストを受け付けるエントリーポイントとして公開されます:
app = BedrockAgentCoreApp()
@app.entrypoint
def invoke(payload):
user_input = payload.get("prompt", "")
response = orchestrator(user_input)
return response.message['content'][0]['text']
find_dashboard_agent と modify_dashboard_agent はそれぞれ @tool 関数としてラップされているため、オーケストレーターはこれらを他のツールと同様に扱います。Amazon Nova がユーザーの意図を分析し、適切なエージェントを自動的に呼び出します。
ステップ 2: エージェント展開用のプロジェクト設定
エージェントを Amazon Bedrock AgentCore に直接コードデプロイすることで展開します。これには、プロジェクトの初期化、依存関係の追加、エージェントファイルの作成、およびランタイム環境へのデプロイが含まれます。
2.1 プロジェクトの初期化
uv パッケージマネージャーを使用して新しい Python プロジェクトを設定し、その後プロジェクトディレクトリに移動します。uv init quicksight-selfservice-agentcd quicksight-selfservice-agentと実行することで、依存関係の管理やエージェントのデプロイに必要な設定ファイルを含む新しいプロジェクト構造が作成されます。
2.2 プロジェクトへの依存関係の追加
プロジェクトに必要な Amazon Bedrock AgentCore ライブラリと開発ツールをインストールしてください。この例では、uv add コマンドを使用して依存関係を追加します:
uv add bedrock-agentcore strands-agents strands-agents-tools
uv add --dev bedrock-agentcore-starter-toolkit
仮想環境をアクティブ化します:
Linux/macOS の場合
source .venv/bin/activate
Windows の場合
source .venv/Scripts/activate
これらの依存関係には、エージェントの作成に Strands SDK を、デプロイ管理に Amazon Bedrock AgentCore ツールキットを含む、エージェントの構築と展開のためのコアフレームワークが含まれています。
2.3 agent.py ファイルの作成
GitHub リポジトリ から完全な実装を zip ファイルとしてダウンロードしてください。zip ファイルを展開し、以下のファイルをプロジェクトのルートディレクトリにコピーします:
- agent.py – Amazon Bedrock AgentCore と統合されたメインのオーケストレーターエージェントのエントリーポイント
- find_dashboard_agent.py – ダッシュボード発見操作に特化した専用エージェント
- modify_dashboard_agent.py – ダッシュボード修正操作に特化した専用エージェント
- shared/ フォルダ – 共有 AWS サービスクライアント設定用の config.py を含む
pyproject.toml や設定ファイルなどの他の必要なファイルは、初期化ステップからプロジェクトセットアップの一部として既に存在しています。これらのファイルを配置することで、クイックセルフサービスエージェントを Amazon Bedrock AgentCore にデプロイできるようになります。
ステップ 3: Amazon Bedrock AgentCore ランタイムへのデプロイ
Amazon Bedrock AgentCore は、Strands エージェントをデプロイするための管理環境を提供し、コンテナベースのデプロイと直接コードデプロイの 2 つのオプションを用意しています。本ソリューションでは、直接コードデプロイを使用できます。
3.1 エージェントを Amazon Bedrock AgentCore に設定する
以下のコマンドを実行して、クイックセルフサービスエージェントを設定します。
agentcore configure --entrypoint agent.py --name qs_selfservice_agent
依存性ファイルを検出しました:pyproject.toml
このファイルを使用するには Enter キーを押すか、別のパスを入力してください(Tab キーで補完):
パスまたは検出された依存性ファイルを使用するには Enter を押してください:pyproject.toml
✓ 要件ファイルを使用しています:pyproject.toml
デプロイメント設定
デプロイメントタイプを選択してください:
直接コードデプロイ (推奨) - Python のみ、Docker は不要
コンテナ - カスタムランタイムまたは複雑な依存関係の場合
選択 [1]: 1
Python ランタイムバージョンを選択してください:
PYTHON_3_10
PYTHON_3_11
PYTHON_3_12
PYTHON_3_13
選択 [4]: 4 ✓ デプロイメントタイプ:直接コードデプロイ (python.3.13)
実行ロール
Enter キーを押して実行ロールを自動作成するか、既存のロールを使用する場合は実行ロール ARN/名を入力してください。
実行ロール ARN/名 (または Enter を押して自動作成):
✓ 実行ロールを自動作成します
S3 バケット
Enter キーを押して S3 バケットを自動作成するか、既存のバケットを使用する場合は S3 URI/パスを入力してください (URI またはパスを入力するか、Enter を押して自動作成):
✓ S3 バケットを自動作成します
認証設定 注:AgentCore は IAM 認証を使用します。
代わりに OAuth オーザライザーを設定
原文を表示
Business analysts often wait days for dashboard modifications when responding to changing business requirements. Traditional processes involve submitting modification requests to IT teams, who interpret requirements, navigate API documentation, understand table schemas, and deploy changes. While this approach maintains proper oversight and quality control, it can result in multi-day turnaround times when rapid dashboard updates are needed.
This solution combines the power of Amazon Bedrock AgentCore, Strands Agents, and Amazon Quick transforms to deliver a secure, scalable, and intelligent system for building and operating AI agents while transforming data into actionable business insights.
Solution overview
In this solution, we use a multi-agent architecture built with Amazon Bedrock AgentCore and the Strands framework. Amazon Bedrock AgentCore is an agentic platform for building, deploying, and operating effective agents securely at scale, no infrastructure management needed. It accelerates agents to production with intelligent memory and a gateway to enable secure, controlled access to tools and data. It runs agents with production-grade security and dynamic scaling and monitors performance and quality in production. Strands Agents is a code-first framework for building agents with integration to AWS services. The solution also uses Amazon Quick which delivers AI-powered BI capabilities, transforming your scattered data into strategic insights for everyone so you can make faster decisions and achieve better business outcomes.
The architecture comprises three specialized agents working together. The *Find Dashboard Agent* performs discovery operations including searching dashboards and retrieving column metadata from dashboards and datasets. The *Modify Dashboard Agent* executes configuration changes by validating columns, updating table visuals, and creating new dashboard versions. The *Orchestrator Agent* routes user requests to the appropriate specialized agents based on intent classification.
The Orchestrator Agent serves as the entry point for user interactions. When users submit natural language queries like “Add lastname to the testing dashboard”, Amazon Nova classifies requests as conversational or operational. Conversational queries receive direct responses using Nova’s large language model (LLM) capabilities. Operational requests are routed through the Strands framework to specialized agents, validates changes against available dataset columns, and executes modifications autonomously while maintaining security controls, audit trails, and preserving original dashboards for rollback purposes.The following diagram illustrates the solution architecture and workflow.

The architecture includes the following components:
- Amazon Bedrock AgentCore – Hosts the Strands Agent orchestrator and specialized sub-agents.
- Amazon Nova – Provides natural language processing (NLP) and reasoning capabilities.
- Amazon Quick – The target service for dashboard discovery and modification operations.
- AgentCore Memory – Maintains conversation context and session state.
- Amazon Bedrock AgentCore Observability – Logs agent decisions and traces API interactions.
To implement the agentic AI solution for Quick self-service, complete the following high-level steps:
- Build the agents (Find Dashboard Agent, Modify Dashboard Agent, and Orchestrator Agent).
- Deploy the agents to Amazon Bedrock AgentCore.
- Test the agent through the AWS Management Console.
Prerequisites
To implement this solution, you must have the following prerequisites:
- An AWS account with permissions for Amazon Bedrock, Amazon Quick, and AWS Identity and Access Management (IAM). For creating a new dashboard, refer to Create an Amazon Quick dashboard for more information.
- An active Amazon Quick account with existing dashboards (creating guide).
- IAM permissions configured to grant the agent access to Quick Application Programming Interfaces (APIs):
quicksight:ListDashboards
- quicksight:DescribeDashboard
- quicksight:DescribeDashboardDefinition
- quicksight:DescribeDataSet
- quicksight:CreateDashboard
- Python 3.10 or later (Python 3.10-3.13 supported for direct code deployment).
- The uv package manager installed (installation guide).
- AWS Command Line Interface (AWS CLI) configured with appropriate credentials.
- Basic understanding of Python and AWS services.
Walkthrough
To build, deploy, and test your AI-powered dashboard automation solution using Amazon Bedrock AgentCore*, *follow these four steps:
Step 1: Build Quick self-service agents to find and modify dashboards
Build three core agents that power the Quick self-service solution:
- Find Dashboard Agent for discovery operations.
- Modify Dashboard Agent for modification operations.
- Orchestrator Agent that coordinates between them.
Let’s explore each agent’s role and implementation.
1.1 Build the Find Dashboard Agent
This agent handles dashboard discovery operations required for subsequent viewing or modification actions. For example, when a user submits a natural language query such as “show me a report with name ‘testing’,” the orchestrator invokes this agent, which executes the list_dashboards API to retrieve dashboard metadata, filters results based on search criteria, and returns matching dashboards in a structured format.
This discovery agent offers three core capabilities: dashboard search with support for both exact and partial name matching, listing available dashboards in the account, and retrieving column information from both dashboards and their underlying datasets. These discovery functions serve as a prerequisite for dashboard operations, as identifying the target dashboard is required before executing modifications or retrievals.
Each capability is implemented as a Strands @tool function. The following snippet shows the find dashboard tool, which calls the list_dashboards API and filters results using partial name matching:
from strands import Agent, tool
from strands.models import BedrockModel
@tool
def find_dashboard_tool(dashboard_name: str = "") -> str:
"""Find Quick dashboards by name (supports partial matching)"""
client = boto3.client('quicksight', region_name=REGION)
response = client.list_dashboards(AwsAccountId=AWS_ACCOUNT_ID)
dashboards = response.get('DashboardSummaryList', [])
# List all dashboards if no search term provided
if not dashboard_name or dashboard_name.strip() == "":
all_names = [d['Name'] for d in dashboards]
return f"All dashboards ({len(all_names)}): {all_names}"
# Filter using case-insensitive partial matching
matches = [d['Name'] for d in dashboards if dashboard_name.lower() in d['Name'].lower()]
return f"Found {len(matches)} dashboards: {matches}"The agent then wraps these tool functions inside a Strands Agent and exposes itself as a @tool so the orchestrator can invoke it with natural language queries:
_find_agent = Agent(
model=BedrockModel(model_id=MODEL_ID),
tools=[find_dashboard_tool, get_columns_tool],
system_prompt="You are the Find Dashboard Agent. Help users find dashboards and view columns."
)
@tool
def find_dashboard_agent(query: str) -> str:
"""Agent wrapper exposed as a tool for the orchestrator to invoke"""
response = _find_agent(query)
return str(response)This agent-as-tool pattern is what enables the multi-agent architecture. The orchestrator doesn’t call Quick APIs directly, it invokes this agent, which handles natural language understanding and API calls internally.
1.2 Build the Modify Dashboard Agent
With discovery capabilities in place, the next agent handles dashboard configuration changes through a validation-first workflow. Consider a user request like “add lastname to the testing dashboard.” The orchestrator routes this to the Modify Dashboard Agent, which validates the column exists in the dataset schema, retrieves the complete dashboard definition using the describe_dashboard_definition API, updates table visual field wells and field options, and creates a new dashboard version using the create_dashboard API.
This modification agent supports two primary operations: adding columns to dashboards (after validating the requested column exists in the underlying dataset but isn’t already present) and removing columns from dashboards (after confirming the column is currently displayed). Rather than modifying existing dashboards, it creates new dashboards with unique identifiers, preserving the original for audit purposes and supporting rollback if needed.
This validation-first approach helps validate data integrity and prevent configuration errors, while preserving original dashboards supports compliance with governance requirements and provides an audit trail for modifications.
The following snippet shows the core modification tool. It validates the request, updates the dashboard definition’s table visual field wells, and creates a new dashboard:
@tool
def modify_dashboard(dashboard_name: str, action: str, column_name: str) -> str:
"""Modify a dashboard by adding or removing columns"""
client = boto3.client('quicksight', region_name=REGION)
info = _get_dashboard_and_dataset_info(dashboard_name)
# Validation-first: verify column state before making changes
if action == "add":
if column_name in info["dashboard_columns"]:
return f"Column '{column_name}' is already in the dashboard."
if column_name not in info["dataset_columns"]:
return f"Column '{column_name}' doesn't exist in dataset."
elif action == "remove":
if column_name not in info["dashboard_columns"]:
return f"Column '{column_name}' is not in the dashboard."
# Update table visual field wells in the dashboard definition
updated_definition = info["definition"]
for sheet in updated_definition.get('Sheets', []):
for visual in sheet.get('Visuals', []):
if 'TableVisual' in visual:
field_wells = visual['TableVisual']['ChartConfiguration']['FieldWells']
existing_fields = field_wells['TableAggregatedFieldWells']['GroupBy']
if action == "add":
existing_fields.append({
'CategoricalDimensionField': {
'FieldId': str(uuid.uuid4()),
'Column': {
'DataSetIdentifier': dataset_id,
'ColumnName': column_name
}
}
})
elif action == "remove":
existing_fields = [f for f in existing_fields
if f['CategoricalDimensionField']['Column']['ColumnName'] != column_name]
# Create new dashboard with UUID suffix, original is preserved for rollback
new_uuid = str(uuid.uuid4())[:8]
client.create_dashboard(
AwsAccountId=AWS_ACCOUNT_ID,
DashboardId=f"dashboard_{new_uuid}",
Name=f"{info['dashboard_name']}_dashboard_{new_uuid}",
Definition=updated_definition
)
Like the Find Dashboard Agent, this tool is wrapped inside a Strands Agent and exposed as a @tool for the orchestrator:
_modify_agent = Agent(
model=BedrockModel(model_id=MODEL_ID),
tools=[modify_dashboard],
system_prompt="You are the Modify Dashboard Agent. You add or remove columns from dashboards."
)
@tool
def modify_dashboard_agent(query: str) -> str:
"""Agent wrapper for the orchestrator to invoke with natural language"""
response = _modify_agent(query)
return str(response)The agent extracts the dashboard name, action, and column name from the user’s natural language query and passes them to the modify_dashboard tool, which handles validation and execution.
1.3 Create the Orchestrator Agent
The final component coordinates the Find Dashboard Agent and Modify Dashboard Agent as tools within the Strands framework. This orchestrator defines system prompts that instruct routing logic, specifying which agent handles discovery operations versus modification operations. The configuration includes tool registration for both specialized agents, allowing the orchestrator to invoke them based on classified intent.
The routing logic handles multiple query patterns through natural language understanding. Direct requests containing explicit parameters such as dashboard names and column names are immediately delegated to the appropriate specialized agent. Ambiguous requests lacking required parameters trigger follow-up questions to gather missing information before routing. This implementation pattern allows the orchestrator to function as a coordinator rather than an executor, delegating Quick API operations to specialized agents while focusing solely on intent analysis and routing decisions.
The following snippet shows the orchestrator registering both agents as tools and defining the routing logic through its system prompt:
from find_dashboard_agent import find_dashboard_agent
from modify_dashboard_agent import modify_dashboard_agent
orchestrator = Agent(
model=BedrockModel(model_id=MODEL_ID),
tools=[find_dashboard_agent, modify_dashboard_agent],
system_prompt="""You are an Amazon Quick Orchestrator. Route user requests to specialized agents.
AGENTS:
- find_dashboard_agent: Finding dashboards, listing, showing columns
- modify_dashboard_agent: Adding/removing columns
ROUTING LOGIC:
- "find", "show", "list", "get", "columns" → find_dashboard_agent
- "add", "remove", "modify", "delete" → modify_dashboard_agent"""
)The Bedrock AgentCore integration exposes this orchestrator as the entry point that receives user requests:
app = BedrockAgentCoreApp()
@app.entrypoint
def invoke(payload):
user_input = payload.get("prompt", "")
response = orchestrator(user_input)
return response.message['content'][0]['text']Because find_dashboard_agent and modify_dashboard_agent are each wrapped as @tool functions, the orchestrator treats them like any other tool. Amazon Nova analyzes the user’s intent and invokes the appropriate agent automatically.
Step 2: Set up project for agent deployment
Deploy the agents to Amazon Bedrock AgentCore using direct code deployment. This involves initializing the project, adding dependencies, creating the agent files, and deploying to the runtime environment.
2.1 Initialize project
Set up a new Python project using the uv package manager, then navigate into the project directoryuv init quicksight-selfservice-agentcd quicksight-selfservice-agentThis creates a new project structure with the necessary configuration files for managing dependencies and deploying your agent.
2.2 Add dependencies for the project
Install the required Amazon Bedrock AgentCore libraries and development tools for your project. In this example, dependencies are added using the uv add command:
uv add bedrock-agentcore strands-agents strands-agents-tools
uv add --dev bedrock-agentcore-starter-toolkitActivate the virtual environment:
# For Linux/macOS
source .venv/bin/activate
# For Windows
source .venv/Scripts/activateThese dependencies provide the core framework for building and deploying your agent, including the Strands SDK for agent creation and the Amazon Bedrock AgentCore toolkit for deployment management.
2.3 Create the agent.py file
Download the complete implementation from the GitHub repository as a zip file. Extract the zip and copy the following files to your project root directory:
- agent.py – Main orchestrator agent entry point with Amazon Bedrock AgentCore integration
- find_dashboard_agent.py – Specialized agent for dashboard discovery operations
- modify_dashboard_agent.py – Specialized agent for dashboard modification operations
- shared/ folder – Contains config.py for shared AWS service client configuration
Other required files such as pyproject.toml and configuration files are already part of the project setup from the initialization step. With these files in place, you can now deploy the Quick self-service agent to Amazon Bedrock AgentCore.
Step 3: Deploy to Amazon Bedrock AgentCore Runtime
Amazon Bedrock AgentCore provides a managed environment for deploying Strands Agents with two deployment options: container-based deployment and direct code deployment. For this solution, we can use direct code deployment.
3.1 Configure your agent to Amazon Bedrock AgentCore
Run the following command to configure the Quick self-service agent
agentcore configure --entrypoint agent.py --name qs_selfservice_agent
Detected dependency file: pyproject.toml
Press Enter to use this file, or type a different path (use Tab for autocomplete):
Path or Press Enter to use detected dependency file: pyproject.toml
✓ Using requirements file: pyproject.toml
Deployment Configuration
Select deployment type:
Direct Code Deploy (recommended) - Python only, no Docker required
Container - For custom runtimes or complex dependencies
Choice [1]: 1
Select Python runtime version:
PYTHON_3_10
PYTHON_3_11
PYTHON_3_12
PYTHON_3_13
Choice [4]: 4 ✓ Deployment type: Direct Code Deploy (python.3.13)
Execution Role
Press Enter to auto-create execution role, or provide execution role ARN/name to use existing
Execution role ARN/name (or press Enter to auto-create):
✓ Will auto-create execution role
S3 Bucket Press Enter to auto-create S3 bucket, or provide S3 URI/path to use existing S3 URI/path (or press Enter to auto-create):
✓ Will auto-create S3 bucket
Authorization Configuration Note: AgentCore uses IAM authorization.
Configure OAuth authorizer instea
関連記事
今日のまとめ
AI日報で今日の重要ニュースをまとめ読み