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 only the new user message is sent on the wire. The server already has the prior research and its citations. Persisting the interaction ID requires a database. The assistant message stores it under provider_data, and the next turn reads it back.

Code

cookbook/90_models/google/gemini_interactions/deep_research_multi_turn.py

Usage

1

Set up your virtual environment

2

Set your API key

3

Install dependencies

4

Run Agent