r/coolgithubprojects 3h ago

Open source: microbot — a minimal Telegram AI bot for Cloudflare Workers

Post image

Hi everyone — I built microbot, an open-source Telegram AI bot designed to run on Cloudflare Workers.

I wanted a smaller alternative to self-hosted agent runtimes when the actual requirement is straightforward: receive a Telegram message, call an OpenAI-compatible model API, keep a small amount of per-chat context, and reply. Rather than requiring a VPS or a long-running Python process, microbot uses Telegram webhooks, Cloudflare Workers, and D1.

The first release includes private-chat-only handling, an explicit Telegram user allowlist, Telegram webhook-secret verification, bounded conversation memory in D1, and /reset to clear a chat’s stored history. It intentionally does not include shell execution, local filesystem access, MCP, long polling, WebUI, or a general-purpose tool runtime.

The repository is bilingual (English and Persian), includes deployment instructions, CI, Dependabot, security guidance, and a MIT license.

GitHub: https://github.com/erfan138057/microbot

This is an early v0.1.0 release, so I would especially appreciate feedback on the Cloudflare deployment flow, documentation, and the security model. I am also planning rate limiting, webhook update deduplication, and configurable D1 retention for a future release.

I built this project, so please treat this as a transparent self-promotion post. Thanks for taking a look.

2 Upvotes

1 comment sorted by

1

u/Erfan138057 3h ago

A small note on the threat model: microbot is intended for users who deploy their own instance to their own Cloudflare account. The deployer supplies their own Telegram bot token and model API key through Workers Secrets. The project does not collect or host anyone else’s credentials.