WhatsApp-first AI business automation for Indian small businesses. 100% FREE to run.
Customer WhatsApp pe message karta hai → AI Hindi mein reply karti hai → Appointment book hoti hai → Payment collect hota hai. Sab autopilot pe.
Service
Provider
Cost
AI Brain
Groq (LLaMA 3.1 70B)
FREE
AI Fallback
DeepSeek
~₹0.07/query
Voice STT
Groq Whisper
FREE
Voice TTS
Google Cloud TTS
FREE (1M chars/month)
Database
Neon.tech PostgreSQL
FREE (512MB)
Knowledge Base
In-memory + disk
FREE
Hosting
Railway.app / Render
FREE tier
WhatsApp
Meta Cloud API
FREE (1000 chats/month)
Step 1: Get FREE API Keys (5 min)
Step 2: Deploy on Railway (FREE)
Push code to GitHub
Go to railway.app → New Project → Deploy from GitHub
Add environment variables (from .env.example)
Done! Get your URL: https://your-app.railway.app
Meta Developer Dashboard → WhatsApp → Configuration
Webhook URL: https://your-app.railway.app/webhook
Verify Token: same as WHATSAPP_VERIFY_TOKEN in env
Subscribe to: messages
OR: Deploy on Render (FREE)
Push to GitHub
render.com → New Web Service → Connect repo
It auto-detects render.yaml — just add env vars
Done!
git clone < your-repo>
cd OneClickAgent
cp .env.example .env # Fill in your keys
npm install
npx prisma generate
npx prisma migrate dev
npm run dev
Customer WhatsApp Message
↓
Webhook (Express)
↓
Agent Router (intent detection)
↓
┌─────────────┬──────────┬──────────────┐
│ Receptionist │ Sales │ Support │
│ Agent │ Agent │ Agent │
└──────┬───────┴────┬─────┴──────┬───────┘
↓ ↓ ↓
AI Engine (Groq FREE → DeepSeek fallback)
↓
Knowledge Base (in-memory, persisted to disk)
↓
WhatsApp Reply (text + voice + buttons)
Method
Endpoint
Description
POST
/api/auth/register
Register business
POST
/api/auth/login
Login → JWT token
GET
/api/auth/profile
Get profile
Method
Endpoint
Description
GET
/api/dashboard/stats
Analytics overview
GET
/api/dashboard/conversations
List conversations
GET
/api/dashboard/conversations/:id
Conversation + messages
GET
/api/dashboard/customers
Customer list + search
GET
/api/dashboard/bookings
All bookings
GET
/api/dashboard/payments
All payments
GET
/api/dashboard/engine
AI engine health
Operations (JWT required)
Method
Endpoint
Description
POST
/api/payments/create-link
Generate payment link
PATCH
/api/bookings/:id/cancel
Cancel booking
PATCH
/api/bookings/:id/reschedule
Reschedule booking
POST
/api/broadcast/send
Bulk WhatsApp broadcast
POST
/api/broadcast/follow-ups
Auto follow-ups
Knowledge Base (JWT required)
Method
Endpoint
Description
POST
/api/knowledge/upload
Upload PDF/Excel/Word
POST
/api/knowledge/text
Add text knowledge
GET
/api/knowledge/search?q=...
Search knowledge
DELETE
/api/knowledge
Clear all
Agent
Handles
Trigger Keywords
Receptionist
Greet, route, book appointments
hi, namaste, book, appointment
Sales
Products, pricing, payment links
price, kitna, pay, Rs
Support
Complaints, escalation
problem, dikkat, refund, kharab
Auto-detects intent in Hindi, Hinglish, English, Tamil, Telugu .
Human handoff triggers when AI confidence < 30%.
Groq Whisper → Customer voice note → text (FREE tier)
Google TTS → AI reply → voice message (FREE 1M chars/month)
gTTS fallback → Unlimited free TTS (Python)
Auto voice reply when customer sends voice note
OneClickAgent/
├── src/
│ ├── index.js # Express server
│ ├── config/index.js # Configuration
│ ├── engine/EngineService.js # AI brain (Groq/DeepSeek)
│ ├── agents/
│ │ ├── AgentRouter.js # Intent → Agent
│ │ ├── ReceptionistAgent.js
│ │ ├── SalesAgent.js
│ │ └── SupportAgent.js
│ ├── services/
│ │ ├── WhatsAppService.js # Meta Cloud API
│ │ ├── VoiceService.js # Whisper + TTS
│ │ ├── BookingService.js # Google Calendar
│ │ ├── PaymentService.js # Razorpay + Stripe
│ │ ├── KnowledgeService.js # Vector search
│ │ └── BroadcastService.js # Bulk + cron
│ ├── routes/ # 7 route files
│ ├── middleware/auth.js # JWT auth
│ └── utils/logger.js
├── prisma/schema.prisma # 6 DB tables
├── railway.json # Railway deploy config
├── render.yaml # Render deploy config
├── docker-compose.yml # Local Docker setup
├── Dockerfile
└── .env.example
🧪 Test Results: 33/33 Passed
Engine: 10/10 ✅ | Agents: 10/10 ✅ | WhatsApp: 4/4 ✅
Knowledge: 4/4 ✅ | Auth: 4/4 ✅ | API: 1/1 ✅
MIT