Jump to Content
Databases

Google Cloud Database and LangChain integrations now support Go, Java, and JavaScript

April 22, 2025
Hamsa Buvaraghan

AI Product Manager, Google Cloud Databases

Averi Kitsch

Senior Software Engineer

Try Gemini 2.5

Our most intelligent model is now available on Vertex AI

Try now

Last year, Google Cloud and LangChain announced integrations that give generative AI developers access to a suite of LangChain Python packages. This allowed application developers to leverage Google Cloud’s database portfolio in their gen AI applications to drive the most value from their private data.

Today, we are expanding language support for our integrations to include Go, Java, and JavaScript.

Each package will have up to three LangChain integrations: 

  1. Vector stores to enable semantic search for our databases 

  2. Chat message history to enable chains to recall previous conversations

  3. Document loader for loading documents from your enterprise data

Developers now have the flexibility to create intricate workflows and easily interchange underlying components (like a vector database) as needed to align with specific use cases. This technology unlocks a variety of applications, including personalized product recommendations, question answering, document search and synthesis, customer service automation, and more.

In this post, we’ll share more about the integrations – and code snippets to get started.

New language support

LangChain is known for its popular Python package; however, your team’s expertise and services may not be in Python. Java and Go are commonly used programming languages for production-grade and enterprise-scale applications. Developers may prefer Javascript and Typescript for the asynchronous programming support and compatibility with front-end frameworks like React and Vue.

In addition to Python developers, the LangChain developer community encompasses developers proficient in Java, JavaScript, and Go. It is an active and supportive community centered around the LangChain framework, which facilitates the development of applications powered by large language models (LLMs).

Google Cloud is dedicated to providing secure and easy to use database integrations for your Gen AI applications. Our integrations embed Google Cloud connectors that create secure connections, handle SSL certificates, and support IAM authorization and authentication. The integrations are optimized for PostgreSQL databases (AlloyDB for PostgreSQL, AlloyDB Omni, Cloud SQL for PostgreSQL) to ensure proper connection management, flexible tables schemas, and improved filtering. 

JavaScript Support

JavaScript developers can utilize LangChain.js, which provides tools and building blocks for developing applications leveraging LLMs. LangChain simplifies the process of connecting LLMs to external data sources and enables reasoning capabilities in applications. Other Google Cloud integrations, such as Gemini models, are available within LangChain.js, allowing seamless interaction with GCP resources.

Resources (Cloud SQL PostgreSQL support only)

Links

Documentation

Link

How-to guides

Vector Store

Memory

Document Loader

Quick start guide

Vector Store

Memory

Document Loader 

GitHub

Repository

Below are the integrations and their code snippets to get started.

Install the dependency:

Loading...

Engine

lang-py
Loading...

Use this package with AlloyDB for PostgreSQL and AlloyDB Omni by customizing your Engine to connect your instance. You will need the AlloyDB Auth Proxy to make authorized, encrypted connections to AlloyDB instances.

lang-py
Loading...

Vector store

lang-py
Loading...

Chat message history

lang-py
Loading...

Loader

lang-py
Loading...

Java Support

For Java developers, there's LangChain4j, a Java implementation of LangChain. This allows Java developers to build LLM-powered applications with a familiar ecosystem. In LangChain4j, you can also access the full array of VertexAI Gemini models.

Resources

Links

How-to Guides

AlloyDB Embedding Store 

AlloyDB Document Loader

Quick Start Guides

AlloyDB example

GitHub

Repository

*Note: Cloud SQL integrations will be released soon.

Below are the integrations and their code snippets to get started.

For Maven in pom.xml:

Loading...

Engine

lang-py
Loading...

Embedding store

lang-py
Loading...

Document loader

lang-py
Loading...

Go support

LangchainGo is the Go programming language port of LangChain.

The LangChain framework was designed to support the development of sophisticated applications that connect language models to data sources and enable interaction with their environment. The most powerful and differentiated applications go beyond simply using a language model via an API; they are data-aware and agentic.

Last year Google's SDKs were added as providers for LangChainGo; this makes it possible to use the capabilities of the LangChain framework with Google's Gemini models as LLM providers.

We now have AlloyDB and Cloud SQL for PostgreSQL support in LangchainGo.

Below are the integrations and their code snippets to get started.

Install the dependency

Loading...

Engine

Loading...

Vector Store

Loading...

Chat message history

Loading...

*Note code is shown for AlloyDB. See links for Cloud SQL for Postgres examples.

Get started

The LangChain Vector stores integration is available for Google Cloud databases with vector support, including  AlloyDB, Cloud SQL for PostgreSQL, Firestore, Memorystore for Redis, and Spanner.

The Document loaders and Memory integrations are available for all Google Cloud databases including AlloyDB, Cloud SQL for MySQL, PostgreSQL and SQL Server, Firestore, Datastore, Bigtable, Memorystore for Redis, El Carro for Oracle databases, and Spanner. Below are a few resources to get started.

Resources:

Posted in