> ## Documentation Index
> Fetch the complete documentation index at: https://agno-v2-docs-scavio-google-v2.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Gemini

> Gemini examples for multimodal input, file search, grounding, knowledge, thinking, structured output, tools, and Vertex AI.

| Example                                                                                              | Description                                                                                                                              |
| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
| [Agent with Thinking Budget](/examples/models/google/gemini/agent-with-thinking-budget)              | Cap Gemini 2.5 Pro's reasoning with thinking\_budget and surface thought summaries with include\_thoughts.                               |
| [Google Audio Input Bytes Content](/examples/models/google/gemini/audio-input-bytes-content)         | Pass a downloaded WAV file to Gemini as raw audio bytes for analysis.                                                                    |
| [Google Audio Input File Upload](/examples/models/google/gemini/audio-input-file-upload)             | Upload an MP3 through the Gemini Files API and reuse the remote file across runs.                                                        |
| [Google Audio Input Local File Upload](/examples/models/google/gemini/audio-input-local-file-upload) | Send a local MP3 to Gemini with Audio(filepath) and stream the analysis.                                                                 |
| [Google Basic](/examples/models/google/gemini/basic)                                                 | Run a Gemini 3.5 Flash agent with sync, async, and streaming responses.                                                                  |
| [DB](/examples/models/google/gemini/db)                                                              | Persist Gemini agent sessions in Postgres and carry history across turns.                                                                |
| [External URL Input](/examples/models/google/gemini/external-url-input)                              | Pass a public HTTPS PDF URL straight to Gemini 3.5 Flash with File(url=...), no download step.                                           |
| [Google File Search Advanced](/examples/models/google/gemini/file-search-advanced)                   | Manage multiple Gemini File Search stores with custom chunking and metadata filters.                                                     |
| [Google File Search Basic](/examples/models/google/gemini/file-search-basic)                         | Create a Gemini File Search store, upload a document, and query it with citations.                                                       |
| [Google File Search RAG Pipeline](/examples/models/google/gemini/file-search-rag-pipeline)           | Build an async RAG pipeline over a directory of files with Gemini File Search.                                                           |
| [File Upload with Cache](/examples/models/google/gemini/file-upload-with-cache)                      | Upload a transcript with the Gemini Files API, cache it with a 5-minute TTL, and query the cached content to cut prompt tokens.          |
| [GCS File Input](/examples/models/google/gemini/gcs-file-input)                                      | Summarize a PDF straight from a Google Cloud Storage gs\:// URI using Gemini on Vertex AI, with no download or re-upload.                |
| [Gemini 2 to 3](/examples/models/google/gemini/gemini-2-to-3)                                        | Migrate a Gemini 2.5 session to Gemini 3.1 Pro Preview by sharing history through SqliteDb.                                              |
| [Gemini 3 Pro](/examples/models/google/gemini/gemini-3-pro)                                          | Migrate the pinned Gemini 3 Pro example to Gemini 3.1 Pro Preview before using web search and SQLite chat history.                       |
| [Gemini 3 Pro Thinking Level](/examples/models/google/gemini/gemini-3-pro-thinking-level)            | Migrate the pinned thinking-level example to Gemini 3.1 Pro Preview and stream the async response.                                       |
| [Grounding with Gemini](/examples/models/google/gemini/grounding)                                    | Grounding enables Gemini to search the web and provide responses backed by real-time information with citations.                         |
| [Google Image Editing](/examples/models/google/gemini/image-editing)                                 | Send an image to Gemini and get back an edited version using image response modalities.                                                  |
| [Google Image Generation](/examples/models/google/gemini/image-generation)                           | Generate an image with Gemini response modalities and open it with PIL.                                                                  |
| [Google Image Input](/examples/models/google/gemini/image-input)                                     | Pass an image URL to a Gemini agent and fetch related news with web search.                                                              |
| [Google Image Input File Upload](/examples/models/google/gemini/image-input-file-upload)             | Upload an image through the Gemini Files API and combine it with web search.                                                             |
| [Imagen Tool](/examples/models/google/gemini/imagen-tool)                                            | Generate an image with the GeminiTools Imagen toolkit driven by a GPT-4o agent and save the result as a PNG.                             |
| [Imagen Tool Advanced](/examples/models/google/gemini/imagen-tool-advanced)                          | Generate an image with the Imagen 4 model through GeminiTools on Vertex AI and save the result as a PNG.                                 |
| [Knowledge](/examples/models/google/gemini/knowledge)                                                | Query a PDF knowledge base stored in PgVector with Gemini embeddings.                                                                    |
| [PDF Input File Upload](/examples/models/google/gemini/pdf-input-file-upload)                        | Upload a PDF to the Gemini Files API, then ask an agent to summarize it and suggest a recipe from it.                                    |
| [Google PDF Input Local](/examples/models/google/gemini/pdf-input-local)                             | Attach a local PDF to a Gemini agent and ask follow-up questions with history.                                                           |
| [Google PDF Input URL](/examples/models/google/gemini/pdf-input-url)                                 | Summarize a PDF from a URL and ask follow-ups using InMemoryDb chat history.                                                             |
| [Retry](/examples/models/google/gemini/retry)                                                        | Review retry settings and why invalid model IDs cannot reliably exercise the retry path.                                                 |
| [S3 URL File Input](/examples/models/google/gemini/s3-url-file-input)                                | Generate an S3 pre-signed URL with boto3 and pass it straight to Gemini to summarize the PDF without downloading it.                     |
| [Google Search with Gemini](/examples/models/google/gemini/search)                                   | The search tool enables Gemini to access current information from Google Search.                                                         |
| [Storage and Memory](/examples/models/google/gemini/storage-and-memory)                              | Combine PgVector knowledge, Postgres memory, session summaries, and web search on Gemini.                                                |
| [Google Structured Output](/examples/models/google/gemini/structured-output)                         | Return an event plan as a Pydantic schema with enums, formats, and nested objects.                                                       |
| [Google Text To Speech](/examples/models/google/gemini/text-to-speech)                               | Generate speech with a Gemini TTS model and write the audio to a WAV file.                                                               |
| [Google Thinking Agent](/examples/models/google/gemini/thinking-agent)                               | Solve a logic puzzle with a Gemini thinking budget and thought summaries enabled.                                                        |
| [Tool Use](/examples/models/google/gemini/tool-use)                                                  | Add web search tools to a Gemini agent and run sync, streaming, and async.                                                               |
| [URL Context](/examples/models/google/gemini/url-context)                                            | Compare two recipe pages by enabling Gemini's url\_context to fetch page content.                                                        |
| [URL Context with Search](/examples/models/google/gemini/url-context-with-search)                    | Combine URL context with Google Search for comprehensive web analysis.                                                                   |
| [Vertex AI Search with Gemini](/examples/models/google/gemini/vertex-ai-search)                      | Vertex AI Search allows Gemini to search through your data stores, providing grounded responses based on your private knowledge base.    |
| [Vertex AI](/examples/models/google/gemini/vertexai)                                                 | Authenticate Gemini against Vertex AI with environment variables or explicit `project_id` and `location` parameters on the Gemini model. |
| [Google Vertex AI With Credentials](/examples/models/google/gemini/vertexai-with-credentials)        | Authenticate Gemini on Vertex AI with explicit service account credentials.                                                              |
| [Google Video Input Bytes Content](/examples/models/google/gemini/video-input-bytes-content)         | Download an MP4 and pass it to Gemini as raw video bytes for analysis.                                                                   |
| [Google Video Input File Upload](/examples/models/google/gemini/video-input-file-upload)             | Upload a video through the Gemini Files API and poll until it is ready to query.                                                         |
| [Google Video Input Local File Upload](/examples/models/google/gemini/video-input-local-file-upload) | Pass a local video file to Gemini and ask the agent to describe its contents.                                                            |
| [Google Video Input YouTube](/examples/models/google/gemini/video-input-youtube)                     | Send a YouTube URL as video input to Gemini and have the agent describe it.                                                              |
