Deep Research Visualization (Interactions)
With visualization="auto" the agent can generate charts and graphs to support its findings. The capability is enabled by the config, but the agent only produces visuals when the prompt explicitly asks for them.
Generated images come back in the response steps (and as image deltas when streaming). Kern parses them into the response's images.
Code
1from kern.agent import Agent2from kern.models.google import GeminiInteractions34agent = Agent(5 model=GeminiInteractions(6 agent="deep-research-preview-04-2026",7 thinking_summaries="auto",8 visualization="auto",9 ),10 markdown=True,11)1213if __name__ == "__main__":14 agent.print_response(15 "Analyze global semiconductor market trends. Include graphics showing "16 "market share changes over time."17 )Usage
Set up your virtual environment
1uv venv --python 3.122source .venv/bin/activate1uv venv --python 3.122.venv\Scripts\activateSet your API key
1export GOOGLE_API_KEY=xxxInstall dependencies
1uv pip install -U "google-genai>=2.0" kern-aiRun Agent
1python cookbook/90_models/google/gemini_interactions/deep_research_visualization.py