Amazon Bedrock AgentCore、エージェントの静かなる失敗を検出
Amazon Bedrock AgentCore の新機能「Optimization Insights」は、従来のインフラ監視では検出できない AI エージェントの行動上の失敗やサイレントエラーを検出し、優先順位をつけて修正を可能にする画期的な観測機能である。
キーポイント
サイレント障害の検知
システム側では正常(緑色)と判定されるが、顧客には誤った結果やスキップされた手順として届く「行動上の失敗」を検出する能力を提供する。
パターン分析による優先順位付け
個々のセッションのトレースを単に確認するだけでなく、数百ものエラーから影響範囲が広いパターン(例:トラフィックの 30%)とエッジケースを区別し、修正の優先度を自動で提示する。
能動的な観測モデルへの転換
従来の事後的なトレース調査から、パターンを検知して事前に警告する能動的な観測モデルへシフトし、スケーリングされた AI エージェントの運用リスクを低減する。
既存スタックとの統合
新しいデータ収集ツールを必要とせず、すでに収集されているトレースデータを解析対象として活用し、行動知能へと変換して可視化する。
重要な引用
your dashboards show green across the board. 99% completion rate, healthy latency, zero error spikes. And yet customer complaints trickle in about incorrect outcomes.
These are behavioral failures, and they look different from infrastructure issues. They complete successfully from the system’s perspective.
It tells you little about whether you’re looking at a pattern affecting 30% of traffic or an edge case affecting three sessions.
影響分析・編集コメントを表示
影響分析
本記事は、大規模な AI エージェント運用における最大の課題の一つである「見えない障害」の解決策を示しており、業界全体の観測(Observability)基準を再定義する可能性を秘めている。従来のインフラ監視に依存したアプローチから、AI の挙動そのものを分析する新しいパラダイムへの移行を促し、企業による AI エージェントの実装と運用の信頼性を大幅に向上させる。
編集コメント
AI エージェントが実社会で本格的に運用されるようになると、単純なエラーログの監視だけでは不十分であるという課題は常につきまといます。今回の Amazon のアプローチは、システム視点ではなくユーザー体験視点での「失敗」を定義し直す点で非常に示唆に富んでいます。
大規模に AI エージェントを運用している場合、Amazon Bedrock AgentCore は、これまで経験はあっても検出が難しかった洞察の一種を明らかにします。それは「ダッシュボード上ではすべて緑色(正常)に見える」状態です。完了率が 99% で、レイテンシーも健全で、エラーの急増もない。それなのに、顧客からは不正確な結果に関する苦情がひっそりと届き始めています。
実際には実行されなかった注文の変更や、在庫 API のタイムアウトにより「在庫あり」と表示された商品、あるいはスキップされてしまった承認ステップなどです。これらはインフラ上の問題とは異なる「行動上の失敗」です。システム側から見れば正常に完了しており、ヘルスチェックも通過します。そのため、大規模な影響がユーザーに及んでから数週間経って顧客からのエスカレーションを通じて初めて表面化することが多いのです。
エラー信号を発生するケースであっても、別の課題が存在します。1 日に数千セッションを処理するエージェントで数百件のエラーが発生した場合、どれを優先して対応すべきかです。個別のトレースを確認すれば単一セッションでの出来事はわかりますが、それがトラフィックの 30% に影響するパターンなのか、それとも数セッションだけの例外事象なのかを見極めることはできません。
Amazon Bedrock AgentCore の最適化機能は、エラー信号を一切生成しない「沈黙の失敗」を含む、デプロイ済み AI エージェントの行動上の不具合を発見し、その原因を説明し、優先順位をつけて対応するためのインサイト(洞察)を提供します。この機能により、観測可能性のモデルは事後のトレース調査から、先行的なパターン検知へとシフトします。これにより、失敗の特定、影響範囲の把握、そして優先度順での修正が可能になります。
本記事では、AgentCore 最適化におけるインサイトがどのように機能するか、設定方法、および実際のエージェントに対して適用した際にどのような洞察が得られるかについて解説します。
Amazon Bedrock AgentCore 最適化が提供するインサイトとは
インサイトは、既存の観測スタックよりも一段上位で動作します。ツールがすでに収集しているトレースデータを消費し、それを実行可能な行動に関する知見へと変換します。これにより、個々のセッションでの失敗に留まらず、スケールした環境全体に影響を与える広範なパターンを理解するための調査機能が強化されます。
以下の図は、AgentCore がインサイトを配信するために実施する一連の分析を示しています。各セッション分析メソッドは、それぞれのセッションから 1 つ以上の属性を抽出します。これらの属性は、各分析メソッドごとに独立してクラスタリングされ、さらに解釈しやすくするため各クラスタが要約されます。

インサイトレポートでは、以下の内容が提示されます。
根本原因分析を伴う失敗パターンのランク付け
数百セッションにわたるクラスターをランク付けして表示します。事前定義されたカテゴリやフィルタは不要です。各クラスターには、影響を受けたセッション全体を網羅する集約的な説明が付与され、個別のトレースを開かなくても具体的なアクションを起こせるレベルで詳細が示されます。
パターンは、影響を受けるセッションの割合に応じて順序付けられているため、重要な問題と単なる例外ケースを即座に区別できます。この機能がない場合、開発者は勘頼りでエラーの優先順位を決めざるを得ず、数百ものトレースを手動で確認しない限り、体系的な問題を特定することはできません。
ユーザー意図の分析
異なるシナリオにおけるユーザーとエージェントの相互作用を明らかにします。本番環境のエージェントは、設計時に想定していた範囲から外れたリクエストを受け取ることも珍しくありません。意図分析機能を使えば、ユーザーが実際に何を求めているかの分布を確認できます。
これにより、対応すべきカバレッジの隙間や、守るべきスコープの境界を特定できます。既存のトレース収集以外に追加の計装(インストルメンテーション)を行う必要はありません。
実行状況の洞察
異なるシナリオにおけるエージェントの応答挙動を可視化します。実行状況の洞察からは、エージェントが採用している戦略や、セッション中のアクション進行状況、そして設計意図から実際の動作がどこで乖離しているかが分かります。
これは「エージェントに何を実現させるつもりだったか」と「大規模運用時に実際に何をしているか」のギャップを埋めるものです。
各機能の詳細解説
ここからは、それぞれの機能を詳しく見ていきましょう。
Failure pattern discovery
AgentCore は、セッションのトレースを行動失敗タイプの構造化された分類体系に対して分析します。これにより、ハルシネーション(幻覚)、誤った動作、タスク指示違反、オーケストレーションエラー、コンテキスト処理の問題など、11 のカテゴリに分類される失敗を検出します。この分析は単なるエラー信号に依存するのではなく、ポリシー準拠や行動の正しさについて推論を行います。これにより、目に見えない「サイレント・フェイル」も検知可能になります。
検出された各失敗には、トレース上の位置、カテゴリ、そして何が起きたのかを自然言語で記述した説明が付与されます。これらの説明はさらにグループ化され、クラスタリングされます。その結果、数百セッションにわたる個別のトレースエントリではなく、単一の「名前付きパターン」として表面化します。
以下の図は、失敗のクラスタリングと根本原因分析(RCA)パイプラインを示しています。各セッションで失敗を特定し、それらをサブクラスタに分類します。そして、各失敗サブクラスタに含まれるセッションごとに、根本原因の説明を生成します。

AgentCore は、各失敗クラスタに対して実行グラフを遡って追跡し、単に失敗が発生した場所だけでなく、その原因がどこにあるかを特定します。セッションは、推論呼び出しやツール実行、サブエージェントの呼び出しなどを表すスパン(span)からなるグラフとして表現されます。システムはまず、失敗に関係ない分岐を切り捨てた上で、因果関係の分析を行います。この剪定処理により、50 ステップに及ぶワークフローの中から失敗に至る特定のパスに焦点が絞られ、長期セッションにおける根本原因分析(RCA)が可能になります。
出力では、根本原因の場所(ログ内のスパン ID)、因果関係の分類、そして修正提案(システムプロンプトの変更、ツールの説明更新、インフラ対応など)が表示されます。これらの知見はクラスタ内で根本原因をグループ化し、「100 件の失敗のうち 90 件が同じ根本原因と同一の修正タイプに起因している」といった洞察を提供します。
クラスタリングだけでは「どのような種類の失敗が存在するか」がわかりますが、スコープランキングによって「どの失敗が最も重要か」を判断できます。各失敗クラスタには影響を受けたセッション数が付与され、クラスタは分析対象となった全セッション数に対する相対的なカウント順に並べ替えられます。この二段階の階層構造により、広範な失敗カテゴリと具体的なサブパターンが明確に区別されます。
上位クラスタでは「エージェントが情報収集をバイパスしている」という事象が 116 セッションに発生していると表示されます。詳細を確認すると、そのうち 114 セッションは「必須情報の取得をスキップした」という単一のサブパターンによるものであり、残りの 2 セッションは無関係なエッジケースであることがわかります。この構造により、失敗の大部分を解決する単一の修正点を即座に特定できます。
ユーザー意図分析
障害検出以外にも、AgentCore ではエージェントの振る舞いに関する 2 つの追加的な視点を提供します。「ユーザー要求クラスタリング」機能では、実際にユーザーが送信したプロンプトを埋め込み・グループ化することで、本番環境でのユースケースの分布を把握できます。例えば、設計時に想定していたユースケースがトラフィックの 40% を占めている一方で、部分的にしか対応できていないものが 30%、そして全く予想していなかったユースケースが残り 30% であるといった発見も可能です。
実行インサイト
「実行サマリー」では、各セッションでエージェントがどのようなアプローチを採用し、どのような結果に至ったかを抽出します。これは長さの異なるセッションを柔軟に処理する階層的な要約戦略を用いており、その後 AgentCore がこれらのサマリーをクラスタリングすることで実行パターンを可視化します。これにより、エージェントが採用する一般的な戦略や、それらが成功・失敗とどう関連しているか、そして実際の振る舞いが設計意図からどこで乖離しているかが明らかになります。
これらを組み合わせることで、単なるエラー検出を超え、システムがどのように利用され、どのように応答しているかを理解するための、本番環境におけるエージェントの行動マップを構築できます。
Amazon Bedrock AgentCore のインサイト設定方法
Amazon Bedrock AgentCore の観測機能でテレメトリデータが記録されているエージェントがある場合、インサイトを活用することで、そのエージェントの失敗モードやユーザーの意図、実行サマリーを理解することが可能です。
AgentCore コンソールの「Optimizations > Insights > Create Insights」から、インサイトの設定を作成できます。
分析対象の選択
「生成するインサイト(Insights to generate)」セクションで、分析したいタイプを選択してください。
- 失敗分析 (Failure analysis): セッション全体を通じて、根本原因を特定し、不正確または不完全な結果がどこで発生したかを浮き彫りにします。
- ユーザー意図分析 (User intent analysis): ユーザーがエージェントに送信しているリクエストをクラスタリングし、彼らが何を達成しようとしているのかを把握できます。
- 実行サマリー (Execution summary): セッションごとにエージェントが実行したアクションとその解決に向けた進行状況を抽出します。
これらは個別に実行することも、まとめて実行することも可能です。
エージェントの接続
セッションデータに対してインサイトを指向させるには、以下の 2 つの方法があります。
- エージェンシーエンドポイントを選択: AgentCore ランタイムを通じてデプロイされたエージェントを選ぶと、関連する Amazon CloudWatch ロググループが自動的に選択されます。
- Amazon CloudWatch ロググループを選択: エージェントが AgentCore ランタイム外で動作している場合は、トレースデータが格納されるロググループを直接指定してください。
スケジュールの設定
インサイトには、以下の 2 つのモードを設定できます:
Recurring(定期) は、選択した間隔で自動的にレポートを生成します。日次、週次、月次の分析頻度を組み合わせて有効化することも可能です。一度作成すると、追加の操作なしにバックグラウンドでセッションの解析が実行されます。
One-time(一時) は、特定の期間に対して単一のレポートを生成します。デプロイ後のレビューや苦情に基づく調査、説明が必要なメトリクス異常などに対応する際に使用してください。
「作成後にこの設定を有効にする」チェックボックスはデフォルトでオンになっており、保存直後に処理が開始されます。
オプション:フィルター、サンプリング、権限
「Filters and sampling(フィルターとサンプリング)」を展開して、分析対象のセッション条件を絞り込んだり、トラフィックの一部をサンプリングしたりできます。また、「Permissions(権限)」を展開すると、ログへのアクセスに使用する IAM ロールを設定できます。
設定が完了したらCreate Insights(インサイト作成)を選択し、選択したスケジュールに基づいて最初のレポートが利用可能になります。

インサイトの実践例
投資分析、株式推奨、セクターパフォーマンスデータを提供する market trends agent(市場動向エージェント) を想定してください。10 回のセッションを実行した後、各インサイト解析ビューで確認できる内容は以下の通りです。
失敗分析
インサイトから特定された失敗カテゴリは「ツール呼び出しなしの幻覚的な金融データ」です。10 セッションのうち 1 つで発生しました。このエージェントは、利用可能なデータ取得ツールを呼び出すことなく、具体的な金融数値や市場レート、数値主張を生成し、あたかも事実であるかのように提示してしまいました。これは、主張を行う前に実際のデータを取得するよう指示されたシステムプロンプトの要件に違反しています。
根本原因である「ツール呼び出しなしの捏造データ主張」は、明記された要件と実行時の強制力との間にギャップがあることに起因します。システムプロンプトでは回答を実際のデータに基づかせるよう指示していますが、事実上の主張を行う前にツールの使用を義務付けるための十分な強制メカニズムが欠けています。その結果、エージェントはデータ検証のステップを迂回し、未検証な情報を権威ある情報として提示してしまいました。
この失敗ではエラーが発生していません。セッション自体は正常に完了しました。しかしインサイトを確認することで、根本原因や影響を受けた具体的なセッション、そして解決への明確な道筋が見えてきます。具体的には、数値主張を行う前にツールの呼び出しを強制するようシステムプロンプトを強化することが必要です。

ユーザーの意図分析
エージェントに対してユーザーが何を求めているかを理解するには、通常、セッションのトランスクリプトを手動で読み込む必要があります。しかし、「意図分析」機能を使えば、すでに収集したトレースデータから自動的にその分布を把握できます。
ここでは、ユーザーのリクエストを 3 つのカテゴリにクラスタリングし、実際にユーザーがエージェントに何を求めているかの実態を示しています:
- プロファイルの取得とポートフォリオ評価(全セッションの 5/10):既存のポートフォリオデータを表示したり、パーソナライズされた投資プロファイル情報を求めたり、リスク許容度に基づいたセクター別のおすすめを依頼するケースです。
- マクロ経済およびセクター分析(3/10 セッション):市場全体の状況やセクターレベルのトレンドについて質問するケースです。
- 複数銘柄の比較・分析(2/10 セッション):特定の銘柄同士を比較するケースです。
トラフィックの半分はプロファイルやポートフォリオの取得に関連しています。これは、まず信頼性の強化に注力すべき箇所を示唆しています。もしプロファイルの参照が失敗したり、古くなったデータが返されたりすれば、ユーザーの 50% に体験を損なう結果になります。

実行サマリー
エージェントが本来何のために設計されたかは知っていても、大規模なセッション全体で実際にどのような動作が行われているかについては、可視化の範囲に限界があります。この「実行サマリー」機能は、そのギャップを埋めるものです。
ここでは市場エージェントの振る舞いを、3 つの実行パターンに分類して示しています:
多セクター金融分析とポートフォリオ配分(10セッション中6回):エージェントは市場の概要データ(VIX、セクターのパフォーマンス、センチメント)を取得し、防衛的なセクターを分析。さらに、コカ・コーラ (KO)、プロクター・アンド・ギャンブル (PG)、ジョンソン・エンド・ジョンソン (JNJ)、ユニオン・パシフィック (UNH) などの大型株の個別データを取得し、具体的な配分比率とリスク調整済みの推奨を含む多セクター配分フレームワークを構築します。
プロファイルファーストの明確化と情報収集(10セッション中2回):エージェントは行動に移す前に、まずユーザーのプロファイルを理解することに優先順位を置きます。
AI とセクターインテリジェンスを活用した複数銘柄の比較分析(10セッション中2回):エージェントはセクターレベルの文脈を加味しながら、複数の銘柄を比較します。
これらの結果から、主要な実行パターンとしてエージェントがアドバイザリーワークフローをエンドツーエンドで完遂する傾向が浮かび上がります。一方、残りの小規模なパターンからは、これとは異なる行動経路が存在することも読み取れます。

結論
Amazon Bedrock AgentCore の最適化機能は、エージェントが「静かに誤った判断」を下している際にその実態を可視化する強力なツールです。デプロイ後に苦情が急増するもののダッシュボードの数値には異常が見られない場合、この機能を用いて事後検証を行うことで根本原因を特定できます。また、顧客に問題が発覚する前に「見えない障害」を検知するための週次モニタリングにも活用可能です。
さらに、限られた数の苦情が実は全体の 10% もない影響範囲に留まっている場合でも、その実態を評価・ランク付けする際にも役立ちます。システムプロンプトの変更を特定の時間枠で検証する場合も、苦情の背景にあるセッションを追跡する場合も、基本となるワークフローは同じです。対象となるセッションを提出し、ランク付けされたパターンを受け取り、具体的な根本原因に対してアクションを起こすという流れです。
Amazon Bedrock AgentCore の最適化機能で insights を有効にすれば、従来のダッシュボードでは捉えきれなかった重要な情報が明らかになります。詳細については ドキュメント をご覧ください。
謝辞
この機能の実現に貢献された科学者およびエンジニアリングチームの皆様に感謝いたします:Sanjana Agarwal、Abhimanyu Siwach、Vincent Chen、Swarnim、Frankie Kim、Stephanie Yuan、Aron Thakur、Jaejin Cho、Muhyun Kim、Arron Bailiss、Shoaib Javed、Gitika Jha、Michael Fan。
著者について

Vivek Singh
AWS AgentCore の観測、評価、行動分析を担当するプロダクトリードです。Vivek は、企業が本番環境で AI エージェントの振る舞いを理解・測定・改善できる製品を開発しています。これにより、プロトタイプと生産レベルの自律システムとの間に存在するギャップを埋めることを目指しています。
彼の業務範囲は、計測機能の実装から自動化された評価フレームワーク、そして大規模なエージェントワークフローを透明性・テスト可能性・信頼性の高いものにするための最適化ツールまで多岐にわたります。仕事以外では、F1、チェス、テニス、カレッジフットボール、サッカーなど、おそらく健康には良くないほどの多くのスポーツを楽しんでいます。また、ガーデニングやシアトル近郊の美味しいベーカリーを探すことも好きです。

Bharathi Srinivasan
AWS の責任ある AI に関する技術的な市場展開を担当する Bharathi は、最先端の AI コンセプトを組織が安全に実環境へ移行できるよう支援しています。AI の信頼性と開発者のエンパワーメントに情熱を注ぐ彼女は、大規模言語モデル(LLM)の評価、信頼性、セキュリティに関する研究論文やコードサンプルを頻繁に公開しています。
趣味は山岳地帯のトレイル探索やバックカントリーでの冒険の準備、そして韓国ドラマを楽しむことです。
原文を表示
If you’re operating AI agents at scale, Amazon Bedrock AgentCore surfaces a category of insights you’ve probably experienced but struggle to detect: your dashboards show green across the board. 99% completion rate, healthy latency, zero error spikes. And yet customer complaints trickle in about incorrect outcomes.
An order modification that was never actually executed. A product reported as “in stock” when the inventory API timed out. An approval step that was skipped. These are behavioral failures, and they look different from infrastructure issues. They complete successfully from the system’s perspective. They pass health checks and only surface through customer escalations, often weeks after they began affecting users at scale.
Even for failures that do produce error signals, a separate challenge exists: when an agent serving thousands of daily sessions accumulates hundreds of errors, which ones deserve attention first? Reviewing individual traces reveals what happened in a single session. But it tells you little about whether you’re looking at a pattern affecting 30% of traffic or an edge case affecting three sessions.
Amazon Bedrock AgentCore optimization provides insights that help you discover, explain, and prioritize behavioral failures in your deployed AI agents, including the silent ones that never generate an error signal. These insights shift the observability model from reactive trace inspection to proactive pattern detection. It helps you find the failures, understand their scope, and fix them in priority order. In this post, we walk through how insights in AgentCore optimization works, how to set it up, and what it reveals when pointed at a real agent.
What insights in Amazon Bedrock AgentCore optimization delivers
Insights operate one layer above your existing observability stack. It consumes the trace data your tools already collect and transforms it into actionable behavioral intelligence. This provides an investigation capability that helps you understand broader patterns affecting agent performance at scale, beyond individual session failures.
The following figure shows the end-to-end analysis performed by AgentCore to deliver insights. Each session analysis method extracts one or more attributes from each session. The attributes from each session analysis method are clustered independently. Each cluster is summarized to enhance interpretability.

The insights report surfaces the following:
- Ranked failure pattern discovery with root cause analysis. Surfaces ranked clusters across hundreds of sessions without requiring predefined categories or filters. One aggregate explanation per cluster covering affected sessions, specific enough to act on without opening individual traces. Patterns are ordered by proportion of sessions affected, so a pertinent issue is immediately distinguishable from an edge case. Without this, developers triage errors by gut feel and cannot distinguish a systematic issue without manually reviewing hundreds of traces.
- User intent analysis. Reveals how users interact with the agent across different scenarios. Agents in production often receive requests that diverge from their intended design. Intent analysis shows you the actual distribution of what users ask for. It surfaces coverage gaps to address and scope boundaries to enforce, without requiring you to instrument anything beyond the traces you already collect.
- Execution insights. Reveals how the agent responds across different scenarios. Execution insights show you the strategies your agent employs, how actions progress during a session, and where the agent’s real behavior diverges from your intended design. This closes the gap between “what we built the agent to do” and “what the agent actually does at scale.”
Let’s now see each capability in depth.
Failure pattern discovery
AgentCore analyzes each session trace against a structured taxonomy of behavioral failure types. It detects 11 categories including hallucination, incorrect actions, task instruction violations, orchestration errors, context handling issues, and others. The analysis reasons about policy compliance and behavioral correctness rather than relying on error signals alone. This approach detects silent failures. Each detected failure produces a location in the trace, a category, and a natural language description of what went wrong. Insights then group the descriptions into clusters. This surfaces a single named pattern across hundreds of sessions, rather than hundreds of individual trace entries.
The following figure shows the failure clustering and root cause analysis (RCA pipeline). We identify failures for each session, cluster them into sub-clusters. For each session in a failure sub-cluster, we produce root cause explanations.

For each failure cluster, AgentCore traces backward through the execution graph to identify what caused the failure, not just where it appeared. The session is represented as a graph of spans (inference calls, tool executions, sub-agent invocations), and the system prunes branches unrelated to the failure before reasoning about causality. This pruning makes RCA tractable on long sessions by narrowing a 50-step workflow down to the specific execution path that led to the failure. The output surfaces a root cause location (a span ID in your logs), a causality classification, and a fix recommendation (system prompt change, tool description update, or infrastructure work). Insights then group root causes within a cluster. You might see that 90 of 100 failures share the same underlying cause and the same fix type.
Clustering alone tells you what kinds of failures exist. Scope ranking tells you which ones matter most. Each failure cluster carries a count of affected sessions, and clusters are ordered by that count relative to total sessions analyzed. The two-level hierarchy separates broad failure categories from specific sub-patterns.
A top-level cluster might show “Agent Bypasses Information Gathering” affecting 116 sessions. Drilling in reveals that 114 of those are a single sub-pattern (“Skipped Prerequisite Information Retrieval”). The remaining 2 are unrelated edge cases. This structure means you can immediately identify the single fix that addresses the largest share of failures.
User intent analysis
Beyond failures, AgentCore extracts two additional views of agent behavior. User request clustering embeds and groups the actual prompts users send to your agent, revealing the distribution of use cases in production. You may discover that 40% of traffic is a use case you designed for. Another 30% is partially supported. The remaining 30% is something you never anticipated.
Execution insights
Execution summary extracts the approach the agent took and the outcome it reached for each session. It uses a hierarchical summarization strategy that handles sessions of varying lengths. AgentCore then clusters these summaries to reveal execution patterns. This includes common strategies the agent employs, how those strategies correlate with success or failure, and where the agent’s actual behavior diverges from your intended design.
Together, these give you a behavioral map of your agent in production that goes beyond error detection into understanding how the system is being used and how it responds.
How to set up insights in Amazon Bedrock AgentCore optimization
When you have an agent with its telemetry recorded in Amazon Bedrock AgentCore observability, you can use insights to understand failure modes, user intents and execution summaries of this agent.
You can create an insights configuration from the AgentCore console under *Optimizations > Insights > Create Insights*.
Choose what to analyze
Under “Insights to generate,” select the analysis types you want:
- Failure analysis: identifies root causes and surfaces incorrect or incomplete outcomes across sessions.
- User intent analysis: clusters the requests users are sending to your agent so you can see what they are trying to accomplish.
- Execution summary: extracts the actions the agent took during each session and how they progressed toward a resolution.
You can run them independently or together.
Connect your agent
You have two options for pointing insights at your session data:
- Select agent endpoint: choose an agent deployed through AgentCore runtime, and the associated Amazon CloudWatch log group is selected automatically.
- Select Amazon CloudWatch log group: if your agent runs outside AgentCore runtime, point directly to the log group where your traces land.
Set a schedule
Insights can be set up in two modes:
Recurring generates reports automatically on a cadence you choose. You can enable a combination of daily, weekly, and monthly analysis frequencies. Once created, insights processes sessions in the background with no further action required.
One-time generates a single report for a specific time range. Use this for post-deployment reviews, complaint-driven investigations, or metric anomalies you want to explain.
The “Enable this configuration once created” checkbox (checked by default) starts processing immediately after you save.
Optional: Filters, sampling, and permissions
Expand “Filters and sampling” to scope analysis to specific session criteria or sample a subset of traffic. Expand “Permissions” to configure the IAM role insights uses to access your logs.
Once configured, choose Create Insights and your first report will be available based on the schedule you chose.

Seeing insights in action
Consider a market trends agent that provides investment analysis, stock recommendations, and sector performance data. After running 10 sessions, here is what each insight analysis view surfaces.
Failure analysis
Insights identified one failure category: “Hallucinated Financial Data Without Tool Invocation,” affecting 1 out of 10 sessions. The agent generated specific financial data points, market rates, and numerical claims and presented them as factual information without invoking available data retrieval tools. This violates the system prompt directive to retrieve actual data before making claims.
The root cause (“Fabricated Data Claims Without Tool Invocation”) traces this to a gap between stated requirements and execution enforcement. The system prompt tells the agent to ground responses in actual data but lacks sufficient enforcement mechanisms to mandate tool usage before presenting factual assertions. The agent bypasses data validation steps and presents unverified information as authoritative.
This failure produced no error. The session completed successfully. With insights, you see the root cause, the specific session affected, and a clear path to fix: strengthen the system prompt to enforce tool invocation before numerical claims.

User intent analysis
Understanding what users ask your agent to do normally requires manually reading session transcripts. Intent analysis gives you this distribution automatically from the traces you already collect. User requests here are clustered into 3 categories, revealing the actual distribution of what users ask the agent to do:
- Profile Retrieval and Portfolio Assessment (5/10 sessions): users pulling up existing portfolio data, requesting personalized investment profile information, or seeking sector-specific recommendations based on their risk profile.
- Macroeconomic and Sector Analysis (3/10 sessions): users asking about broader market conditions and sector-level trends.
- Multi-Stock Comparison and Analysis (2/10 sessions): users comparing specific stocks against each other.
Half of all traffic is profile and portfolio retrieval. This tells you where to invest in reliability first. If profile lookups fail or return stale data, you are degrading the experience for 50% of your users.

Execution summaries
You know what your agent was designed to do but have limited visibility into what it does across sessions at scale. Execution summaries close that gap. Here the market agent behavior is grouped into three execution patterns:
- Multi-Sector Financial Analysis and Portfolio Allocation (6/10 sessions): the agent retrieves market overview data (VIX, sector performance, sentiment), analyzes defensive sectors, pulls individual stock data for blue-chip names (KO, PG, JNJ, UNH), and synthesizes a multi-sector allocation framework with specific percentage allocations and risk-adjusted recommendations.
- Profile-First Clarification and Information Gathering (2/10 sessions): the agent prioritizes understanding the user’s profile before acting.
- Multi-Stock Comparative Analysis with AI and Sector Intelligence (2/10 sessions): the agent compares multiple stocks with sector-level context.
The dominant execution pattern shows the agent completing full advisory workflows end-to-end. The two smaller patterns reveal alternative behavioral paths.

Conclusion
Amazon Bedrock AgentCore optimization provides insights when your agent is silently wrong. Use it for post-deployment validation when complaints spike but dashboards look normal. Perform proactive weekly monitoring that catches invisible failures before customers do. Use it for scope ranking assessment when a handful of complaints turns out to be less than 10% of actual impact. Whether you are validating a system prompt change against a time window, or tracing complaints back to affected sessions, the workflow is the same: submit sessions, receive ranked patterns, act on specific root causes. Enable insights in Amazon Bedrock AgentCore optimization for your agent and see what your dashboards are missing. Visit the documentation to learn more.
Acknowledgements: Thank you to the science and engineering team that delivered this capability: Sanjana Agarwal, Abhimanyu Siwach, Vincent Chen, Swarnim, Frankie Kim, Stephanie Yuan, Aron Thakur, Jaejin Cho, Muhyun Kim, Arron Bailiss, Shoaib Javed, Gitika Jha and Michael Fan.
About the authors

Vivek Singh
Vivek is the Product Lead for Observability, Evaluations, and Behavioral Analysis at AWS AgentCore. He is responsible for the products that enable enterprise developers to understand, measure, and improve how AI agents behave in production, closing the gap between prototype and production-grade autonomous systems. His work spans instrumentation, automated evaluation frameworks, and optimization tooling that make agent workflows transparent, testable, and reliable at scale. Outside of work, he follows a probably unhealthy number of sports (F1, chess, tennis, college football, soccer), gardens, and hunts for good bakeries around Seattle.

Bharathi Srinivasan
Bharathi is the technical go-to-market for Responsible AI at AWS, helping organizations safely move frontier AI concepts into real-world production environments. Passionate about AI reliability and developer enablement, she frequently publishes research and code samples on LLM evaluation, reliability and security. In her free time, she enjoys exploring mountain trails, gearing up for backcountry adventures, and indulging in K-dramas.
関連記事
今日のまとめ
AI日報で今日の重要ニュースをまとめ読み