How googlecloudplatform/generative-ai works
Purpose and Repository Shape
This is a curated Google Cloud generative-AI sample repository, not one deployable product. It combines notebooks, reference implementations, sample applications, and infrastructure examples for Gemini, Agent Platform, Search, audio, vision, embeddings, and open/partner models. Root navigation is README.md; topic-level entry points include gemini/README.md, search/README.md, and setup-env/README.md.
Primary Consumption Paths
Most assets are independently runnable notebooks or self-contained samples; there is no shared application runtime or monorepo build entry point. Users typically begin with API/model notebooks under gemini/getting-started/, service-specific examples under agents/, search/, audio/, and vision/, or deployable sample directories containing their own dependency and container manifests. Representative entry points: gemini/getting-started/intro_gemini_3_6_flash.ipynb, agents/adk/new-hire-onboarding/app/agent.py, search/web-app/main.py.
Gemini and Agent Workflows
gemini/ is the largest capability area: model invocation, function calling, MCP, evaluation, RAG, tuning, multimodal live APIs, and end-to-end apps. Agent examples span ADK and Agent Engine, often exposing Python/FastAPI services, state schemas, tools, telemetry, and optional browser UIs. Key examples include agents/adk/contract-compliance-pipeline/python-extraction-agent/app/fast_api_app.py, agents/adk/contract-compliance-pipeline/python-extraction-agent/app/agent.py, and gemini/mcp/adk_multiagent_mcp_app/main.py.
Application Architecture Examples
Several directories are complete but independent vertical slices, useful as reference architectures rather than shared platform components. Typical boundaries are frontend/UI → HTTP or WebSocket backend → model/agent orchestration → external data/tools. For example, the LangGraph concierge separates graph nodes and FastAPI serving in gemini/agents/genai-experience-concierge/langgraph-demo/backend/concierge/langgraph_server/fastapi_app.py and gemini/agents/genai-experience-concierge/langgraph-demo/backend/concierge/nodes/; its separate UI is under gemini/agents/genai-experience-concierge/langgraph-demo/frontend/concierge_ui/.
Retrieval, Search, and Data Boundaries
Search and RAG samples demonstrate ingestion/indexing, retrieval, reranking, grounding, evaluation, and answer generation. They interface with managed Google services rather than a repository-wide storage layer. The LlamaIndex RAG sample separates indexing from query serving in gemini/sample-apps/llamaindex-rag/backend/indexing/run_parse_embed_index.py and gemini/sample-apps/llamaindex-rag/backend/app/routers/rag.py. Agent Search examples provide web and Cloud Function integration in search/web-app/main.py and search/cloud-function/python/vertex_ai_search_client.py.
Runtimes and Infrastructure
Material runtimes are Python (notebooks, FastAPI, Flask/Streamlit-style apps), JavaScript/TypeScript (React, Angular, Vite, browser media clients), and Go (some service/job samples). Deployable samples commonly include Dockerfiles; selected systems add Docker Compose, Cloud Build, Terraform, Cloud Run, GKE, App Engine, or Cloud Functions. Infrastructure boundaries are explicit in gemini/agents/genai-experience-concierge/langgraph-demo/terraform/, agents/adk/contract-compliance-pipeline/docker-compose.yml, and gemini/multimodal-live-api/project-livewire/server/Dockerfile.
External Services and Integration Surfaces
Examples target Google Cloud Generative AI/Gemini and Vertex AI services, including Agent Platform/Agent Engine, Gemini Enterprise/Agent Search, Vector Search, BigQuery, Cloud Storage, Document AI, and model-serving infrastructure. Some samples integrate protocol or real-time systems such as MCP, A2A, WebSockets, LiveKit, and browser audio worklets. Concrete integration surfaces include gemini/multimodal-live-api/livekit-adk/app/livekit_bridge.py, search/gemini-enterprise/group-licensing/internal/adapters/, and gemini/use-cases/applying-llms-to-data/using-gemini-with-bigquery-remote-functions/.
Main entry points: README.md Root catalog · gemini/README.md Gemini catalog · fastapi_app.py Concierge API · rag.py RAG query API
Components 21
Repository navigation
Curated entry points organize independent samples.
- Root catalog · Repository-wide navigation for the sample collection.
README.md - Gemini catalog
gemini/README.md - Search catalog
search/README.md - Environment setup
setup-env/README.md
Capability samples
Notebooks and examples grouped by AI capability.
- Gemini intro notebook · Independently runnable model API learning path.
gemini/getting-started/intro_gemini_3_6_flash.ipynb - MCP multi-agent app · Agent orchestration example using MCP.
gemini/mcp/adk_multiagent_mcp_app/main.py - LiveKit bridge · Connects a live agent flow to LiveKit.
gemini/multimodal-live-api/livekit-adk/app/livekit_bridge.py
Agent reference apps
Independent agent architectures and service layers.
- ADK onboarding agent
agents/adk/new-hire-onboarding/app/agent.py - Contract API · HTTP boundary for the extraction-agent sample.
agents/adk/contract-compliance-pipeline/python-extraction-agent/app/fast_api_app.py - Contract extraction agent
agents/adk/contract-compliance-pipeline/python-extraction-agent/app/agent.py - Concierge UI
- Concierge API · Serving boundary for the LangGraph concierge.
gemini/agents/genai-experience-concierge/langgraph-demo/backend/concierge/langgraph_server/fastapi_app.py - Concierge graph nodes · Orchestration nodes behind the API.
Search and RAG
Indexing, retrieval, and managed search integrations.
- RAG indexing pipeline · Parses, embeds, and indexes source content.
gemini/sample-apps/llamaindex-rag/backend/indexing/run_parse_embed_index.py - RAG query API · Query-serving boundary for the LlamaIndex sample.
gemini/sample-apps/llamaindex-rag/backend/app/routers/rag.py - Agent Search web app
search/web-app/main.py - Search Cloud Function client
search/cloud-function/python/vertex_ai_search_client.py
Deployment examples
Per-sample container and infrastructure boundaries.
- Concierge Terraform
- Contract Compose
agents/adk/contract-compliance-pipeline/docker-compose.yml - Livewire server image
gemini/multimodal-live-api/project-livewire/server/Dockerfile
Other components
- Google AI services · Gemini, Vertex AI, Agent Platform, and related managed APIs.
Connections 22
- Root catalog → Gemini catalog: links to
- Root catalog → Search catalog: links to
- Root catalog → Environment setup: links to
- Gemini catalog → Gemini intro notebook: guides users to
- Gemini catalog → MCP multi-agent app: includes
- MCP multi-agent app → Google AI services: invokes
- ADK onboarding agent → Google AI services: uses
- Contract API → Contract extraction agent: serves
- Contract extraction agent → Google AI services: orchestrates via
- Contract Compose → Contract API: runs
- Concierge UI → Concierge API: HTTP requests
- Concierge API → Concierge graph nodes: executes
- Concierge graph nodes → Google AI services: invokes
- Concierge Terraform → Concierge API: provisions deployment for
- RAG indexing pipeline → Google AI services: creates managed index via
- RAG query API → RAG indexing pipeline: queries index built by
- RAG query API → Google AI services: retrieves and generates via
- Search catalog → Agent Search web app: guides users to
- Agent Search web app → Search Cloud Function client: can integrate through
- Search Cloud Function client → Google AI services: calls Agent Search
- LiveKit bridge → Google AI services: connects live agent to
- Livewire server image → LiveKit bridge: represents deployable real-time pattern