A proactive AI companion bot for Telegram designed to respect user attention via a "Gatekeeper" logic.
- Gatekeeper Logic: Checks if the user is "muted" before sending messages.
- Message Stacking: Accumulates messages when muted and delivers a summary upon unmuting.
- Pulse Check: A periodic background job simulating proactive AI behavior.
Ensure you have Python installed.
pip install -r requirements.txtCreate a .env file in the root directory with your Telegram credentials:
BOT_TOKEN=your_bot_token_here
ALLOWED_USER_ID=123456789
OLLAMA_MODEL=llama3.2- BOT_TOKEN: Obtained from BotFather.
- ALLOWED_USER_ID: Your personal Telegram ID (can be found via userinfobot).
If you do not know your ID, run the bot with the discovery flag:
python src/main.py --userid-discoveryThen send /start to the bot, and check your terminal for the ID.
python src/main.py/start- Initialize the bot./mute- Enable "Stacking Mode" (silence notifications)./unmute- Disable silence and receive a summary of missed updates.
To run the unit tests:
pytest