Production-Ready AI Voice & Chat Agent for Real Estate Lead Qualification
RealtyAssistant is an advanced AI system designed to qualify real estate leads through natural voice conversations and intelligent chat interactions. Unlike simple chatbots, it features a fail-safe architecture, dynamic accent understanding, and real-time property search capabilities.
It is designed to run on a cheap VPS (Ubuntu) or local Windows machine with a single "One-Click" setup command.
- 🎙️ Natural Voice Interface:
- Handles Indian accents (Noida, Gurugram, etc.) via fuzzy matching.
- "Rich Input" processing: "I want a 3 BHK in Noida under 50 lakhs" is understood instantly.
- Voice-to-Text via local Whisper engine.
- 🛡️ Fail-Safe Leads Database:
- Auto-Healing: Automatically detects and repairs database corruption.
- Zero-Loss: Falls back to in-memory processing if disk fails, ensuring leads are captured in logs.
- Structured Storage: SQLite database tracking every conversation detail.
- 🔍 Live Intelligence:
- Scrapes
realtyassistant.inin real-time to show actual property listings. - Hybrid LLM (Ollama + Gemini Fallback) for robust understanding.
- Scrapes
- 🚀 Production Ready:
- Runs on Port
20000(configurable). - Includes Nginx configs and systemd service files.
- One-click deployment scripts for Windows and Linux.
- Runs on Port
Double-click run_project.bat or run in terminal:
run_project.batThis script automatically:
- ✅ Checks for Python 3.10+.
- ✅ Creates a virtual environment.
- ✅ Installs all dependencies.
- ✅ Frees up Port 20000 if occupied.
- ✅ Starts the Server.
Access: http://localhost:20000/demo
sudo bash run_project.shThis script automatically:
- ✅ Installs System Dependencies (Python, Nginx, etc.).
- ✅ Sets up the AI Environment.
- ✅ Configures Nginx Reverse Proxy.
- ✅ Installs it as a background Systemd Service.
Access:
https://<your-ip>/task1/demo
For a deep dive into the system design, fail-safe mechanisms, and voice pipeline, see ARCHITECTURE.md.
┌──────────────┐ ┌─────────────┐ ┌───────────────┐
│ Voice/Chat │ │ Analysis │ │ Persistence │
│ Interface │ ───> │ Engine │ ───> │ Database │
└──────────────┘ └──────┬──────┘ └───────┬───────┘
│ │
┌──────▼──────┐ ┌───────▼───────┐
│ Property │ │ Fail-Safe │
│ Searcher │ │ Mechanism │
└─────────────┘ └───────────────┘
The application is configured via .env. A default one is created automatically if missing.
| Variable | Default | Description |
|---|---|---|
PORT |
20000 |
Application Port |
GEMINI_API_KEY |
- | Required for AI fallback |
DATABASE_URL |
sqlite:///data/leads.db |
Main database path |
OLLAMA_BASE_URL |
http://localhost:11434 |
Local LLM URL |
VOICE_PROVIDER |
twilio |
twilio or vapi |
- GET
/demo- Chat Widget Interface - GET
/voice- Voice Testing Interface - GET
/leads- Admin Dashboard for Leads
- POST
/api/qualify- Submit lead data - POST
/api/leads- Create lead entry - GET
/api/leads- Fetch lead history - POST
/api/voice/process- Handle audio chunk
- Navigate to http://localhost:20000/voice.
- Click the Microphone button.
- Speak naturally. Try saying:
"Hi, I am looking for a 3 BHK apartment in Noida Extension."
- The system will:
- Recognize your speech.
- Extract "3 BHK", "Apartment", "Noida Extension".
- Skip redundant questions and verify your details.
- Search for properties.
MIT License. Built with ❤️ by dmj.one.