Gemini Deep Research エージェントを使用する

Gemini Deep Research エージェントは、複雑なマルチステップのリサーチ ワークフローを計画、実行、統合するように設計されたマネージド AI エージェントです。Gemini を活用したこのエージェントは、一般公開ウェブや限定公開の企業データなど、さまざまな情報環境をナビゲートして、情報に基づいた意思決定を加速する、引用付きの包括的なレポートを生成します。

このページでは、Gemini Deep Research エージェントの使用方法について説明します。これには、主な機能と制限事項、リサーチタスクの開始方法、タイムアウトとエラー処理の処理方法が含まれます。

Deep Research を使用するケース

Deep Research は単なるモデルではなく、エージェントです。低レイテンシのチャットではなく、非同期分析アプローチを可能にするワークロードに最適です。

プロジェクトを計画する際は、Deep Research の次の強みを考慮してください。

  • 反復プロセス: 標準チャットモデルのように即座に回答を生成するのではなく、Deep Research は、計画 > 複数ソースの検索 > 反復 > 出力という、体系的なマルチステップ ワークフローに従います。

  • 高度なワークロード: Deep Research は、デュー デリジェンス、市場分析、競合分析などの複雑なタスクを処理するように特別に設計されています。

  • 広範なデータ グラウンディング: Gemini Deep Research エージェントは、さまざまなデータソースを同時に推論できます。これには、リモート MCP サーバー、内部の組織知識、アップロードされたファイルやフォルダからの直接的なコンテキストが含まれます。

  • 洗練されたレポート: 引用を含む包括的なレポートを作成し、プレゼンテーションにすぐに使用できるビジュアルを生成できます。これには、HTML と画像モデルを使用して生成された財務グラフ、インライン インフォグラフィック、市場ポジショニング マトリックスが含まれます。

  • 高い制御性: プロンプトで最終的な出力を直接カスタマイズできます。これには、特定のトーン(技術的なトーンやエグゼクティブ向けのトーンなど)の設定、厳密な形式の定義、構造化データテーブルのリクエストなどが含まれます。

次の表は、Gemini Deep Research エージェントと標準の Gemini モデルを、レイテンシ、出力、各モデルの最適な用途など、いくつかの指標で比較したものです。

機能 標準の Gemini モデル Gemini Deep Research エージェント
レイテンシ 秒 分
プロセス 生成 → 出力 計画 → 複数ソースの検索 → 反復 → 出力
出力 会話形式のテキストとコード インラインのグラフや画像を含む、引用付きの詳細なレポート
最適な用途 chatbot、情報抽出、要約 マーケット分析、詳細な調査、競合状況の把握

主な機能

Deep Research には、次の機能が用意されています。

  • 複数のソースでのグラウンディング。以下が含まれます。
  • 画像とグラフの出力: インライン インフォグラフィック、市場ポジショニング マトリックス チャート、財務パフォーマンス グラフなど、プレゼンテーションにすぐに使用できるアセットを含む詳細なレポートを生成します。
  • 文中の引用

Deep Research の利用方法

Gemini Deep Research エージェントにアクセスするには、Google Gen AI SDK または直接 REST API リクエストを使用して、グローバル エンドポイント(v1beta1)を使用します。使用例については、GitHub の Gemini Deep Research エージェント ノートブックの概要をご覧ください。

始める前に

  1. Google Cloud アカウントにログインします。 Google Cloudを初めて使用する場合は、 アカウントを作成して、実際のシナリオで Google プロダクトのパフォーマンスを評価してください。新規のお客様には、ワークロードの実行、テスト、デプロイができる無料クレジット $300 分を差し上げます。
  2. In the Google Cloud console, on the project selector page, select or create a Google Cloud project.

    Roles required to select or create a project

    • Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
    • Create a project: To create a project, you need the Project Creator role (roles/resourcemanager.projectCreator), which contains the resourcemanager.projects.create permission. Learn how to grant roles.

    Go to project selector

  3. Verify that billing is enabled for your Google Cloud project.

  4. Enable the Gemini Enterprise Agent Platform API, if it is not already enabled.

    Roles required to enable APIs

    To enable APIs, you need the serviceusage.services.enable permission. If you created the project, then you likely already have this permission through the Owner role (roles/owner). Otherwise, you can get this permission through the Service Usage Admin role (roles/serviceusage.serviceUsageAdmin). Learn how to grant roles.

    Enable the API

  5. Make sure that you have the following role or roles on the project: roles/aiplatform.user, roles/serviceusage.serviceUsageConsumer

    Check for the roles

    1. In the Google Cloud console, go to the IAM page.

      Go to IAM
    2. Select the project.
    3. In the Principal column, find all rows that identify you or a group that you're included in. To learn which groups you're included in, contact your administrator.

    4. For all rows that specify or include you, check the Role column to see whether the list of roles includes the required roles.

    Grant the roles

    1. In the Google Cloud console, go to the IAM page.

      Go to IAM
    2. Select the project.
    3. Click Grant access.
    4. In the New principals field, enter your user identifier. This is typically the email address for a Google Account.

    5. Click Select a role, then search for the role.
    6. To grant additional roles, click Add another role and add each additional role.
    7. Click Save.
  6. In the Google Cloud console, on the project selector page, select or create a Google Cloud project.

    Roles required to select or create a project

    • Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
    • Create a project: To create a project, you need the Project Creator role (roles/resourcemanager.projectCreator), which contains the resourcemanager.projects.create permission. Learn how to grant roles.

    Go to project selector

  7. Verify that billing is enabled for your Google Cloud project.

  8. Enable the Gemini Enterprise Agent Platform API, if it is not already enabled.

    Roles required to enable APIs

    To enable APIs, you need the serviceusage.services.enable permission. If you created the project, then you likely already have this permission through the Owner role (roles/owner). Otherwise, you can get this permission through the Service Usage Admin role (roles/serviceusage.serviceUsageAdmin). Learn how to grant roles.

    Enable the API

  9. Make sure that you have the following role or roles on the project: roles/aiplatform.user, roles/serviceusage.serviceUsageConsumer

    Check for the roles

    1. In the Google Cloud console, go to the IAM page.

      Go to IAM
    2. Select the project.
    3. In the Principal column, find all rows that identify you or a group that you're included in. To learn which groups you're included in, contact your administrator.

    4. For all rows that specify or include you, check the Role column to see whether the list of roles includes the required roles.

    Grant the roles

    1. In the Google Cloud console, go to the IAM page.

      Go to IAM
    2. Select the project.
    3. Click Grant access.
    4. In the New principals field, enter your user identifier. This is typically the email address for a Google Account.

    5. Click Select a role, then search for the role.
    6. To grant additional roles, click Add another role and add each additional role.
    7. Click Save.

Deep Research タスクを開始する

リサーチタスクには、検索と読み取りの繰り返しが含まれ、完了までに数分かかることがあります。background を True に設定して、Gemini Deep Research エージェントを非同期で実行する必要があります。

Gemini Deep Research エージェントは、ストリーミングの有無にかかわらず使用できます。

  • ポーリング(非ストリーミング): background=True(および必要に応じて stream=False)を設定します。API は Interaction オブジェクトをすぐに返します。id プロパティを使用して、状態が in_progress から completed または failed に移行するまで、インタラクションをポーリングできます。
  • ストリーミング: background=True と stream=True を設定して、調査の進行状況に応じてリアルタイムの更新を受け取ります。詳細については、ストリーミングをご覧ください。

また、遅延ティアを使用するようにエージェントを構成することもできます。これにより、オフピーク時間のバックグラウンド ジョブが 50% の割引率で自動的にスケジュールされます。遅延ティアを使用するには、タスクの作成時に stream を False に設定する必要があります。

Python


import time
from google import genai

client = genai.Client(enterprise=True, project="PROJECT_ID", location="global")

interaction = client.interactions.create(
  input="Analyze competitive positioning for solar energy providers.",
  agent="deep-research-preview-04-2026",
  background=True,
  stream=False,
  service_tier="deferred"
)

print(f"Research started: {interaction.id}")

while True:
  interaction = client.interactions.get(interaction.id)
  if interaction.status == "completed":
    print(interaction.steps[-1].content[0].text)
    break
  elif interaction.status == "failed":
    print(f"Research failed: {interaction.error}")
    break
  time.sleep(10)
      

REST

PROJECT_ID=PROJECT_ID;
curl --max-time 3600 --keepalive-time 10 -X POST \
    -H "Authorization: Bearer $(gcloud auth print-access-token)" \
    -H "Content-Type: application/json" \
    "https://aiplatform.googleapis.com/v1beta1/projects/${PROJECT_ID}/locations/global/interactions" \
    -d '{
      "input": "Research the history of Google TPUs.",
      "agent": "deep-research-preview-04-2026",
      "background": true,
      "stream": false,
      "service_tier": "deferred"
    }'

API はすぐに interaction_id を返します。この ID を使用して、ステータスをポーリングしたり、ストリームに再接続したりできます。

ストリーミング

Deep Research は、思考の要約、テキスト出力、生成画像など、リサーチの進捗状況に関するリアルタイムの更新を受け取るストリーミングをサポートしています。ストリーミングを使用する場合は、background=True と stream=True を設定します。

次の例では、リサーチタスクを開始し、自動再接続でストリームを処理します。interaction_id と last_event_id を追跡するため、接続が切断された場合でも、中断したところから再開できます。


from google import genai

client = genai.Client(enterprise=True, project="PROJECT_ID", location="global")

interaction_id = None
last_event_id = None
is_complete = False

def process_stream(stream):
  global interaction_id, last_event_id, is_complete
  for event in stream:
    if event.event_type == "interaction.created":
      interaction_id = event.interaction.id
    if event.event_id:
      last_event_id = event.event_id
    if event.event_type == "step.delta":
      if event.delta.type == "text":
        print(event.delta.text, end="", flush=True)
      elif event.delta.type == "thought":
        print(f"Thought: {event.delta.text}", flush=True)
    elif event.event_type in ("interaction.completed", "error"):
      is_complete = True

stream = client.interactions.create(
  input="Research the history of Google TPUs.",
  agent="deep-research-preview-04-2026",
  background=True,
  stream=True,
  agent_config={"type": "deep-research", "thinking_summaries": "auto"},
)

process_stream(stream)

while not is_complete and interaction_id:
  status = client.interactions.get(interaction_id)
  if status.status != "in_progress":
    break
  stream = client.interactions.get(
    id=interaction_id, stream=True, last_event_id=last_event_id,
  )
  process_stream(stream)

インタラクション ストリームに再接続する

ドロップされたストリームを復元するには、元の interaction_id を使用して GET リクエストを送信します。API は、セッションの開始以降のすべての過去のイベントを再生してから、リアルタイムの更新を続行します。

Python


response = client.interactions.get(
  id = 'INTERACTION_ID',
  stream=True
)
for chunk in response:
  print(chunk)
      

REST

PROJECT_ID=PROJECT_ID;
INTERACTION_ID=INTERACTION_ID

curl -X GET \
    -H "Authorization: Bearer $(gcloud auth print-access-token)" \
    -H "Content-Type: application/json" \
    "https://aiplatform.googleapis.com/v1beta1/projects/${PROJECT_ID}/locations/global/interactions/${INTERACTION_ID}"

ツール

Deep Research は、複数の組み込みツールと外部ツールをサポートしています。デフォルトでは(tools パラメータが指定されていない場合)、エージェントは Google 検索と URL コンテキストにアクセスできます。ツールを明示的に指定して、エージェントの機能を制限または拡張できます。サポートされているツールは次のとおりです。

ツール キー 注
Google 検索 google_search 公開ウェブを検索する。デフォルトで有効になっています。
MCP サーバー mcp_server 外部ツールにアクセスするために、リモート MCP サーバーに接続する。
エンタープライズ向けウェブ グラウンディング enterprise_web_search 追加のコンプライアンス管理機能を備えたウェブ検索。
Gemini Enterprise Agent Platform での Agent Search vertex_ai_search ウェブサイトのデータや ドキュメント セットを検索します

次の例では、Google 検索を唯一のツールとして有効にしています。


interaction = client.interactions.create(
  agent="deep-research-preview-04-2026",
  input="What are the latest developments in quantum computing?",
  tools=[{"type": "google_search"}],
  background=True,
  stream=True
)

MCP サーバー

ツールの構成でサーバー名と URL を指定します。認証情報を渡して、エージェントが呼び出せるツールを制限することもできます。

次のリファレンスをご覧ください。

フィールド 種類 必須 説明
type 文字列 はい "mcp_server" を指定します。
name 文字列 × MCP サーバーの表示名。
url 文字列 × MCP サーバー エンドポイントの完全な URL。
headers オブジェクト いいえ サーバーへのすべてのリクエストで HTTP ヘッダーとして送信される Key-Value ペア(認証トークンなど)。
allowed_tools array × エージェントが呼び出すことができるサーバーのツールを制限します。

次の例をご覧ください。


interaction = client.interactions.create(
  agent="deep-research-preview-04-2026",
  input="How to deploy an app to Cloud Run on Google Cloud?",
  tools=[
    {
      "type": "mcp_server",
      "name": "Google Cloud Developer Knowledge",
      "url": "https://developerknowledge.googleapis.com/mcp",
      "headers": {"Authorization": "Bearer token"},
    }
  ],
  background=True,
  stream=True
)

エンタープライズ向けウェブ グラウンディングを使用すると、組織は生成 AI の回答を、安全でコンプライアンスに準拠した最新のウェブデータにグラウンディングできます。これにより、デベロッパーや企業は、データのプライバシーや規制遵守を損なうことなく、AI モデルをインターネットに接続できます。

次の例をご覧ください。


interaction = client.interactions.create(
  agent="deep-research-preview-04-2026",
  input="Research on the latest trend on AI",
  tools=[
    {
      "type": "google_search",
      "search_type": ["enterprise_web_search"],
    }
  ],
  background=True,
  stream=True
)

マルチモーダル入力

Deep Research は、画像やドキュメント(PDF)などのマルチモーダル入力をサポートしています。これにより、エージェントは視覚的なコンテンツを分析し、提供された入力に基づいてコンテキスト化されたウェブベースの調査を行うことができます。

次の例をご覧ください。


prompt = """
Analyze the interspecies dynamics and behavioral risks present
in the provided image of the African watering hole. Specifically, investigate
the symbiotic relationship between the avian species and the pachyderms
shown, and conduct a risk assessment for the reticulated giraffes based on
their drinking posture relative to the specific predator visible in the
foreground.
"""

interaction = client.interactions.create(
  input=[
    {"type": "text", "text": prompt},
    {
      "type": "image",
      "uri": "https://storage.googleapis.com/generativeai-downloads/images/generated_elephants_giraffes_zebras_sunset.jpg"
    }
  ],
  agent="deep-research-preview-04-2026",
  background=True,
  stream=True
)

print(f"Research started: {interaction.id}")

while True:
  interaction = client.interactions.get(interaction.id)
  if interaction.status == "completed":
    print(interaction.steps[-1].content[0].text)
    break
  elif interaction.status == "failed":
    print(f"Research failed: {interaction.error}")
    break
  time.sleep(10)

ドキュメントの理解

ドキュメントをマルチモーダル入力として直接渡すことができます。エージェントは、提供されたドキュメントを分析し、その内容に基づいて調査を行います。

次の例をご覧ください。


interaction = client.interactions.create(
  agent="deep-research-preview-04-2026",
  input=[
    {"type": "text", "text": "What is this document about?"},
    {
      "type": "document",
      "uri": "https://arxiv.org/pdf/1706.03762",
      "mime_type": "application/pdf",
    },
  ],
  background=True,
  stream=True
)

制御性とフォーマット

プロンプトで特定の形式の指示を指定することで、エージェントの出力を制御できます。これにより、レポートを特定のセクションとサブセクションに構造化したり、データテーブルを含めたり、対象読者(「技術者」、「経営幹部」、「一般」など)に合わせてトーンを調整したりできます。

入力テキストで出力を明示的に定義します。次の例をご覧ください。


prompt = """
Research the competitive landscape of EV batteries.

Format the output as a technical report with the following structure:
1. Executive Summary
2. Key Players (Must include a data table comparing capacity and chemistry)
3. Supply Chain Risks
"""

interaction = client.interactions.create(
    input=prompt,
    agent="deep-research-preview-04-2026",
    background=True,
    stream=True
)

API リファレンス

このセクションでは、Gemini Deep Research エージェントを使用するための API リファレンス情報について説明します。

詳細については、Interactions API をご覧ください。

メソッド: interactions.create

氏名: projects.locations.interactions.create

新しい Deep Research セッションを開始します。

エンドポイント

post https://aiplatform.googleapis.com/v1beta1/{parent}/interactions

リクエスト本文のパラメータ

リクエスト本文のパラメータには、次のものを含めることができます。

パラメータ 型 説明
agent string 必須。エージェント ID コード(deep-research-preview-04-2026 など)を指定します。
background boolean 必須。インタラクションを非同期で実行します。true に設定する必要があります。
stream boolean 省略可。ストリーミングを有効にします。デフォルトは false です。
input array または string 必須。ユーザー入力を含むリスト。サポートされるオブジェクトは 1 つのみです。
tools array デフォルトのツールをオーバーライドします。google_search、external_data_mcp、vertex_search などをサポートします。
service_tier string deferred に設定すると、遅延階層が使用されます。これにより、オフピーク時間帯にバックグラウンド ジョブが自動的にスケジュールされます。

タイムアウトとエラー処理

エージェントとやり取りする際に、接続タイムアウトやシステムエラーが発生することがあります。このセクションでは、ソフト タイムアウトとハード障害を特定して解決する方法について説明します。

ソフト タイムアウト

ソフト タイムアウトは、エージェントがリクエストを処理している間に Interactions API 接続が切断された場合に発生します。エージェントはバックグラウンドでリクエストの実行を続けます。

セッションを再開してリプレイされたイベントを表示するには、interaction_id を使用してストリームに再接続します。インタラクション ストリームに再接続するをご覧ください。

致命的なエラー

ハード障害は、エージェントまたは内部システムエラーによってエージェント コンテキストが完全に終了した場合に発生します。通常、これらのエラーは HTTP 500 ステータス コードを返します。一般的な原因としては、120 分の実行上限を超えた場合や、システム障害が発生した場合などがあります。

このエラーを解決するには、現在のセッションを停止し、クエリを絞り込んでから新しいセッションを開始します。

ベスト プラクティス

自律型エージェントにウェブとファイルへのアクセス権を付与すると、独自のダイナミクスが導入されます。プロジェクトを実装する際は、次のベスト プラクティスを考慮してください。

  • 不明な点についてプロンプトを表示する: 欠落しているデータの処理方法をエージェントに明示的に指示します。たとえば、数値を推定するのではなく、数値が利用できない場合はその旨を述べるように指示します。

  • プロンプト インジェクションのリスクを回避する: 悪意のあるファイルには、エージェントの出力を操作するように設計された隠しテキストが含まれている可能性があるため、アップロードされたファイルが信頼できるソースから取得されていることを確認します。

  • データの引き出しを回避する: 機密性の高い内部データの要約をエージェントに依頼すると同時に、公開ウェブの閲覧アクセス権を付与する場合は、細心の注意を払ってください。

  • 引用を確認する: エンタープライズ グレードのフィルタリングが適用されている場合でも、回答に記載されている引用を必ず確認して、ウェブソースが信頼できるものであることを確認してください。

制限事項

プロジェクトを計画する際は、次の制限事項を考慮してください。

  • シングルターンのみ: シングルターンのクエリのみがサポートされています。API の previous_interaction_id フィールドの使用はサポートされていません。

  • エンタープライズ セキュリティ: プレビュー期間中は、顧客管理の暗号鍵(CMEK)と VPC Service Controls はサポートされません。マルチリージョンのデータ所在地の制約は評価中です。

  • キャッシュ保存: このサービスでは、暗黙的なキャッシュ保存がデフォルトで有効になっています。オフにすることはできません。

  • データの保持: プロンプトと生成された出力は、標準処理のために 7 日間保存されます。Google 検索によるグラウンディングを使用する場合、Google はデバッグとテストのために、プロンプト、コンテキスト情報、生成された出力を 3 日間保存します。Google 検索によるグラウンディングを使用する場合、この情報の保存を無効にすることはできません。データの保持をゼロにする必要がある場合は、Web Grounding for Enterprise を使用することをおすすめします。

料金

Deep Research は、Gemini の高度な推論機能を使用して、マルチステップのエージェント リサーチ タスクを実行します。課金は、モデルの使用量(トークン)とツールの実行(検索とグラウンディング)で構成されます。

バックグラウンド ジョブでは、遅延ティアを使用して割引を受けることができます。

詳細は、料金をご覧ください。

費用の追跡

デフォルトでは、Gemini Deep Research エージェントはオペレーションに is_deep_research ユーザーラベルを自動的に適用します。 Google Cloudでは、ラベルは、リソースの整理とインフラストラクチャ全体の費用の追跡に使用される軽量の Key-Value ペアです。

  • 自動ラベル付け: API リクエストでこのラベルを手動で構成する必要はありません。エージェントは、実行されたすべてのタスクにデフォルトで is_deep_research ラベルを付けます。

  • 請求のフィルタリング: Deep Research の請求レポートは、is_deep_research 請求ラベルを使用してフィルタリングできます。

  • 包括的なトラッキング: is_deep_research 課金ラベルは、モデルの使用量(入力トークンと出力トークン)とツールの実行(検索とグラウンディングの使用量)の両方に適用されます。これにより、非同期調査ワークフローの合計費用を集計して計算できます。

割り当て

トラフィックの増加、同時バックグラウンド タスク、より重い調査負荷に対応するには、 Google Cloud プロジェクト内で直接 Agent Platform API の割り当ての増加をリクエストできます。

割り当てを増やすには、次の操作を行います。

  1. Google Cloud コンソールで、[割り当てとシステム上限] ページに移動します。

    [割り当てとシステム上限] に移動

  2. Deep Research ワークロードを実行している正しいプロジェクトが選択されていることを確認します。

  3. フィルタ検索ボックスで Agent Platform API(aiplatform.googleapis.com)を検索して、関連するエージェントとインタラクションの割り当てを見つけます。

  4. 調整が必要な特定の割り当て上限を選択します。

  5. [割り当てを編集] をクリックします。

  6. [割り当ての変更] ダイアログの [新しい値] フィールドに、リクエストする上限を入力します。リクエストの説明に明確な理由を記載します。具体的な Deep Research のユースケース、バックグラウンド実行の必要性、想定されるトラフィック パターンを記載すると、承認プロセスを迅速化できます。

  7. [リクエストを送信] をクリックします。

コンプライアンスとセキュリティ

このセクションでは、データの保持とキャッシュの方法について説明します。また、プレビュー中にサポートされていないセキュリティ管理についても説明します。

データの保持

プロンプトと生成された出力は、標準処理のために 7 日間保存されます。

サービス固有の規約のセクション 19「生成 AI サービス: Google 検索によるグラウンディング」に記載されているように、Google は、グラウンディングされた結果と検索候補を作成する目的で、お客様が提供するプロンプトとコンテキスト情報、生成された出力を 3 日間保存します。この保存された情報は、Google 検索によるグラウンディングをサポートするシステムのデバッグとテストに使用されることがあります。Google 検索によるグラウンディングを使用する場合、この情報の保存を無効にすることはできません。データの保持をゼロにする必要がある場合は、Web Grounding for Enterprise を使用することをおすすめします。

キャッシュ

暗黙的キャッシュ保存は、Deep Research でデフォルトで有効になっており、オフにすることはできません。

セキュリティ管理

プレビュー中は、次のセキュリティ管理はサポートされていません。

  • 顧客管理の暗号鍵(CMEK)
  • VPC Service Controls(VPC-SC)
  • アクセスの透明性(AXT)
  • データ所在地
  • マルチリージョンのデータ所在地

次のステップ

リファレンス

エージェントとやり取りできる Interactions API について説明します。

チュートリアル

GitHub でこの Deep Research Python ノートブックを使ってみる。