How nazeem2001/windows_control_telegram works
Windows Command Telegram Bot accepts Telegram messages and media, authorizes users, and routes commands through AI or classifier-based rule mode to local system actions or replies. AI mode uses an Ollama-backed tool agent; non-AI mode classifies commands and may request confirmation. Separate branches provide webcam/screen streaming and RDP tunneling, file and audio handling, and persistent natural-language reminders. The excerpts establish the Telegram entry point, tool adapter, agent setup, scheduler, reminder persistence, and streaming server; several feature and tool-handler internals are unsampled, so their wiring is shown only where documented or directly evidenced.
Main entry points: features.py Feature router · live_webserver.py Streaming server · scheduler_manager.py Reminder scheduler · main.py Bot entry point
Components 22
Telegram interaction
- Bot entry point
main.py - Feature router
features.py - Authorization
features.py - Media and speech
features.py
Command understanding
- Command classifier
text_classifier.joblib - AI agent and TTS
chains.py - Agent tool definitions
tool_config.py - Tool adapter
adaptors/tool_adaptor.py - Tool context
models/tool_context.py
System control
- Command handlers
features.py
Reminder service
- Reminder scheduler
scheduler_manager.py - Natural-language parser
reminder_parser.py - Reminder storage
reminder_db.py - Reminder execution
reminder_executor.py
Live streaming
- Streaming server
live_webserver.py - Stream pages
templates/index.html - Screen page
templates/screen.html
Other components
- Telegram user
- Telegram Bot API
- Ollama model
- Local system
- ngrok tunnel
Connections 28
- Telegram user → Telegram Bot API: sends updates
- Telegram Bot API → Bot entry point: delivers updates
- Bot entry point → Feature router: dispatches commands
- Bot entry point → Reminder scheduler: starts scheduler
- Feature router → Authorization: checks access
- Feature router → Command classifier: predicts command
- Feature router → AI agent and TTS: runs AI mode
- AI agent and TTS → Ollama model: queries model
- AI agent and TTS → Agent tool definitions: builds tools
- Agent tool definitions → Tool adapter: dispatches tools
- Tool adapter → Tool context: uses context
- Tool adapter → Command handlers: calls handler
- Feature router → Command handlers: executes commands
- Command handlers → Local system: controls system
- Feature router → Media and speech: handles media
- Feature router → Streaming server: starts streaming
- Command handlers → ngrok tunnel: opens tunnel
- Command handlers → Reminder scheduler: manages reminders
- Reminder scheduler → Reminder storage: loads and saves
- Reminder scheduler → Reminder execution: schedules execution
- Reminder execution → Reminder storage: reads and deletes
- Reminder execution → Command handlers: runs command
- Command handlers → Natural-language parser: parses reminder
- Streaming server → Stream pages: renders page
- Streaming server → Screen page: renders screen
- Streaming server → Local system: captures camera and screen
- Feature router → Telegram Bot API: sends replies
- Media and speech → Telegram Bot API: downloads media