Skip to main content
Continue a Deep Research interaction across turns. Each response carries an interaction_id; the next turn references it via previous_interaction_id so the API only receives the new user message (the server already has the prior research and its citations).
deep_research_multi_turn.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_multi_turn.py, then run:
Full source: cookbook/90_models/google/gemini_interactions/deep_research_multi_turn.py