Dialogue-Based Learning Facilitated by Real-Time AI
Samvaad is a sophisticated, full-stack Retrieval-Augmented Generation (RAG) platform that transforms static documents into interactive, dialogue-driven learning experiences. By combining state-of-the-art vector retrieval with ultra-low-latency WebRTC voice conversations, Samvaad allows you to talk to your knowledge—literally.
- Real-Time Voice Mode: Ultra-low latency voice conversations using WebRTC (Daily) and the Pipecat framework. Interact naturally with your documents using voice.
- Deep RAG Pipeline: Advanced document ingestion supporting PDF, Docx, Images (OCR), and more via LlamaParse and Docling.
- Intelligent Deduplication: Content-addressable storage (SHA-256) ensures zero-redundancy in document chunks across users.
- Multi-Model Intelligence: Optimized for Gemini, Groq, and OpenAI, with high-quality embeddings via Voyage AI.
- Neural TTS & STT: Crystal-clear speech synthesis and high-accuracy transcription using Deepgram for a human-like conversational experience.
- Verified Citations: Every claim is backed by atomic citations linked directly to your source documents to eliminate hallucinations.
- Modern Full-Stack Architecture: A high-performance FastAPI backend paired with a premium Next.js 15+ frontend.
- Framework: FastAPI (Asynchronous, High Performance)
- Package Manager: uv (Extremely fast Python package installer)
- Database: PostgreSQL with
pgvector(Vector similarity search) - Voice Framework: Pipecat & Daily
- AI/LLM: Google Gemini, Voyage AI (Embeddings), Deepgram (STT/TTS)
- Framework: Next.js 15 (App Router)
- Styling: Tailwind CSS with a custom "Void" Dark Theme
- UI Components: Shadcn/ui & Framer Motion
- Auth: Supabase (OAuth & Email)
- Python 3.11+
- Node.js 18+ & pnpm
- Supabase Account
- API Keys: Gemini, Voyage AI, Deepgram, Daily, Supabase
-
Clone the repository:
git clone https://github.com/atharva-again/samvaad.git cd samvaad -
Setup Backend:
# Install uv if you haven't curl -LsSf https://astral.sh/uv/install.sh | sh # Sync dependencies and create venv uv sync
-
Setup Frontend:
cd frontend pnpm install
Create a .env file in the root directory (for backend) and frontend/.env.local (for frontend).
Backend .env:
# AI & Pipeline
GEMINI_API_KEY=...
VOYAGE_API_KEY=...
DEEPGRAM_API_KEY=...
DAILY_API_KEY=...
# Database
DATABASE_URL=...
SUPABASE_URL=...
SUPABASE_SERVICE_ROLE_KEY=...# From the root
uvicorn samvaad.api.main:app --reload# From the frontend directory
pnpm dev# From the root
samvaad.
├── samvaad/ # Core Backend Logic
│ ├── api/ # FastAPI Routes & App Initialization
│ ├── core/ # Shared Logic (Auth, Memory, Unified Context)
│ ├── db/ # Database Models & Service Layer (pgvector)
│ ├── pipeline/ # RAG Pipeline (Ingestion, Retrieval, Deletion)
│ ├── prompts/ # AI Personas & System Prompt Engineering
│ └── utils/ # Citation Handling, Text Processing, Hashing
├── frontend/ # Next.js Application
├── tests/ # Pytest Unit & Integration Suites
├── PLANS/ # Living Architecture & Development Roadmap
└── AGENTS.md # Developer Knowledge Base for AI Assistants
This project maintains a hierarchical set of AGENTS.md files that act as a "source of truth" for code conventions, architecture, and anti-patterns.
- Root Context:
AGENTS.md - API Context:
samvaad/api/AGENTS.md - DB Context:
samvaad/db/AGENTS.md - Frontend Context:
frontend/app/AGENTS.md
This project is licensed under the MIT License - see the LICENSE file for details.