Model or dataset
GoogleCloudPlatform/generative-ai avatar
GoogleCloudPlatform/generative-ai

GoogleCloudPlatform/generative-ai: Notebooks and Samples for Gemini and Agent Platform

Sample code and notebooks for Generative AI on Google Cloud, with Gemini Enterprise Agent Platform

17,775 stars4,479 forksJupyter NotebookApache-2.0

At a glance

What is it?
GoogleCloudPlatform/generative-ai is a large collection of Jupyter notebooks and code samples covering generative AI development on Google Cloud, from Gemini model introductions to Agent Platform deployment and RAG pipeline construction. It is aimed at engineers who learn by reading and running annotated examples rather than by following product documentation alone.
Who is it for?
Data scientists and ML engineers who want working, annotated examples of Gemini model usage, RAG pipeline construction, or Agent Platform deployment will find this repository a practical reference. Developers looking for production-ready infrastructure or a library to import will not: the repository is a sample collection, not a deployable package.
Can I use it commercially?
Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 1 day ago.
What is it written in?
Mainly Jupyter Notebook, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on September 29, 2026, and from our analysis. They are not legal advice.

Editorial analysis

A Sample Collection, Not a Library or Framework

The repository is a curated set of Jupyter notebooks, Python scripts, and sample applications. Its README describes it as demonstrating 'how to use, develop and manage generative AI workflows using Generative AI with Agent Platform.' The distinction between a sample collection and a framework matters for how you use it. You do not install this repository as a dependency. You clone it, navigate to the relevant subdirectory, and run the notebook or script that covers your area of interest. The notebooks are intended to be self-contained examples that demonstrate a concept, an API pattern, or an architecture decision. The README points to the `setup-env/` directory for instructions on setting up Google Cloud, the Gen AI Python SDK, and notebook environments on Google Colab and Workbench. That setup step is a prerequisite for almost everything else in the repository. The intended users are data scientists, ML engineers, and developers on the Google Cloud platform who want to understand how the platform's generative AI services behave before building their own applications. The samples are not production code templates, but they show the API surface well enough to inform an architectural decision.

How the Repository Is Divided and What Each Directory Contains

The top-level structure groups samples by topic. The gemini/ directory covers Gemini models through starter notebooks, use cases, and function calling examples. The README highlights a notebook for Gemini 3.8 Flash at `gemini/getting-started/intro_gemini_3_8_flash.ipynb` as an entry point. The rag-grounding/ directory serves as an index of notebooks focused on retrieval-augmented generation and grounding across other directories. The search/ directory targets Agent Search, Google Cloud's managed search solution for websites and enterprise data. The vision/ directory covers Imagen and Veo for image and video generation. The audio/ directory covers Chirp, Google's Universal Speech Model. The agents/ directory contains agent-building samples. Additional directories include embeddings/, open-models/, partner-models/, sdk/, tools/, translation/, and workshops/. The RESOURCES.md file at the root lists external learning materials such as blog posts and YouTube playlists.

Getting Started: Setup Environment and First Notebook

The README points to the setup-env/ directory for the environment setup steps. Those steps cover configuring Google Cloud, enabling the required APIs, installing the Gen AI Python SDK, and preparing notebook environments for both Google Colab and Vertex AI Workbench. The README does not reproduce those steps inline; they are documented in setup-env/. Once the environment is ready, the README suggests starting with the Gemini 3.8 Flash introduction notebook at gemini/getting-started/intro_gemini_3_8_flash.ipynb. The repository also includes a notebook_template.ipynb at the root, which appears to be the standard starting template used by contributors when adding new notebooks. Because most notebooks require an authenticated Google Cloud project, starting without completing the setup-env/ steps will typically produce authentication errors before any model call succeeds.

The Agent Platform Focus and How It Connects to Vertex AI

The README introduces Agent Platform as 'the latest evolution of Vertex AI.' The repository's scope has shifted to reflect this: the top-level banner promotes the Agent Platform documentation and a separate repository (google-cloud-ai/agent-platform) as the destination for agent-building assets. Within this repository, the agents/ directory holds agent-building samples, and several gemini/ subdirectories cover function calling and use cases. The README also lists related repositories in a structured section: Agent Development Kit (ADK) Samples (ready-to-use agents built on the Agent Development Kit), Agent Starter Pack (production-ready agent templates addressing deployment, evaluation, customization, and observability), Gemini Cookbook, genai-factory (infrastructure blueprints using IaC with security best practices), and Applied AI Engineering Samples. These are separate repositories, not subdirectories here. Understanding which repository to use for a given task requires reading those distinctions, since the ecosystem has multiple overlapping entry points. For example, a developer who wants a deployable agent template with observability wired in should look at the Agent Starter Pack rather than this repository, while a developer who wants to understand the Gemini API's function calling behavior should look at the notebooks in gemini/ here.

Limitations: What This Repository Does Not Provide

The samples are demonstrations, not production-grade implementations. A notebook that shows how to call the Gemini API for function calling does not include error handling, retry logic, rate limit management, or cost controls appropriate for a production service. The repository does not have GitHub releases, which means there is no mechanism to pin to a known-working version of the sample code. If Google updates an API and a notebook is not yet revised, the notebook may fail silently or with an import error rather than a clear deprecation message. The README notes the collection spans many topics, but the depth varies: some areas like GKE AI inference are covered by a linked related repository rather than samples here. The repository also does not include samples for all Google Cloud products; it focuses on generative AI and Agent Platform. Teams building production systems should treat these notebooks as a starting point for understanding API behavior rather than as production-ready code they can copy directly. The workshops/ directory suggests the repository also serves as a companion for instructor-led training, which means some content is structured around exercises rather than standalone runnable examples. The relationship between this repository and the Agent Platform documentation is not always clear from the README: some topics in the documentation have sample code only in a related repository, not here.

Licence and Maintenance

The repository is licensed under Apache 2.0, which permits use, modification, and redistribution with attribution and retention of the licence file. The last push was on 2026-09-27, one day before this article was written. Google maintains the repository with active contribution from its engineering teams, supported by a CONTRIBUTING.md and a CODE_OF_CONDUCT.md. The .github/ directory contains workflow configurations including a renovate.json, suggesting automated dependency updates are configured. The lychee.toml file at the root indicates a link-checking tool is used to verify that URLs in notebooks remain valid. Notebooks that reference Google Cloud console URLs or API documentation may have links that go stale as the platform evolves. The notebook_template.ipynb at the root is the standard template contributors use when adding new samples, which means the formatting and header structure is relatively consistent across the collection. A SECURITY.md file is present, which is relevant for teams using the repository in environments with code review requirements. The .ruff.toml configuration at the root applies the Ruff Python linter to Python source files, giving the repository consistent Python code quality standards. Contributors who want to add a new notebook should follow the template structure to pass the automated checks that run in the GitHub Actions workflows.

Editorial conclusion

Data scientists and ML engineers who want working, annotated examples of Gemini model usage, RAG pipeline construction, or Agent Platform deployment will find this repository a practical reference. Developers looking for production-ready infrastructure or a library to import will not: the repository is a sample collection, not a deployable package. Before starting, read through setup-env/ to configure your Google Cloud project and notebook environment, since most notebooks require an authenticated Google Cloud project and the appropriate API enablement.

Frequently asked questions

What is the GoogleCloudPlatform/generative-ai repository?

It is a collection of Jupyter notebooks and code samples demonstrating how to use Gemini models, build agents on the Agent Platform, construct RAG pipelines, and work with Google Cloud's generative AI services. It is a learning and reference resource, not an installable library.

How do I set up the environment to run the notebooks in this repository?

The README points to the setup-env/ directory, which contains instructions for configuring Google Cloud, enabling the required APIs, installing the Gen AI Python SDK, and preparing notebook environments on Google Colab and Vertex AI Workbench.

Does this repository include samples for all Gemini models?

The README does not enumerate every Gemini model covered. It highlights a Gemini 3.8 Flash notebook at gemini/getting-started/intro_gemini_3_8_flash.ipynb as a starting point; the full range of notebooks is browsable in the gemini/ directory.

Official sources

  1. GoogleCloudPlatform/generative-ai on GitHub
  2. Issues
  3. License: Apache-2.0
  4. Project website
  5. README
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/googlecloudplatform-generative-ai.svg)](https://hysenlabs.com/projects/googlecloudplatform-generative-ai)