| --- |
| title: Template Final Assignment |
| emoji: 🕵🏻♂️ |
| colorFrom: indigo |
| colorTo: indigo |
| sdk: gradio |
| sdk_version: 5.25.2 |
| app_file: app.py |
| pinned: false |
| hf_oauth: true |
| |
| hf_oauth_expiration_minutes: 480 |
| --- |
| |
|
|
| # 🧠 AI RAG Agent - Final Project (LangGraph + Supabase) |
|
|
| This project is a Retrieval-Augmented Generation (RAG) agent built using **LangGraph**, **LangChain**, and **Supabase** as a vector store. |
| It allows users to query a custom knowledge base hosted in their own Supabase instance. |
|
|
| --- |
|
|
| ## 📋 Features |
|
|
| - 🔎 RAG: Use your Supabase + FAISS for retrieval |
| - 🤖 LLM-powered: Gemini or other models via LangChain |
| - 🌐 Optional web search fallback (Tavily or Arxiv) |
| - 🔒 Keep your API keys secure with private `.env` |
|
|
| --- |
|
|
| ## 🚀 How to Use |
|
|
| ### 1. Clone this Space |
|
|
| Click the **"Duplicate Space"** button at the top-right to create your own copy. |
|
|
| --- |
|
|
| ### 2. Configure `.env` Variables |
|
|
| Inside your cloned Space, go to the **"Files"** tab, create a file named `.env`, and add the following variables: |
|
|
| ```env |
| SUPABASE_URL=your_supabase_url |
| SUPABASE_SERVICE_KEY=your_supabase_service_key |
| GOOGLE_API_KEY=your_google_api_key |
| TAVILY_API_KEY=your_tavily_api_key # optional if using Tavily tool |
| |
| |
| Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference |