skillfed

langchain-google-genai

An integration package connecting Google's genai package and LangChain

langchain-google-genai v4.3.4 17.7M downloads/30d#1,106 on PyPI398
Permissive license MIT Active released

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-genai

uv

uv add langchain-google-genai

poetry

poetry add langchain-google-genai

Installing 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

langchain google gemini integrationgoogle genai langchaingemini chat embeddings langchaingoogle generative ai langchainlangchain google ai provider
langchain-integrationgenerative-ai

More Artificial Intelligence packages

litellm

LiteLLM provides a unified Python interface to…

permissive · top 100 on PyPI

huggingface-hub

Client library and CLI tool for downloading,…

permissive · top 100 on PyPI

langchain

LangChain provides a framework for building…

permissive · top 1,000 on PyPI

hf-xet

hf-xet provides chunk-based deduplication and…

permissive · top 1,000 on PyPI

tokenizers

Tokenizers converts raw text into token…

permissive · top 1,000 on PyPI

transformers

Transformers provides a unified framework for…

permissive · top 1,000 on PyPI

langchain-google-community

Connects Google products and services to…

permissive · top 5,000 on PyPI

langchain-oci

Integrates LangChain with Oracle Cloud…

unclear · top 15,000 on PyPI

langchain-google-vertexai

Connects LangChain applications to Google…

permissive · top 1,000 on PyPI

langchain-cerebras

Integrates Cerebras AI inference services with…

permissive · top 15,000 on PyPI

langchain-openai

Provides LangChain integrations for OpenAI's…

permissive · top 1,000 on PyPI

langchain-groq

Connects Groq's inference API to LangChain,…

permissive · top 5,000 on PyPI

langchain-deepseek

Integrates DeepSeek language models into…

permissive · top 5,000 on PyPI

langchain-nvidia-ai-endpoints

Integrates NVIDIA AI Foundation Models and chat…

permissive · top 5,000 on PyPI

langchain-cohere

Connects LangChain applications to Cohere's…

permissive · top 5,000 on PyPI

langchain-sambanova

Connects LangChain applications to SambaNova's…

permissive · top 15,000 on PyPI

Further reading