Prerequisites
You need to install thegoogle-genai, Pillow, and openai libraries.
GOOGLE_API_KEY environment variable. You can obtain an API key from Google AI Studio.
Example
The following agent will use Nano Banana to generate an image based on a text prompt.cookbook/91_tools/nano_banana_tools.py