This project is an AI-powered auto-reply bot that reads messages from a messaging app screen, sends them to an AI model (Groq API), and automatically replies using keyboard and mouse automation.
It uses screen automation to copy messages and generate intelligent responses using Llama 3 (Groq API).
- 📋 Automatically reads latest message from screen
- 🤖 Sends message to AI (Llama 3 via Groq API)
- 💬 Generates smart replies instantly
- 📤 Auto-pastes and sends response
- 🔁 Runs continuously in a loop
- 🧠 AI-powered conversation handling
- Python 3
- pyautogui (mouse/keyboard automation)
- pyperclip (clipboard handling)
- time module
- Groq API (Llama 3 model)
AI-Auto-Reply-Bot/
│── bot.py
│── README.md
Make sure Python 3 is installed.
pip install pyautogui pyperclip groqThis project uses Groq API.
Replace your API key in the code:
client = Groq(api_key="YOUR_API_KEY_HERE")- Open your messaging app (WhatsApp Web / Messenger / etc.)
- Adjust screen coordinates in the code (IMPORTANT)
- Run the script:
python bot.py👉 You must adjust cursor coordinates according to your screen and messaging app position
Example in code:
pyautogui.moveTo(1828, 880)
pyautogui.dragTo(1825, 730, duration=0.4, button="left")
pyautogui.click(1715, 950)- Your screen resolution
- Your WhatsApp/Web chat position
- Your chat input box position
If coordinates are wrong, the bot will not work properly.
- Bot waits for new message
- Selects last message using mouse drag
- Copies text to clipboard
- Sends text to Groq AI (Llama 3 model)
- Receives AI response
- Copies reply and pastes it into chat
- Sends message automatically
- Repeats the cycle
Delays are added to:
- Prevent spam detection
- Allow message loading
- Ensure stable automation
- Add WhatsApp Web API instead of screen automation
- Improve message detection using OCR
- Add GUI control panel
- Add memory for conversation history
- Multi-chat support
This project uses screen automation, so:
- It may break if UI changes
- It depends on screen resolution
- Use responsibly and avoid spam usage
Ritesh Jagtap
GitHub: https://github.com/Ritexh5090
⭐ If you like this project, consider giving it a star on GitHub!