Skip to main content
Valkey is an open source, high-performance key/value datastore that supports workloads such as caching, message queues, and can act as a primary database. Valkey can run as either a standalone daemon or in a cluster, with options for replication and high availability.
This page covers how to use the Valkey vector store with Amazon ElastiCache for Valkey or Amazon MemoryDB for Valkey.

Setup

Install the required dependencies:
The Valkey integration requires langchain-aws>=1.5.0. If you’re using an earlier version, install the dependency directly:

Basic Usage

With Bedrock Embeddings

With Ollama Embeddings

Connection URLs

ValkeyVectorStore supports various connection URL formats:

AWS ElastiCache for Valkey

Metadata Filtering

Custom Vector Schema

API Reference

For detailed API documentation, see ValkeyVectorStore.