An AI-powered conversational telecalling assistant that automates and handles voice call workflows in real-time. It integrates a Next.js web application with a Flask voice-processing server to initiate automated calls, query business knowledge bases, and log transcripts directly to a MongoDB database.
Virtual Telecaller acts as an autonomous support representative. When a call is placed, it establishes a two-way audio stream via Twilio, processes voice input using speech-to-text, queries an LLM configured with custom business context, and converts the LLM's response back to audio for the caller.
- Interactive Dashboard: Initiate voice calls, configure system prompts, and manage call queues directly from the UI.
- Retrieval-Augmented Generation (RAG): Uses LangChain/LangGraph and Pinecone vector database to supply the AI with accurate, real-time business context.
- Real-time Call Analytics: Stores call logs, status events, and complete transcripts in MongoDB.
- Production-Ready Webhooks: Ready for local development with
ngrokor production deployment on platforms like Render.
- Frontend: Next.js (TypeScript, Tailwind CSS, Clerk Authentication)
- Backend: Flask, Gunicorn, Gevent
- AI & Orchestration: LangChain, LangGraph, Groq (Llama-3.3-70b-versatile)
- Databases: Pinecone (Vector database for RAG context), MongoDB (Call analytics & history)
- Communication APIs: Twilio Voice API
Make sure you have the following installed:
- Python 3.10+
- Node.js 18+
- ngrok (for local tunneling)
- Active developer accounts on:
- Twilio (with a voice-enabled phone number)
- Groq Console
- Pinecone
- MongoDB Atlas
- Clerk
-
Navigate to the
backend/directory:cd backend -
Create and activate a Python virtual environment:
python3 -m venv venv source venv/bin/activate -
Install the required dependencies:
pip install -r requirements.txt -
Configure the environment variables:
- Copy the
.env.examplefile to.env:cp .env.example .env - Open
.envand fill in your API credentials:- MongoDB Note: If your password contains special characters (like
@), make sure to URL-encode them (e.g., replace@with%40).
- MongoDB Note: If your password contains special characters (like
- Copy the
-
Navigate to the
frontend/directory:cd frontend -
Install the Node packages:
npm install -
Configure the environment variables:
- Copy the
.env.examplefile to.env:cp .env.example .env - Fill in your Clerk keys, MongoDB URI, and set the backend URL pointing to your local Flask server:
NEXT_PUBLIC_BACKEND_URL=http://localhost:5000
- Copy the
Follow these steps to run the application locally for testing:
Since Twilio needs to send HTTP requests (Webhooks) back to your local machine when the call connects, you must expose your local port 5000 to the internet.
- Open a new terminal and run:
ngrok http 5000 - Copy the forwarding HTTPS URL generated by ngrok (e.g.,
https://xxxx-xxxx.ngrok-free.dev). - Update
backend/voice_call.py(lines 45–46) to point to your new ngrok endpoints:hosted_url_call = "https://xxxx-xxxx.ngrok-free.dev/voice" hosted_url_call_status = "https://xxxx-xxxx.ngrok-free.dev/call_status"
(Note: Whenever you restart ngrok on a free plan, you will get a new URL and must update these lines.)
- Switch to your backend terminal (ensure the virtual environment is active).
- Run the application using the WSGI server:
gunicorn -k geventwebsocket.gunicorn.workers.GeventWebSocketWorker -w 1 -b 0.0.0.0:5000 voice_call:app
- Switch to your frontend terminal.
- Run the Next.js development server:
npm run dev - Open your browser and navigate to
http://localhost:3000.
- Log in via Clerk on the frontend.
- Head to the Dashboard / Make Call section.
- Input your target customer context:
- Business Name & Business Info (for the AI context).
- System Prompt (how the AI should introduce itself and respond).
- Source Phone Number (your Twilio number, formatted as
+1XXXXXXXXXX). - Destination Phone Number (your mobile number to receive the call, formatted as
+91XXXXXXXXXX).
- Click Initiate Calls.
- Receive the call on your phone, talk to the virtual assistant, and watch the conversation transcripts update in real-time in the web UI!