GridGain Developers Hub

Langflow Integration

GridGain provides Langflow components that can be used to supercharge your AI workflow with full power of GridGain. This version is based on Langflow 1.1.3 and can be used to start working with GridGain vector store components before they are available in the official Langflow release.

GridGain Langflow module is currently in early access. To use GridGain in Langflow, download the early access version and follow the steps below.

Using Early Access Version

Currently, GridGain provides early access version of Langflow components in a prebuilt Langflow fork that includes GridGain components. To use Langflow:

  • Download the latest version from link: GridGain website.

  • Unpack the downloaded archive.

After the archive is downloaded, you need to configure local version of Langflow

Linux or MacOS Configuration

You can quickly configure a local langflow installation by using the provided makefile.

make init

Detailed instructions are available in the Langflow Development Guide.

Windows

On Windows, it is recommended to perform installation steps manually:

Backend Setup

  1. Create and activate a virtual environment:

    python3.11 -m venv .venv
    .venv\Scripts\activate
  2. Configure Langflow environment variables to configure your Langflow instance:

    LANGFLOW_DATABASE_URL="sqlite:///./langflow.db"
    LANGFLOW_AUTO_LOGIN=true
    LANGFLOW_HOST=127.0.0.1
    LANGFLOW_PORT=7860
    LANGFLOW_FRONTEND_PATH="./src/frontend/build"
  3. Install and start the previously downloaded Langflow:

    pip install -e .
    cd src\backend\base
    pip install -e .
    cd ..\..\..
    uv run langflow run

Frontend Setup

Navigate to the frontend directory and install dependencies:

cd src/frontend
npm install
npm run build

Langflow Components

GridGain Vector Store

gridgain store

Vector databases in Langflow store vector data, which backs AI workloads like chatbots and Retrieval Augmented Generation. Vector database components establish connections to existing vector databases or create in-memory vector stores for storing and retrieving vector data. GridGain vector store component implements a vector store by using GridGain.

Known Limitations

Unlike other vector store providers that support direct data ingestion through the ingest_data parameter, GridGain currently only supports data ingestion through CSV file upload. The CSV file must contain the following columns:

  • "id": Unique document identifier

  • "url": Document URL

  • "title": Document title

  • "text": Document content

The component will automatically process the CSV file and create document objects with appropriate metadata for storage in GridGain.

Inputs

Name Type Description

cache_name

String

Required. The name of the cache within GridGain where vectors will be stored.

host

String

Required. GridGain server host address.

port

Integer

Required. GridGain server port number.

score_threshold

Float

Required. Minimum similarity score threshold for search results. Default value: 0.6.

csv_file

File

CSV file for data ingestion.

embedding

Embeddings

Embedding model to use for vector creation.

search_query

String

Query string for similarity search.

number_of_results

Integer

Number of results to return in similarity search Default value: 4.)

Outputs

Name Type Description

vector_store

GridGainVectorStore

Built GridGain vector store instance.

search_results

List[Data]

Results of the similarity search as a list of Data objects.

GridGainChatMemory Component

gridgain chat

Memory components in Langflow store and retrieve chat messages by session_id. They are distinct from vector store components, because they are built specifically for storing and retrieving chat messages from external databases. Memory components provide access to their respective external databases as memory. This allows Large Language Models (LLMs) or agents to access external memory for persistence and context retention. This component creates a chat message history using GridGain, enabling storage and retrieval of chat messages using GridGain’s distributed caching capabilities.

Inputs

Name Type Description

host

String

Required. GridGain server host address. Default value: "localhost".

port

String

Required. GridGain server port number. Default value: "10800".

cache_name

String

Required. Name of the cache for storing messages. Default value: "langchain_message_store".

session_id

MessageText

Chat session ID. Uses current session ID if not provided.

client_type

String

Required. Type of client to use. Must be pyignite or pygridgain.

Outputs

Name Type Description

message_history

BaseChatMessageHistory

An instance of GridGainChatMessageHistory for the session.

Langflow Tutorial

GridGain provides a Langflow tutorial that shows how to use it to solve real world problems. Full tutorial is available in the Low-Code RAG Application Building with GridGain and Langflow section.