Skip to main content
Version: 1.12.x (Next)

Valkey

tip

If you installed lfx directly (not as part of langflow), install the Valkey bundle separately:

  1. Run uv pip install lfx-valkey.
  2. Restart Langflow.
  3. To confirm the bundle loaded, run lfx extension list.

If you installed Langflow with uv pip install langflow, these bundle components are already included.

For more information, see Install LFX with bundle components.

Bundles contain custom components that support specific third-party integrations with Langflow.

This page describes the components that are available in the Valkey bundle.

Valkey is an open source, high-performance key/value datastore forked from Redis. It supports workloads such as caching, message queues, and can act as a primary database. Valkey is wire-compatible with Redis, so existing Redis clients and tools work with it out of the box.

Start the Valkey server

The Valkey Chat Memory component works with any Valkey server, with no additional modules required. To run a Valkey server with no vector store, run the standard valkey/valkey Docker image:

terminal
docker run -d --name valkey -p 6379:6379 valkey/valkey:8

The Valkey Vector Store requires the valkey-search module for FT.CREATE and FT.SEARCH commands. The standard valkey/valkey Docker image does not include this module. Instead, use the valkey/valkey-bundle Docker image, which includes search enabled by default.

To start a Valkey server with search support, run:

terminal
docker run -d --name valkey -p 6379:6379 valkey/valkey-bundle:8.1

Valkey Chat Memory component

The Valkey Chat Memory component retrieves and stores chat messages using a Valkey server.

Chat memories are passed between memory storage components as the Memory data type. The connection URL uses the redis:// scheme. Under the hood, this component uses the RedisChatMessageHistory class from langchain-community to maintain wire compatibility between Valkey and Redis.

For more information about using external chat memory in flows, see the Message History component.

Valkey Chat Memory parameters

Some parameters are hidden by default in the visual editor. You can modify all component parameters through the component inspection panel that appears when you select a component.

NameDisplay NameInfo
hostHostnameInput parameter. The IP address or hostname of the Valkey server. Default: localhost.
portPortInput parameter. The Valkey port number. Default: 6379.
databaseDatabaseInput parameter. The Valkey database number. Default: 0.
usernameUsernameInput parameter. The Valkey username (optional).
passwordValkey PasswordInput parameter. The password for authentication (optional).
key_prefixKey prefixInput parameter. A prefix for message keys in Valkey (optional).
session_idSession IDInput parameter. The unique session identifier for the chat messages.

Valkey vector store

The Valkey vector store component reads and writes to Valkey vector stores using the ValkeyVectorStore class from langchain-aws.

This component uses the valkey-glide client library to communicate with the Valkey server and supports the FT.CREATE and FT.SEARCH commands for vector indexing and similarity search.

About vector store instances

Because Langflow is based on LangChain, vector store components use an instance of LangChain vector store to drive the underlying read and write functions. These instances are provider-specific and configured according to the component's parameters, such as the connection string, index name, and schema.

In component code, this is often instantiated as vector_store, but some vector store components use a different name, such as the provider name.

Some LangChain classes don't expose all possible options as component parameters. Depending on the provider, these options might use default values or allow modification through environment variables, if they are supported in Langflow. For information about specific options, see the LangChain API reference and vector store provider's documentation.

If you use a vector store component to query your vector database, it produces search results that you can pass to downstream components in your flow as a list of JSON objects or a tabular Table. If both types are supported, you can set the format near the vector store component's output port in the visual editor.

tip

For a tutorial using a vector database in a flow, see Create a vector RAG chatbot.

Valkey vector store parameters

You can inspect a vector store component's parameters to learn more about the inputs it accepts, the features it supports, and how to configure it.

Some parameters are hidden by default in the visual editor. You can modify all component parameters through the component inspection panel that appears when you select a component.

Some parameters are conditional, and they are only available after you set other parameters or select specific options for other parameters. Conditional parameters may not be visible on the Controls pane until you set the required dependencies.

For information about accepted values and functionality, see the Valkey documentation or inspect component code.

NameTypeDescription
valkey_server_urlSecretStringInput parameter. The Valkey server connection string (for example, valkey://localhost:6379).
valkey_index_nameStringInput parameter. The name of the Valkey vector index. Required when no documents are provided.
ingest_dataDataInput parameter. The data to be ingested into the vector store.
search_queryStringInput parameter. The query for similarity search.
embeddingEmbeddingsInput parameter. The embedding function to use.
number_of_resultsIntegerInput parameter. The number of results to return in search. Default: 4.
should_cache_vector_storeBooleanInput parameter. If true, the component caches the vector store for the current build so multiple outputs can share it.

Was this page helpful?

Support
Search