DEV.co
AI Frameworks · GoogleCloudPlatform

generative-ai

A Google Cloud–maintained repository of sample code, Jupyter notebooks, and reference implementations demonstrating how to build generative AI applications using Gemini models and Vertex AI on Google Cloud. It covers agents, RAG/grounding, vision, speech, and search use cases with practical, production-oriented examples.

Source: GitHub — github.com/GoogleCloudPlatform/generative-ai
17.2k
GitHub stars
4.3k
Forks
Jupyter Notebook
Primary language
Apache-2.0
License (OSI-approved)

Key facts

Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.

FieldValue
RepositoryGoogleCloudPlatform/generative-ai
OwnerGoogleCloudPlatform
Primary languageJupyter Notebook
LicenseApache-2.0 — OSI-approved
Stars17.2k
Forks4.3k
Open issues73
Latest releaseUnknown
Last updated2026-07-07
Sourcehttps://github.com/GoogleCloudPlatform/generative-ai

What generative-ai is

Collection of Jupyter Notebooks and Python samples integrated with Google Cloud Vertex AI APIs, Gemini models, and enterprise agent platforms. Includes function calling, retrieval-augmented generation (RAG), multimodal capabilities (vision, audio), and agentic workflows using LangChain and related frameworks.

Quickstart

Get the generative-ai source

Clone the repository and explore it locally.

terminalbash
git clone https://github.com/GoogleCloudPlatform/generative-ai.gitcd generative-ai# follow the project's README for install & configuration

Need it deployed, integrated, or customized instead? DEV.co ships production installs.

Best use cases

Rapid prototyping of Gemini-based agents

Use provided notebooks and starter code to quickly evaluate Gemini model capabilities, test function calling, and prototype agent behaviors before production deployment.

RAG and grounding implementation patterns

Reference implementations showing how to structure retrieval-augmented generation pipelines on Vertex AI, including integration with enterprise data sources and knowledge bases.

Multimodal AI application samples

Ready-to-adapt examples for vision (Imagen/Veo), speech (Chirp/USM), and text workflows that demonstrate how to combine multiple modalities in a single agent or application.

Implementation considerations

  • Requires active Google Cloud project with Vertex AI and Gemini API access; costs scale with model usage and storage queries.
  • Most samples run in Jupyter (Colab, Workbench, or local); local execution requires SDK installation and authentication setup.
  • Code uses Google Cloud Python SDK; adapt authentication, environment configuration, and GCP service account permissions before deploying to production.
  • Notebooks are educational; refactor for production: add error handling, observability/logging, input validation, and rate-limiting before live deployment.
  • Agent Platform and related services evolve; periodically reconcile samples with current API versions to avoid deprecation issues.

When to avoid it — and what to weigh

  • Seeking a production-grade framework or SDK — This is a samples and notebooks repository, not a maintained framework. For production deployment, use the Agent Development Kit (ADK), Agent Starter Pack, or Vertex AI Python SDK directly.
  • Requiring versioned, stable API contracts — Samples are updated frequently and may use experimental APIs or features. Code may break with Vertex AI or Gemini API updates; not guaranteed backward compatible.
  • Building on non-Google Cloud infrastructure — All examples are tightly coupled to Google Cloud services (Vertex AI, Gemini APIs). Minimal cross-platform guidance; not suitable for on-premises, other cloud, or edge-only deployments.
  • Needing long-term commercial support SLA — Repository is explicitly a demonstrative resource with no official support guarantee. Issues are community-driven; response times and resolution are not contractual.

License & commercial use

Apache License 2.0 (Apache-2.0). Permissive OSI-approved license allowing commercial and private use, modification, and distribution, subject to attribution and liability disclaimers.

Apache-2.0 permits commercial use of the sample code itself. However, this repository is explicitly a demonstrative resource with no support guarantee. Using samples in production requires adapting them for your compliance, security, and operational needs. Google Cloud services (Vertex AI, Gemini APIs) invoked by the code are subject to separate Google Cloud Terms of Service and pricing; review those separately.

DEV.co evaluation signals

Editorial assessment — not user reviews. Directional, with an explicit confidence level.

SignalAssessment
MaintenanceActive
DocumentationAdequate
License clarityClear
Deployment complexityModerate
DEV.co fitGood
Assessment confidenceHigh
Security considerations

Code samples do not inherently guarantee security. Key considerations: authenticate securely to Google Cloud (use service accounts, not embedded keys); validate and sanitize LLM inputs to mitigate prompt injection; apply least-privilege IAM roles; enforce encryption at rest/transit for sensitive data; audit agent logs for unauthorized access or model misuse; review and configure content filtering for multimodal models; implement rate-limiting to prevent abuse.

Alternatives to consider

Agent Development Kit (ADK) Samples

Purpose-built, production-ready agent templates with SDKs and deployment patterns; higher maturity than notebooks but steeper learning curve.

OpenAI Cookbook / LangChain Documentation

Multi-cloud alternative for LLM development; not Google-specific but broader ecosystem and community support.

Anthropic Claude Samples / Cohere Examples

Competitor model APIs with their own sample repositories; choose based on model requirements, cost, and regulatory constraints.

Software development agency

Build on generative-ai with DEV.co software developers

Explore the repository notebooks, try them in Colab or Workbench, and adapt them to your data and use case. For production deployments, review the Agent Starter Pack and security best practices.

Talk to DEV.co

Related open-source tools

Surfaced by semantic similarity across the DEV.co open-source index.

Related on DEV.co

Explore the category and the services that help you build with it.

generative-ai FAQ

Can I use these samples directly in production?
Not recommended. Samples are for learning and prototyping. For production, refactor for error handling, monitoring, security (auth, input validation, secret management), and compliance. Use the Agent Starter Pack or ADK for production-ready templates.
Do I need a Google Cloud account?
Yes. All examples require Vertex AI and Gemini API access, which require an active Google Cloud project, billing, and appropriate IAM permissions.
Is this an officially supported Google product?
No. The repository is explicitly a demonstrative resource. Issues are handled by the community; there is no SLA or official support channel.
How do I adapt a notebook for my own data?
Modify the data loading and preprocessing steps to point to your sources (BigQuery, Cloud Storage, Firestore, etc.). Update authentication and adjust the RAG or agent logic to match your use case. Test thoroughly before deployment.

Software developers & web developers for hire

DEV.co helps companies turn open-source tools like generative-ai into production software. Our software development services cover the full lifecycle — architecture, web development, integration, and maintenance — delivered by software developers and web developers who ship. Engage our software development agency to implement or customize it for your ai frameworks stack.

Ready to build generative AI on Google Cloud?

Explore the repository notebooks, try them in Colab or Workbench, and adapt them to your data and use case. For production deployments, review the Agent Starter Pack and security best practices.