Getting Started with Gemini Deep Research API
This guide demonstrates how to use the new Gemini Deep Research agent via the Interactions API to perform complex research tasks, generate images based on the findings, and translate the results.
Preview: The Gemini Deep Research Agent is currently in preview. The Deep Research agent is exclusively available using the Interactions API. You cannot access it through generate_content.
Python
! - --
Python
=
1. Basic Research Task (Polling)#
The following example shows how to start a research task in the background and poll for results. This is the standard way to interact with the Deep Research agent.
Python
=
=
# Poll for results
=
break
== :
break
# The Evolution of Google Tensor Processing Units: A Historical and Architectural Analysis
### Key Points
* **Origins in Necessity:** The Tensor Processing Unit (TPU) project was initiated in 2013 when Google engineers realized that existing CPU and GPU infrastructure could not sustain the computational demands of ubiquitous voice search and deep learning applications without doubling datacenter footprints.
* **Architectural Paradigm Shift:** Unlike the Von Neumann architecture of CPUs, TPUs utilize a **systolic array** architecture. This design mimics the flow of blood through the heart, allowing data to flow through thousands of arithmetic logic units (ALUs) without accessing memory for intermediate results, drastically increasing efficiency for matrix multiplications.
...
Deep Research supports streaming to receive real-time updates on the research progress (thinking_summaries). You can steer the agent's output by providing specific promting instructions.
Python
# Define a complex prompt with formatting instructions
=
=
= None
= None
=
=
=
+=
== :
== :
=
Full Report: https://gist.github.com/philschmid/68c5afacfd3a3555ca834ba27415ba88
3. Combine Deep Research Interaciton with Model Interactions#
The Interactions API supports stateful interactions, which allows you to continue the conversation after the agent returns the final report by using the previous_interaction_id.
You can continue the conversation after the agent returns the final report using a model to visualize the results using Nano Banana Pro or translate the results using Gemini Flash.
Python
=
=
=

Python
=
# Strategischer Bericht: Die Google TPU-Landschaft
## Zusammenfassung
Google beschleunigt die Entwicklung eigener KI-Chips (TPUs), um NVIDIA herauszufordern. Die letzten 12 Monate brachten mit **Trillium (v6)** und **Ironwood (v7)** große Fortschritte. Für Entwickler wird es einfacher: Dank neuer Software-Tools laufen PyTorch-Modelle jetzt fast ohne Änderungen auf TPUs. Bis 2027 will Google über 5 Millionen TPUs im Einsatz haben.
...
This API is in Beta, and we want your feedback! We're actively listening to developers to shape the future of this API. What features would help your agent workflows? What pain points are you experiencing? Please let me know on Twitter or LinkedIn.