langchain-google-genai
An integration package connecting Google's genai package and LangChain
What it is and what it does
This package bridges Google's Gemini generative AI models into the LangChain framework, allowing developers to use Google's chat, vision, and embedding capabilities as components within LangChain workflows. It wraps the google-genai package and exposes Gemini functionality through LangChain's standard interfaces, enabling code written for other providers to swap in Gemini with minimal changes.
The package depends on langchain-core for base abstractions, pydantic for data validation, google-genai for the underlying API client, and filetype for content type detection. It requires Python 3.10 or later and is actively maintained.
Use it for:
- Build a chatbot using Gemini's chat models within LangChain without rewriting provider-specific code.
- Generate embeddings for semantic search or RAG pipelines using Gemini through LangChain.
- Process images with Gemini's vision capabilities as part of a LangChain agent or chain.
- Prototype multi-model AI applications by swapping between Gemini and other providers via LangChain's API.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Integrates Google's Gemini AI models (chat, vision, embeddings) into LangChain applications through a unified interface.
Yes. Active maintenance, low install friction, permissive MIT license, and no known vulnerabilities make this a solid choice if you need Gemini within LangChain. Verify you have Google API credentials and understand quota constraints before deploying.
Install
langchain-google-genai on PyPI
pip
pip install langchain-google-genaiuv
uv add langchain-google-genaipoetry
poetry add langchain-google-genaiInstalling langchain-google-genai
Before you install
Low install friction with a pure Python wheel. Actively maintained with a release on 2026-08-14. Depends on langchain-core, google-genai, pydantic, and filetype.
License in practice
MIT license permits commercial and private use with minimal restrictions, suitable for most projects.
Quickstart
pip install langchain-google-genai
from langchain_google_genai import ChatGoogleGenerativeAI
model = ChatGoogleGenerativeAI(model="gemini-pro")
Google API credentials must be configured (typically via GOOGLE_API_KEY environment variable) before instantiating any model.
Verify before relying
- Whether Google API credentials or authentication setup is required before use
- Rate limits or quota constraints on Gemini API calls through this integration
- Specific capabilities and models available through each integration point (chat, vision, embeddings)
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (<4.0.0,>=3.10.0) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 4 — filetype, google-genai, langchain-core, pydantic |
| Maintenance | actively maintained — 0 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 17,653,268/month — #1,106 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: langchain_google_genai-4.3.4-py3-none-any.whl
Tags
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to…
permissive · top 100 on PyPI
huggingface-hubClient library and CLI tool for downloading,…
permissive · top 100 on PyPI
langchainLangChain provides a framework for building…
permissive · top 1,000 on PyPI
hf-xethf-xet provides chunk-based deduplication and…
permissive · top 1,000 on PyPI
tokenizersTokenizers converts raw text into token…
permissive · top 1,000 on PyPI
transformersTransformers provides a unified framework for…
permissive · top 1,000 on PyPI
langchain-google-communityConnects Google products and services to…
permissive · top 5,000 on PyPI
langchain-ociIntegrates LangChain with Oracle Cloud…
unclear · top 15,000 on PyPI
langchain-google-vertexaiConnects LangChain applications to Google…
permissive · top 1,000 on PyPI
langchain-cerebrasIntegrates Cerebras AI inference services with…
permissive · top 15,000 on PyPI
langchain-openaiProvides LangChain integrations for OpenAI's…
permissive · top 1,000 on PyPI
langchain-groqConnects Groq's inference API to LangChain,…
permissive · top 5,000 on PyPI
langchain-deepseekIntegrates DeepSeek language models into…
permissive · top 5,000 on PyPI
langchain-nvidia-ai-endpointsIntegrates NVIDIA AI Foundation Models and chat…
permissive · top 5,000 on PyPI
langchain-cohereConnects LangChain applications to Cohere's…
permissive · top 5,000 on PyPI
langchain-sambanovaConnects LangChain applications to SambaNova's…
permissive · top 15,000 on PyPI