Skip to main content
Setting agent to a deep-research agent id switches GeminiInteractions to the agent path (agent + agent_config) instead of the model path. The agent plans, searches the web, and returns a researched report with citations.
deep_research.py

Run the Example

1

Set up your virtual environment

2

Install dependencies

3

Export your Google API key

4

Run the example

Save the code above as deep_research.py, then run:
Full source: cookbook/90_models/google/gemini_interactions/deep_research.py