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 エージェント
レイテンシ
プロセス 生成 → 出力 計画 → 複数ソースの検索 → 反復 → 出力
出力 会話形式のテキストとコード インライン チャートと画像を含む、詳細な引用付きレポート
最適な用途 チャットボット、情報抽出、要約 市場分析、詳細な調査、競合状況の把握

主な機能

Deep Research には次の機能があります。

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

Deep Research の利用方法

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

始める前に

  1. アカウントにログインします。 Google Cloud を初めて使用する場合は、 アカウントを作成して、実際のシナリオで Google プロダクトのパフォーマンスを評価してください。 Google Cloud新規のお客様には、ワークロードの実行、テスト、デプロイができる無料クレジット $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 Agent Platform API.

    Roles required to enable APIs

    To enable APIs, you need the Service Usage Admin IAM role (roles/serviceusage.serviceUsageAdmin), which contains the serviceusage.services.enable permission. 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 Agent Platform API.

    Roles required to enable APIs

    To enable APIs, you need the Service Usage Admin IAM role (roles/serviceusage.serviceUsageAdmin), which contains the serviceusage.services.enable permission. 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 タスクを開始する

リサーチ タスクには反復的な検索と読み取りが含まれ、完了までに数分かかることがあります。Gemini Deep Research エージェントは非同期で実行する必要があります。

バックグラウンド実行モードとストリーミング モードを使用する必要があります。これを行うには、エージェントの実行時にレスポンス構成の background フィールドと stream フィールドを True に設定します。API は部分的な Interaction オブジェクトをすぐに返します。id プロパティを使用して、ポーリング用のインタラクションを取得できます。インタラクションの状態は、in_progress から completed または failed に遷移します。

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=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)
      

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": true
    }'

API は interaction_id をすぐに返します。この ID は、ストリームに再接続するために必要です。

ストリーミング

Deep Research は、思考の要約、テキスト出力、生成された画像など、リサーチの進捗状況に関するリアルタイムの更新情報を受信するためのストリーミングをサポートしています。background=Truestream=True を設定する必要があります。

次の例では、リサーチ タスクを開始し、自動再接続でストリームを処理します。interaction_idlast_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 は、複数の組み込みツールと外部ツールをサポートしています。 デフォルトでは(ツール パラメータが指定されていない場合)、エージェントは Google 検索と URL コンテキストにアクセスできます。ツールを明示的に指定して、エージェントの機能を制限または拡張できます。サポートされているツールは次のとおりです。

ツール キー 注釈
Google 検索 google_search 公開ウェブを検索します。 デフォルトで有効になっています。
MCP サーバー mcp_server 外部ツールにアクセスするために、リモート MCP サーバーに接続します。
エンタープライズ ウェブ検索 enterprise_web_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 配列 いいえ エージェントが呼び出すことができるサーバーのツールを制限します。

次の例をご覧ください。


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 必須。ストリーミングを有効にします。true に設定する必要があります。
input array または string 必須。ユーザー入力を含むリスト。単一のオブジェクトのみがサポートされています。
tools array デフォルトのツールをオーバーライドします。google_searchexternal_data_mcpvertex_search などをサポートしています。

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

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

ソフト タイムアウト

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

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

ハード障害

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

この障害を解決するには、現在のセッションを停止し、新しいセッションを開始する前にクエリを絞り込みます。

ベスト プラクティス

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

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

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

  • データの引き出しを回避する: エージェントに 機密性の高い内部データを要約するように依頼する際に、公開ウェブの閲覧権限を同時に付与する場合は、 十分注意してください。

  • 引用を確認する: エンタープライズ グレードのフィルタリングが適用されますが、レスポンスで提供される引用を常に 確認して、ウェブソースが 信頼できることを確認してください。

制限事項

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

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

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

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

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

料金

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

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

費用の追跡

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

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

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

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

Google Cloud

Quota

トラフィックの増加、同時実行のバックグラウンド タスク、リサーチ負荷の増加に対応するため、Agent Platform API の割り当ての増加を プロジェクト内で Google Cloud リクエストできます。

割り当てを増やす手順は次のとおりです。

  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 ノートブックを使ってみましょう。