AI Agent & Telegram Notification Bot
An automated AI-driven Telegram notification bot integrated with MQTT message brokers and database monitoring to deliver real-time operational alerts at RS Pertamina Dumai.
Real-Time Healthcare Notifications & AI Agent Integration
Critical healthcare environments require instant notifications. At RS Pertamina Dumai (RSPD), delays in dispatching task queues or pharmacy notifications directly affect medical services. The goal was to build a robust, zero-latency notification infrastructure.
The Solution
- MQTT Telemetry Integration: Configured an MQTT message broker to capture database events and broadcast updates securely.
- AI-Driven Telegram Interface: Integrated a custom LLM-powered assistant (Gemini/OpenClaw AI) to let administrators query metrics, patient queues, and service logs in natural language.
- Daemon Service Stability: Deployed the solution as a systemd service (
gemini-bot) with ALSA driver fault-handling, ensuring 24/7 background persistence and automated recovery.
Technical Architecture
- Language & Runtime: Python daemon running on Linux.
- Protocol & Queues: MQTT broker for lightweight, low-overhead messaging.
- Alert Channels: Telegram Bot API with granular user/role access verification.
- Database Engine: MySQL/SQLite change tracking scripts (
permintaan_semua.py).
Key Outcomes
- Immediate Response: Reduced notification delay from 15 minutes to under 2 seconds.
- Enhanced Visibility: Real-time updates delivered instantly to doctor and coordinator group chats.
- High Availability: Automated service daemon restart hooks, achieving 99.9% uptime.
Project Info
Live Website
Visit Live Website
Technologies Used
AI Agent
Telegram Bot
MQTT
Python