π― Learning Goals
Understand how Supabase can serve as both a Postgres database and a vector store.
Learn the difference between structured data, memory tables, and vector embeddings.
Be able to set up 3 Supabase tables for real-world AI workflows.
1. Supabase Overview
What is Supabase?
 Supabase is an open-source alternative to Firebase, built on top of PostgreSQL. It gives you:
A SQL database
Authentication
File storage
APIs out of the box
Plus, a Postgres Vector extension that makes it a full vector store.
Why Supabase in this tutorial?
β All-in-one platform β Instead of juggling Pinecone for vectors, Firebase for auth, and Postgres for structured data, Supabase covers everything in one place.
β Free tier friendly β Perfect for learners and small projects (Pinecone and others usually limit or start charging fast).
β Postgres foundation β You can use normal relational queries (structured data) side by side with vector search (semantic data). Pinecone/Qdrant are only vector databases β youβd still need another database for structured data.
β Production-ready β Scales well, open source, and trusted by startups building real products.
β Lower friction β One dashboard, one connection, fewer moving parts.
When to consider Pinecone or Qdrant?
If your project handles billions of embeddings at scale (e.g., enterprise search engines).
If you want advanced vector-specific features (like hybrid search, HNSW optimizations, or distributed scaling).
But for 90% of practical AI projects (like travel assistants, chatbots, internal tools), Supabase is more than enough.
A. Create Account to Supabase
Go to https://supabase.com/ and create an account
Create your first project, make sure to remember your password
B. Postgres as AI Agent Memory
Relying on session ID with simple memory will make the AI Agent forget everything when session is reset
Postgers memory setup inside Supabase
Add memory to AI Agent and select Postgres
In Supabase click Connect
Look for Transaction Pooler
Click View parameters
Copy all credentials, the password is the one you input in creating the project
C. Relational Database (Structured Data)
So far structured data is the best way to retrieve correct information
It is best to have structured data as much as possible
Create Table
Click the + sign then click Create a table
Fill up the Table Name, Description and add the Columns needed with its schema
Then click Save
Connect to n8n as AI Agent Tool
Just add Postgers Tool
Use the same credentials and set the operation that you need
D. Vector Database (Tutorial in Module 2)
What is a Vector Store?
 Imagine you put every piece of text, image, or document into a 3D space. Each data point is converted into a vector (a list of numbers that represent meaning). In this space:
Similar things are placed closer together.
Different things are farther apart.
A query is like a glowing dot you drop in the space. The system looks around and pulls the nearest neighbors (the most similar data points).
Vector Store vs. Vector Database
Vector Store (like the Postgres vector extension in Supabase):
Basically a database + vector similarity search.
Good for projects where you want normal SQL data + semantic search together.
Example: βGive me this customerβs last 5 support chatsβ AND βfind documents similar to this question.β
Vector Database (like Pinecone, Qdrant, Weaviate):
Specialized just for vectors.
Optimized for scaling to billions of embeddings and advanced search (like hybrid keyword + semantic).
But usually, you still need another DB for structured data (customers, orders, etc).
2. AI Models
OpenAI (Paid)
Gemini (Free Tier)
Refer to Beginner Course Module 2 on how to connect the AI Models to n8n
3. Tavily (Free Tier)
Refer to Beginner Course Module 4.3 on how to connect Tavily to n8n
4. n8n Setup
Refer to Beginner Course Module 1 on different ways to install n8n locally (Free) or use the cloud version (Paid)