An advanced documentation crawler and RAG agent powered by Pydantic AI and Supabase. It crawls documentation sites, stores content in a vector database, and intelligently retrieves and analyzes relevant information to answer user queries.
- 🚀 Automated Documentation Crawling: Fetches and chunks documentation content.
- 📚 Vector Database Storage: Uses Supabase for scalable and efficient document retrieval.
- 🔍 Semantic Search with OpenAI Embeddings: Enables intelligent documentation lookup.
- 🤖 RAG-based Q&A System: Retrieves and generates answers from stored documentation.
- 💾 Preserves Code Blocks & Content Structure: Keeps formatting intact.
- 🎨 Modern UI with Streamlit: Interactive querying experience.
- Python 3.11+
- Supabase account & database
- OpenAI API Key
- Streamlit (for UI-based querying)
Clone the repository
Create a virtual environment and install dependencies:
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -r requirements.txtRun the SQL script to create the required tables:
- Navigate to Supabase's SQL Editor.
- Paste and execute the contents of
site_pages.sql. - This will:
- Create necessary tables.
- Enable vector similarity search.
To fetch and store documentation:
python crawl_gptscript_docs.py- Crawls the documentation website.
- Chunks content while preserving code blocks and paragraph boundaries.
- Generates embeddings and stores them in Supabase.
To launch the interactive UI:
streamlit run streamlit_ui.pyThis project is adapted from ottomator-agents. A huge thanks to the original developers for their contributions to the documentation crawling and RAG agent framework.
