Telegram reminder bot built with PocketFlow + APScheduler.
- Never commit secrets. No
.envfiles are loaded by code in this repo. - Never commit user data. Runtime storage lives under
data/and is gitignored.
- Python 3.13+
- Poetry
You provide these locally (shell, systemd, your own .env tooling, etc.):
TELEGRAM_BOT_TOKEN(required)DEEPSEEK_API_KEY(required; used by the agent LLM calls)
Optional:
DEFAULT_TIMEZONE(defaults to UTC if you don’t set a user timezone)
poetry install --no-rootpoetry run python main.py- Create an env file (recommended):
Create /etc/reminder-bot.env (permissions 0600) with:
TELEGRAM_BOT_TOKEN=... # required
DEEPSEEK_API_KEY=... # required
# DEFAULT_TIMEZONE=UTC # optional- Create the systemd unit:
Create /etc/systemd/system/reminder-bot.service:
[Unit]
Description=Telegram Reminder Bot
After=network.target
[Service]
Type=simple
User=your_username
WorkingDirectory=/path/to/reminder-bot
EnvironmentFile=/etc/reminder-bot.env
ExecStart=/path/to/poetry run python main.py
Restart=on-failure
RestartSec=10
[Install]
WantedBy=multi-user.target- Enable + start:
sudo systemctl daemon-reload
sudo systemctl enable reminder-bot
sudo systemctl start reminder-bot
# logs
journalctl -u reminder-bot -fNotes:
- Ensure
WorkingDirectorypoints at the repo root so relative paths (likedata/) resolve correctly. - Keep secrets out of the unit file; use
EnvironmentFile=.
main.py— Telegram bot entry pointflow.py/nodes.py/tools.py— PocketFlow agent logicutils/— scheduler + storageutlis/— LLM call helper (kept to match superhuman naming)data/— runtime storage (gitignored)
- Storage files are created at runtime under
data/. - If you deploy this, ensure the working directory is the repo root so relative paths resolve correctly.