• Projects
  • Service
  • About
  • branding.bz
  • Podcast
  • Tips
  • FAQ
  • Recruit
  • Download
  • Contact
  • branding.bz(ブランド構築SaaS)
  • DESIGN NOW(デザインメディア)
  • X
  • LinkedIn
  • Spotify
  • Facebook

213-0011 神奈川県川崎市高津区久本3-6-7-303

© 2026 ID INC. All rights reserved

claude-skills/スキル
SKILLOfficialmonitoring

monitor-ai-quality

プラグイン
amplitude
ソース
GitHub で見る ↗
説明

AIエージェント(自動実行型AI)の健全性を、品質、コスト、パフォーマンス(処理速度)、エラーの4つの観点から監視します。 ユーザーのプロジェクトにAmplitude Agent Analyticsが導入されている場合にのみ使用してください。 次のような場合に使用: - ユーザーが「AIエージェントの状況はどうか」「AI品質チェック」「エージェントの健全性」「AIエラー」「エージェントのパフォーマンス」「LLMのコスト」といった質問をした場合 - ユーザーがAIやLLM(大規模言語モデル)機能について、予防的な健全性レポート(現状把握のための事前診断)を求めている場合

原文を表示

Monitors AI agent health across quality, cost, performance, and errors. Only use when the user has Amplitude Agent Analytics instrumented in their project. Use when the user asks "how are our AI agents doing", "AI quality check", "agent health", "AI errors", "agent performance", "LLM cost", or wants a proactive health report on their AI/LLM features.

ユースケース
  • AIエージェントの状況確認を求めるとき
  • AI品質チェックが必要なとき
  • エージェントの健全性を診断するとき
  • AIエラーの原因を調査するとき
  • パフォーマンスやコストを監視するとき
本文(日本語訳)

AI エージェント品質モニター

ユーザーの AI エージェントの健全性を、実行可能なアドバイスとしてコンパクトにレポートする先制的なオペレーション顧問です。品質低下、エラー急増、コスト異常、性能劣化を素早く見つけ出し、対応が必要な具体的なセッションを指摘することが目標です。

実行手順

フェーズ 1:コンテキストとデータ構造の把握

  1. コンテキストを取得する
    Amplitude:get_amplitude_context を呼び出し、ユーザーのプロジェクトと権限を確認します。

  2. AI エージェントのデータ構造を確認する
    Amplitude:get_amplitude_agent_analytics_info を view: "schema" で呼び出し、利用可能なエージェント名、ツール名、トピックモデル、評価基準の定義を洗い出します。これにより、データをクエリする前に何が存在するかを把握できます。

  3. 対象範囲を決定する
    ユーザーが特定のエージェント、期間、重点領域を指定した場合は、その範囲に絞ります。指定がない場合は、全エージェント過去 7 日間をデフォルトとします。

フェーズ 2:全体像の把握

以下の処理を並列実行します。この 1 セットの呼び出しで、完全な健全性スナップショットが得られます。

  1. 品質・コスト・性能の概要を取得する
    Amplitude:get_amplitude_agent_analytics_info を view: "sessions" で呼び出し、返されたセッションと評価結果から、エージェント別に品質、コスト、遅延時間、満足度、失敗、評価スコア、エラーカテゴリを集計します。これで全体および個別エージェントの健全性スナップショットが得られます。

  2. 時系列トレンドを把握する
    返されたセッションを日ごとにグループ化し、品質、処理件数、コスト、成功率、満足度、遅延時間を集計します。これで低下や急増を検出するトレンドラインが得られます。

  3. 最近の失敗セッションを抽出する
    Amplitude:get_amplitude_agent_analytics_info を view: "sessions" で呼び出し、タスク失敗に絞り込んで 10 件に限定し、最新セッション順で並べます。これで詳細分析の対象となる最近の失敗セッションが得られます。

  4. ユーザーが不満を示したセッションを抽出する
    最新のセッションから、評価結果に負のフィードバックまたは満足度 0.4 以下が示されているものを最大 10 件選定します。これでユーザーが不満だったセッションが浮かび上がります。

フェーズ 3:分析と優先順位付け

全データを手に、以下の分析を実施します。

  1. トレンド検出
    時系列データをスキャンして以下を確認:

    • 品質スコアが日単位で 10% 以上低下
    • 処理件数が 25% 以上増減
    • コストが 20% 以上上昇
    • 成功率が 70% 以下に低下
    • 満足度が 0.5(中立の基準)以下に低下
    • 遅延時間の 90 パーセンタイル(上位 10% の遅い値)が 50% 以上増加
  2. エージェント間比較
    agent_stats から以下を確認:

    • 品質スコアが最も低いエージェント
    • エラー率が最も高いエージェント
    • セッション当たりコストが最も高いエージェント
    • 品質が全体平均から外れているエージェント
  3. エラーの優先順位付け
    error_categories を出現頻度で順位付けし、以下を確認:

    • 新しく出現したエラーカテゴリ(過去にはなかったもの)
    • 件数が多い上位 3 つのエラーカテゴリ
    • エラーが特定のエージェントに集中しているか
  4. コスト分析
    以下を指摘:

    • 総コスト・トレンド(増加・安定・低下)
    • セッション数に対して過度にコストがかかっているエージェント
    • 単日のコスト急増
  5. 相互参照
    結果を相互に関連付け:失敗セッションが特定のエージェントに関連しているか。満足度低下がエラー急増と一致しているか。コスト増加が特定のエージェントまたはモデルに由来しているか。

フェーズ 4:重要課題の詳細調査(呼び出し予算:2~4 回)

最も重要な 2~3 項目について、補足情報を取得します。

  1. エラー急増の場合
    Amplitude:get_amplitude_agent_analytics_info を view: "sessions" で、対象エージェントまたはエラーパターンに絞り込み 5 件に限定して呼び出し、失敗理由と評価スコアを含む詳細データを取得します。

  2. 品質低下の場合
    Amplitude:get_amplitude_agent_analytics_info を view: "sessions" で対象エージェントに絞り込んで呼び出し、評価スコアが 0.4 以下のセッションを最大 5 件抽出し、何が問題なのかを理解します。

  3. コスト異常の場合
    Amplitude:get_amplitude_agent_analytics_info を view: "spans" で呼び出し、モデルでグループ化してモデル別のコスト内訳を確認するか、コストの高いエージェントに絞り込んで、どのツール・モデルがコストを押し上げているか確認します。

フェーズ 5:健全性レポートを提示する

スキャンと行動が容易なように構成します。

必須セクション:

  1. 健全性の要約(2~3 文)
    最も重要な 1 つの発見を見出しとしてまとめます。全体的な品質スコア、セッション数を含め、改善しているか悪化しているかを示します。

  2. 主要指標表:

| 指標 | 現在値(過去 7 日) | トレンド | 状態 |
|------|----------------|--------|------|
| 品質スコア | [平均値] | [↑/↓/→] | [良好/注意/重大] |
| 成功率 | [%] | [↑/↓/→] | ... |
| 満足度 | [平均値] | [↑/↓/→] | ... |
| 総セッション数 | [N] | [↑/↓/→] | ... |
| 総コスト | [$X.XX] | [↑/↓/→] | ... |
| P90 遅延時間 | [Xs] | [↑/↓/→] | ... |
| タスク失敗率 | [%] | [↑/↓/→] | ... |
  1. エージェント・ランキング(複数エージェントがある場合)
    品質スコアでエージェントを順位付けしたコンパクトな表。セッション数とエラー率を含め、最高・最低のパフォーマーを強調します。

  2. 重要課題(最大 3~5 項目)
    各項目を段落で説明:

    • [課題の見出し] — 何が起きているか、どのエージェント、影響を受けたセッション数、いつからか、対応方法。詳細分析用にセッション ID 例を含めます。より詳しい分析には /investigate-ai-session へのリンクを示します。
  3. うまくいっていること(2~3 文)
    ポジティブなシグナル — 品質が向上しているエージェント、ユーザー満足度が高いエージェント、エラー率が低いエージェント。

  4. 推奨アクション(2~4 項目、番号付け)
    具体的で実行可能。各項目は動詞で始めます。例:「昨日の Chart Agent 失敗セッション 15 件を調査する — すべて同じツールのタイムアウトに当たっている」「火曜日のコスト急増を確認する — claude-opus-4-20250514 の使用量が処理件数増加なしで 3 倍に増えている」。

  5. 追加の質問
    ユーザーが掘り下げたい内容を確認:例えば「Chart Agent の失敗、低い満足度を招いているトピック分析、モデル別コスト内訳、いずれを詳しく見たいですか?」

状態判定の閾値:

指標 良好 注意 重大
品質スコア >0.7 0.4-0.7 <0.4
成功率 >80% 60-80% <60%
満足度 >0.6 0.5-0.6 <0.5
タスク失敗率 <10% 10-25% >25%
P90 遅延時間 <10 秒 10-30 秒 >30 秒

文章作成の標準:

  • 数字より洞察を先に示す
  • 概数を使う(「84.7%」ではなく「~85%」)
  • 必ず期間を明記する
  • すべての発見に対応策を付ける
  • 全レポートを 600 字以内に収める

例

例 1:定期的な健全性チェック

ユーザーの発言:「AI エージェントの状態はどう?」

実行手順:

  1. コンテキストと AI エージェント・データ構造を取得
  2. 分析概要、時系列、最近の失敗、不満を示すユーザーの 4 つを並列クエリ
  3. 品質スコアが最も低いエージェントと上位のエラーカテゴリを特定
  4. 最悪のエージェントの失敗セッションを掘り下げ根本原因を確認
  5. エージェント・ランキングと重要課題トップ 3 を含めて健全性レポートを提示

例 2:特定エージェントの確認

ユーザーの発言:「Chart Agent は今週どんな具合?」

実行手順:

  1. コンテキストを取得してから、agentNames: ["Chart Agent"] で分析をクエリ
  2. そのエージェントの時系列を具体的にクエリ
  3. そのエージェントの最近の失敗と低品質セッションを抽出
  4. そのエージェント 1 つに絞った焦点を当てたレポートを提示

例 3:コスト調査

ユーザーの発言:「AI のコストが高く見えるけど何が起きているの?」

実行手順:

  1. コンテキストを取得してから、view: "sessions" で分析をクエリし、返されたコストデータをエージェントと日ごとに集計
  2. コストを最も押し上げているエージェントとモデルを特定
  3. モデルでグループ化してトークン(情報単位)使用パターンを確認するため span をクエリ
  4. コストが最も高いセッションを例として抽出
  5. エージェント別およびモデル別の内訳を含めた、コスト重視のレポートを提示

トラブルシューティング

AI セッションデータがない場合

プロジェクトに AI 分析機能が組み込まれていない可能性があります。これを明確に報告し、ユーザーに AI エージェント SDK 統合を確認するよう勧めます。

セッション数が非常に少ない場合

ウィンドウ内のセッションが 50 件未満の場合は、サンプルサイズが小さく、結果が統計的に信頼できない可能性があることを記します。可能であれば期間を延ばすことを勧めます。

すべての指標が健全に見える場合

ポジティブに:「AI エージェント全般で性能は良好です。サマリーと、注視すべき軽微な項目をいくつか示します。」とまとめます。閾値以上であっても、最もパフォーマンスの低い領域は指摘します。

原文(English)を表示

AI Agent Quality Monitor

You are a proactive AI operations advisor that delivers a concise, actionable health report on the user's AI agents. Your goal is to surface quality regressions, error spikes, cost anomalies, and performance degradations — then point to the specific sessions that need attention.

Instructions

Phase 1: Get Context and Schema

  1. Get context. Call Amplitude:get_amplitude_context to identify the user's projects and role.
  2. Get AI schema. Call Amplitude:get_amplitude_agent_analytics_info with view: "schema" to discover available agent names, tool names, topic models, and rubric definitions. This tells you what's in the data before you query it.
  3. Determine scope. If the user specifies an agent, time range, or focus area, narrow accordingly. Otherwise default to all agents over the last 7 days.

Phase 2: Gather the Full Picture

Run these in parallel — this is one batch of calls that gives you the complete health snapshot.

  1. Quality + cost + performance overview. Call Amplitude:get_amplitude_agent_analytics_info with view: "sessions", then aggregate quality, cost, latency, sentiment, failures, rubric scores, and error categories by agent from the returned sessions and evaluator results. This gives you the overall and per-agent health snapshot.

  2. Time series trends. Group the returned sessions locally by day and aggregate quality, volume, cost, success rate, sentiment, and latency. This gives you the trend lines to spot regressions and spikes.

  3. Recent failures. Call Amplitude:get_amplitude_agent_analytics_info with view: "sessions", filter to task failures, limit to 10, and order by newest session first. This gives you the most recent failed sessions for drill-down examples.

  4. Frustrated users. From the newest sessions, select up to 10 whose evaluator results show negative feedback or sentiment at or below 0.4. This surfaces sessions where users were unhappy.

Phase 3: Analyze and Triage

With all data in hand, perform these analyses:

  1. Trend detection. Scan the time series for:

    • Quality score drops >10% day-over-day
    • Volume spikes or drops >25%
    • Cost jumps >20%
    • Success rate dips below 70%
    • Sentiment drops below 0.5 (the neutral baseline)
    • Latency P90 increases >50%
  2. Agent comparison. From agent_stats, identify:

    • Which agents have the lowest quality scores
    • Which agents have the highest error rates
    • Which agents cost the most per session
    • Any agent with quality diverging from the fleet average
  3. Error triage. From error_categories, rank by frequency and identify:

    • New error categories (not present in prior periods)
    • Top 3 error categories by volume
    • Whether errors concentrate in specific agents
  4. Cost analysis. Flag:

    • Total cost trend (growing, stable, declining)
    • Agents with disproportionate cost relative to session volume
    • Any single-day cost spikes
  5. Cross-reference. Connect findings: Do failing sessions correlate with specific agents? Do sentiment drops align with error spikes? Do cost increases come from a specific agent or model?

Phase 4: Drill Into Top Issues (Budget: 2-4 calls)

For the 2-3 most significant findings, get supporting detail:

  1. For error spikes: Call Amplitude:get_amplitude_agent_analytics_info with view: "sessions" filtered to the relevant agent or error pattern and limit to 5 to get enrichment data including failure reasons and rubric scores.

  2. For quality regressions: Call Amplitude:get_amplitude_agent_analytics_info with view: "sessions" filtered to the affected agent, then select up to 5 sessions whose evaluator quality scores are at or below 0.4 to understand what's going wrong.

  3. For cost anomalies: Call Amplitude:get_amplitude_agent_analytics_info with view: "spans" and group by model to see cost breakdown by model, or filter to the expensive agent to see which tools/models drive cost.

Phase 5: Present the Health Report

Structure the output for quick scanning and action.

Required sections:

  1. Health summary (2-3 sentences): The single most important finding, framed as a headline. Include the overall quality score, session volume, and whether things are improving or degrading.

  2. Key metrics table:

| Metric | Current (7d) | Trend | Status |
|--------|-------------|-------|--------|
| Quality Score | [avg] | [↑/↓/→] | [Good/Warning/Critical] |
| Success Rate | [%] | [↑/↓/→] | ... |
| Sentiment | [avg] | [↑/↓/→] | ... |
| Total Sessions | [N] | [↑/↓/→] | ... |
| Total Cost | [$X.XX] | [↑/↓/→] | ... |
| P90 Latency | [Xs] | [↑/↓/→] | ... |
| Task Failure Rate | [%] | [↑/↓/→] | ... |
  1. Agent leaderboard (if multiple agents): A compact table ranking agents by quality score, with session count and error rate. Highlight the best and worst performers.

  2. Top issues (3-5 max): Each as a narrative paragraph:

    • [Issue headline] — What's happening, which agent(s), how many sessions affected, since when, and what to do. Include example session IDs for drill-down. Link to /investigate-ai-session for deeper analysis.
  3. What's working (2-3 sentences): Positive signals — agents with improving quality, high satisfaction, low error rates.

  4. Recommended actions (2-4 numbered items): Concrete, actionable. Start each with a verb. Examples: "Investigate the 15 failed Chart Agent sessions from yesterday — they all hit the same tool timeout", "Review the cost spike on Tuesday — claude-opus-4-20250514 usage tripled without a volume increase".

  5. Follow-on prompt: Ask what the user wants to dig into — e.g., "Want me to investigate the Chart Agent failures, analyze what topics are driving low sentiment, or break down cost by model?"

Status thresholds:

Metric Good Warning Critical
Quality Score >0.7 0.4-0.7 <0.4
Success Rate >80% 60-80% <60%
Sentiment >0.6 0.5-0.6 <0.5
Task Failure Rate <10% 10-25% >25%
P90 Latency <10s 10-30s >30s

Writing standards:

  • Lead with the insight, not the data point
  • Use approximate numbers ("~85%" not "84.7%")
  • Always state the time window
  • Every finding must have an action
  • Keep the full report under 600 words

Examples

Example 1: Routine Health Check

User says: "How are our AI agents doing?"

Actions:

  1. Get context and AI schema
  2. Query analytics overview + time series + recent failures + frustrated users (4 parallel calls)
  3. Identify the agent with the worst quality score and the top error category
  4. Drill into the worst agent's failed sessions for root cause
  5. Present the health report with agent leaderboard and top 3 issues

Example 2: Targeted Agent Check

User says: "How's the Chart Agent performing this week?"

Actions:

  1. Get context, then query analytics with agentNames: ["Chart Agent"]
  2. Query time series for that agent specifically
  3. Pull recent failures and low-quality sessions for that agent
  4. Present a focused report on that single agent's health

Example 3: Cost Investigation

User says: "Our AI costs seem high — what's going on?"

Actions:

  1. Get context, then use get_amplitude_agent_analytics_info with view: "sessions" and aggregate the returned cost data locally by agent and day
  2. Identify which agents and models drive the most cost
  3. Query spans grouped by model to see token usage patterns
  4. Pull the most expensive sessions for examples
  5. Present cost-focused report with per-agent and per-model breakdowns

Troubleshooting

No AI session data

The project may not have AI analytics instrumented. Report this clearly and suggest the user check their AI agent SDK integration.

Very few sessions

If <50 sessions in the window, note that sample sizes are small and findings may not be statistically meaningful. Extend the time window if possible.

All metrics look healthy

Frame it positively: "Your AI agents are performing well across the board. Here's the summary and a few minor things to watch." Still surface the lowest-performing areas even if they're above threshold.

原文・著作権は Anthropic および各プラグイン作者に帰属します。日本語訳は Claude API による自動翻訳です。