# 🛒 Voice-Activated Retail Agent (AgentOne)
A "Hands-Free" operating system for retail shops designed to handle billing, inventory management, and customer ledgers (Khata) using natural voice commands.
- 🎙️ Voice Billing: Add items to cart using natural language (e.g., "Add 2 Maggi and 1 Coke"). Handles "Hinglish" and Indian accents.
- 🧠 AI-Powered Intent: Uses Google Gemini 1.5 Flash to parse complex voice commands into structured JSON actions.
- 🔍 Fuzzy Search: Finds products even if pronunciation is imperfect (e.g., "Magi" matches "Maggi Noodles") using PostgreSQL Trigrams.
- 📉 Live Dashboard: A modern React + Tailwind UI showing real-time sales trends, low stock alerts, and ledger stats.
- 📒 Digital Khata (Ledger): Manage customer credits and payments via voice (e.g., "Rahul paid 500 rupees").
- 📄 Automated Invoicing: Generates downloadable PDF receipts automatically upon checkout.
- Frontend: React.js, Vite, Tailwind CSS, Recharts
- Backend: Python, FastAPI, SQLAlchemy
- Database: PostgreSQL (with
pg_trgmextension) - AI & Voice: Google Gemini API, SpeechRecognition, gTTS (Google Text-to-Speech)
- Tools: ReportLab (PDF), TheFuzz (Matching)
- Python 3.10+
- Node.js & npm
- PostgreSQL
- Create a Postgres database named
shop_voice_db. - Run the SQL commands to create
products,customers, andtransactionstables. - Enable the extension:
CREATE EXTENSION pg_trgm;
# Clone the repo
git clone [https://github.com/YOUR_USERNAME/voice-shop-agent.git](https://github.com/YOUR_USERNAME/voice-shop-agent.git)
cd voice-shop-agent
# Install Python dependencies
pip install -r requirements.txt
# Create .env file
# Add: DATABASE_URL=postgresql://user:pass@localhost/shop_voice_db
# Add: GEMINI_API_KEY=your_api_key
# Run Server
python -m uvicorn main:app --reload