Zeron is a production-ready Telegram AI assistant built with Python, Claude, and SQLite.
It is designed for real-world usage, portfolio showcase, and rapid deployment. You can run it locally in minutes and deploy it on worker-friendly platforms with minimal setup.
Zeron is useful when you want one bot that combines AI chat, productivity, media tools, and monetization in a single clean architecture.
Key reasons to use it:
- AI-first experience: natural chat powered by Claude with persistent context
- Productivity built-in: tasks, reminders, summaries, and daily digest
- Creator-ready: image/video generation and PDF Q&A workflows
- Business-ready: subscription model, referral credits, analytics, admin tools
- Secure-by-default: sanitization, injection checks, moderation, and rate limiting
- Resume-friendly: clear codebase, Dockerized deployment path, practical feature depth
For users:
- Fast answers and assistant-like conversations in Telegram
- One place for chat, tasks, document Q&A, and media generation
- Better daily planning with scheduled digest updates
For developers/builders:
- Modular handler architecture that is easy to extend
- SQLite persistence for quick setup and no external DB requirement
- Feature flags and env-based configuration for flexible deployment
- Strong base for SaaS bot ideas (subscriptions, referrals, admin metrics)
For portfolio/resume:
- Demonstrates backend design, API integrations, async bot workflows, security practices, and production deployment skills in one project
- Claude chat with persistent conversation history
- Photo analysis (multimodal)
- PDF Q&A and optional voice transcription
- Task manager with reminders
- Google Sheets, Drive, and Gmail integration
- Image and video generation (Stitch)
- Telegram Stars subscriptions + referral system
- Daily digest scheduling
- Outbound webhooks and optional inbound receiver
- Admin commands for stats and broadcasting
- Python 3.11+
- python-telegram-bot
- Anthropic API
- SQLite
- Optional: OpenAI, Google APIs, OpenWeather
pip install -r requirements.txtcp .env.example .envSet at least:
TELEGRAM_TOKEN=your_botfather_token
ANTHROPIC_API_KEY=your_anthropic_api_key
ADMIN_USER_IDS=123456789python bot.pyIf WEBHOOK_URL is empty, Zeron runs in polling mode.
Basic flow:
- Start chat with
/start - Ask anything in normal text
- Use
/task,/tasks,/donefor productivity - Use
/imageor/videofor media generation - Upload a PDF and ask questions
- Use
/digest 08:00for daily AI summary
Useful commands:
/start,/help,/clear,/summarize/task <text>,/tasks,/done <id>,/deltask <id>/image <prompt>,/video <prompt>/sheets [range],/drive <query>,/gmail/subscribe,/referral/digest,/webhook,/clearpdf/stats,/broadcast(admin)
This bot is ideal for worker-style deployment in polling mode.
Included files:
koyeb.yamlDockerfile.dockerignore
TELEGRAM_TOKENANTHROPIC_API_KEYADMIN_USER_IDS
ENCRYPTION_KEYWEBHOOK_SECRET_KEY
ALLOWED_USER_IDSOPENAI_API_KEYOPENWEATHER_API_KEYGOOGLE_CREDENTIALS_PATHGOOGLE_SHEET_IDSTITCH_API_URLENABLE_INCOMING_WEBHOOKSINCOMING_WEBHOOK_PORT
Important:
- Keep
WEBHOOK_URLempty for polling mode.
| Variable | Required | Purpose |
|---|---|---|
| TELEGRAM_TOKEN | Yes | Telegram bot token from BotFather |
| ANTHROPIC_API_KEY | Yes | Claude API key |
| ADMIN_USER_IDS | Yes | Comma-separated Telegram IDs for admin commands |
| ALLOWED_USER_IDS | No | Optional access allowlist |
| OPENAI_API_KEY | No | Required for voice transcription |
| OPENWEATHER_API_KEY | No | Required for weather tool |
| GOOGLE_CREDENTIALS_PATH | No | Google service account JSON path |
| GOOGLE_SHEET_ID | No | Default Google Sheet ID |
| STITCH_API_URL | No | Stitch endpoint override |
| WEBHOOK_URL | No | Enables webhook mode when set |
| PORT | No | Webhook mode port (default 8443) |
| ENCRYPTION_KEY | No | Enables encrypted storage |
| WEBHOOK_SECRET_KEY | No | HMAC secret for webhook signatures |
| ENABLE_INCOMING_WEBHOOKS | No | Enables inbound webhook server |
| INCOMING_WEBHOOK_PORT | No | Inbound webhook server port (default 8080) |
- Input sanitization for user content
- Prompt-injection pattern detection
- Content moderation checks
- Tier-aware rate limiting
- Optional user allowlist
telegram-bot-v4/
bot.py
database.py
middleware.py
security.py
retry.py
encryption.py
handlers/
ai_handler.py
admin_handler.py
digest_handler.py
google_handler.py
payment_handler.py
pdf_handler.py
plugin_handler.py
stitch_handler.py
task_handler.py
voice_handler.py
webhook_handler.py
-
Error:
TELEGRAM_TOKENis missing or invalid- Generate/revoke token in BotFather, update
.env, restart.
- Generate/revoke token in BotFather, update
-
Error: bot starts but AI responses fail
- Verify
ANTHROPIC_API_KEYis valid.
- Verify
-
Error: voice/PDF premium flow not working
- Check optional feature keys and subscription logic.
MIT
- python-telegram-bot
- Anthropic Claude API
- OpenAI Whisper
- pypdf