n8n Redis vector store

Learn how to use Redis as a vector store with n8n workflows

n8n is a platform that lets you automate data manipulation tasks. You specify the tasks using a visual graph notation known as a workflow. Each node in the graph represents a task, and the edges represent the data flow between tasks.

The Redis vector store node lets you access vector search capabilities from your n8n workflows. Some typical usage patterns include:

  • Use as a regular node to insert and retrieve documents: Use the Redis Vector Store as a regular node to insert or get documents in the regular connection flow without using an agent.
  • Connect directly to an AI agent as a tool: Connect the Redis Vector Store node directly to the tool connector of an AI agent to use a vector store as a resource when answering queries.
  • Use a retriever to fetch documents: Use the Vector Store Retriever node with the Redis Vector Store node to fetch documents that match the given chat input, often used with the Question and Answer Chain node.
  • Use the Vector Store Question Answer Tool to answer questions: Use the Vector Store Question Answer Tool to summarize results and answer questions from the Redis Vector Store node, rather than connecting it directly as a tool.

The vector store node is a cluster node that is designed to work with one or more sub-nodes. These let you choose additional functionality, such as an embedding model to calculate the embedding vectors used in the search.

The sections below summarize how you can use the Redis vector store node in n8n, but see the Redis vector store node documentation (available from the n8n workflow editor) for more information.

Prerequisites

To use the Redis vector store node, you need a Redis server with Redis Query Engine enabled. See the Redis Cloud quickstart guide or the Redis Open Source installation guide to learn how to set up a suitable Redis server within minutes.

Available operations

The Redis Vector Store node has four operation modes that determine what operations you can perform:

  • Get Many: Retrieve multiple documents from your vector database by providing a prompt. The prompt is embedded and used for similarity search, returning the most similar documents with their similarity scores. Useful for retrieving a list of similar documents to pass to an agent as additional context.
  • Insert Documents: Insert new documents into your vector database.
  • Retrieve Documents (as Vector Store for Chain/Tool): Use with a Vector Store Retriever to retrieve documents from a vector database and provide them to the retriever connected to a chain. You must connect the node to a retriever node or root node in this mode.
  • Retrieve Documents (as Tool for AI Agent): Use the vector store as a tool resource when answering queries. The agent uses the vector store when the vector store name and description match the question details.

Example workflows

Redis provides two well-annotated example workflows to demonstrate how you can use the Redis vector store node in n8n.

RATE THIS PAGE
Back to top ↑