An AI-powered multilingual voice calling agent built with a FastAPI Python backend, Twilio for telephony, MongoDB for data persistence, and a JavaScript/TypeScript frontend — enabling automated, intelligent phone conversations across multiple languages.
The MCD Multilingual Agent automates voice-based communication in multiple languages. It uses Twilio to handle real phone calls, a FastAPI backend to process and route conversations, and an AI layer to understand and respond intelligently — making it ideal for customer support, outreach, and multilingual engagement workflows.
Key Features:
- 📞 Automated outbound/inbound phone calls via Twilio
- 🌍 Multilingual voice conversation support
- ⚡ FastAPI backend with async performance
- 🗄️ MongoDB for call logs and session data
- 🖥️ JavaScript/TypeScript frontend UI
- 🔐 Secure
.env-based configuration
| Layer | Technology |
|---|---|
| Backend | Python, FastAPI, Uvicorn |
| Frontend | JavaScript, TypeScript, CSS, HTML |
| Voice & Telephony | Twilio |
| Database | MongoDB (PyMongo) |
| Configuration | python-dotenv |
Language breakdown:
- JavaScript — 81.2%
- TypeScript — 9.4%
- Python — 7.7%
- CSS — 1.5%
- HTML — 0.2%
Make sure you have the following installed:
- Python 3.8+
- Node.js 16+ & npm
- Git
- A Twilio account with an active phone number
- A MongoDB instance (local or MongoDB Atlas)
git clone https://github.com/sanyogitasinghbgm-spec/MCD-MULTILINGUAL-AGENT.git
cd MCD-MULTILINGUAL-AGENT# Create and activate a virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install Python dependencies
pip install -r requirements.txt# Navigate to the frontend app directory
cd app
# Install Node.js dependencies
npm install# Navigate to the AI calling agent directory
cd AI-Calling-Agent
# Install dependencies if applicable
npm installCreate a .env file in the root directory with the following:
# Twilio credentials
TWILIO_ACCOUNT_SID=your_twilio_account_sid
TWILIO_AUTH_TOKEN=your_twilio_auth_token
TWILIO_PHONE_NUMBER=+1XXXXXXXXXX
# MongoDB connection URI
MONGODB_URI=mongodb+srv://<username>:<password>@cluster.mongodb.net/mcd_agent
# App configuration
BASE_URL=http://localhost:8000
PORT=8000
⚠️ Never commit your.envfile to version control. It is already covered by.gitignore.
Start the FastAPI backend:
uvicorn main:app --reload --port 8000API will be available at: http://localhost:8000
Start the frontend (in a separate terminal):
cd app
npm run devFrontend will be available at: http://localhost:3000
curl -X POST http://localhost:8000/call \
-H "Content-Type: application/json" \
-d '{
"to": "+91XXXXXXXXXX",
"language": "hi",
"message": "नमस्ते, क्या मैं आपकी सहायता कर सकता हूँ?"
}'Response:
{
"status": "call initiated",
"call_sid": "CAxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"language": "hi"
}curl -X POST http://localhost:8000/call \
-H "Content-Type: application/json" \
-d '{
"to": "+1XXXXXXXXXX",
"language": "en",
"message": "Hello! How can I assist you today?"
}'curl http://localhost:8000/callsResponse:
[
{
"call_sid": "CAxxxxxxxxxxxxxxxx",
"to": "+91XXXXXXXXXX",
"language": "hi",
"status": "completed",
"duration": "45s",
"timestamp": "2026-03-28T10:30:00Z"
}
]- Open
http://localhost:3000in your browser. - Enter the recipient's phone number.
- Select the preferred language from the dropdown.
- Click Start Call — the agent will dial the number and carry out the conversation.
MCD-MULTILINGUAL-AGENT/
├── AI-Calling-Agent/ # Core AI calling logic & Twilio webhook handlers
├── app/ # Frontend (JavaScript / TypeScript / CSS / HTML)
├── .gitignore # Git ignored files (includes .env)
├── requirements.txt # Python dependencies
└── README.md
The agent supports multilingual voice interactions. Language support depends on your configured Twilio TTS/STT settings. Commonly supported languages include:
| Language | Code |
|---|---|
| English | en |
| Hindi | hi |
| Spanish | es |
| French | fr |
| German | de |
| Method | Endpoint | Description |
|---|---|---|
POST |
/call |
Initiate an outbound call |
GET |
/calls |
Retrieve all call logs |
GET |
/calls/{call_sid} |
Get details of a specific call |
POST |
/webhook/voice |
Twilio voice webhook handler |
Contributions, issues and feature requests are welcome! Feel free to open a pull request or issue.
This project is open source. See LICENSE for details.