RAG Agent with Memory and Supabase Vector Store
detail.loadingPreview
This workflow enables a Retrieval Augmented Generation (RAG) agent to converse with memory, powered by OpenAI's chat model and leveraging Supabase for vector storage. It allows the agent to recall past interactions and access information from a vector database.
🚀Ready to Deploy This Workflow?
About This Workflow
Overview
This n8n workflow sets up a sophisticated Retrieval Augmented Generation (RAG) agent. It uses OpenAI's chat model for generating responses and incorporates memory via a PostgreSQL database. The agent's knowledge base is stored and retrieved using a Supabase Vector Store. The workflow is triggered by a chat message, processes the input using the RAG agent, and responds accordingly, maintaining conversational context.
This workflow is ideal for building intelligent chatbots that need to remember past conversations and access a dynamic knowledge base, enhancing user experience and providing more relevant and context-aware responses.
Key Features
- Integrates OpenAI's advanced language models for natural language understanding and generation.
- Implements conversational memory using Postgres Chat Memory to maintain context.
- Utilizes Supabase as a vector store for efficient knowledge retrieval.
- Supports document loading and text splitting for knowledge base ingestion.
- Offers a RAG Agent for enhanced response generation based on retrieved information.
How To Use
- Set up Credentials: Configure your OpenAI API credentials, Supabase API credentials, and PostgreSQL credentials in n8n.
- Configure Trigger: Set up the 'When chat message received' node to receive incoming messages.
- Agent Configuration: Configure the 'RAG Agent' node with your desired OpenAI model and system message.
- Memory Configuration: Link the 'Postgres Chat Memory' node to the 'RAG Agent' to enable conversation history.
- Vector Store Configuration: Connect the 'Supabase Vector Store' node to the 'RAG Agent' to provide access to your knowledge base.
- Data Ingestion (Optional): If you need to populate the vector store, use the 'Download File' (e.g., from Google Drive), 'Default Data Loader', 'Embeddings OpenAI', and 'Add to Supabase' nodes to process and store your documents.
Apps Used
Workflow JSON
{
"id": "04fc5782-1380-4b4c-a5e9-8fad54ef5ac5",
"name": "RAG Agent with Memory and Supabase Vector Store",
"nodes": 0,
"category": "AI Automation",
"status": "active",
"version": "1.0.0"
}Note: This is a sample preview. The full workflow JSON contains node configurations, credentials placeholders, and execution logic.
Get This Workflow
ID: 04fc5782-1380...
About the Author
SaaS_Connector
Integration Guru
Connecting CRM, Notion, and Slack to automate your life.
Statistics
Verification Info
Related Workflows
Discover more workflows you might like
RAG Agent: PDF Q&A with Supabase and OpenAI
This workflow creates a RAG (Retrieval-Augmented Generation) agent that answers questions based on a PDF document stored in Google Drive, utilizing Supabase for vector storage and OpenAI for embeddings and language generation.
Automated RAG Evaluation and Email Response Generation
This workflow automates the evaluation of AI-generated responses against ground truth data and sends automated email responses. It leverages Langchain's RAG capabilities with Supabase for data retrieval and OpenAI for embeddings, then uses Gmail for sending emails.
AI Earnings Report Analysis with Vector Databases
This n8n workflow empowers an AI agent to analyze earnings reports using Pinecone and Supabase vector databases. It leverages chat triggers and HTTP requests to query and process financial data, providing detailed insights with citations.
Automate Live Stream Chat Moderation with AI and n8n
This n8n workflow uses AI to moderate live stream chats by splitting messages, generating embeddings, querying a vector store, and responding via an agent. It logs the interactions to Google Sheets for review.
AI-Powered Website Planning and Creation Automation
Automate website planning and creation with this n8n workflow. It uses Airtop.ai to open websites, scrape details, generate PRDs, and even create or edit websites, streamlining the development process.
AI-Powered n8n Workflow Builder from Natural Language
This workflow leverages AI to convert natural language requests into functional n8n workflow JSON. It uses Langchain agents and tools to understand your prompt and construct the workflow.