doit-fm
A background AI agent that lets you control your computer via Telegram.
How it works
Telegram message → long-polling → AI model → structured JSON → OS tool → result → Telegram reply
You send a natural language message. The AI maps it to a tool + args. The tool runs as a real OS action. The result comes back to you in Telegram. In 2–5 seconds.
Install
pip install doit-fm
Or from source:
git clone <repo>
cd doit-fm
pip install -e .
Setup
doitfm init
The wizard walks you through:
- Checking dependencies
- Choosing AI provider + model (free options: Groq, OpenRouter, Ollama)
- Connecting your Telegram bot
- Sending a test message
Run
doitfm run
Background:
nohup doitfm run &
Commands
doitfm init — Setup wizard
doitfm run — Start the agent
doitfm stop — Stop the agent
doitfm status — Check if running
doitfm doctor — Diagnostics
Telegram commands
/health — CPU, RAM, disk, battery
/ps — Running processes
/disk — Disk partitions
/ip — Public IP
/time — Date and time
/weather <city> — Weather
/volume [0-100] — Get/set volume
/ls [path] — List directory
/run <cmd> — Shell command (with confirmation)
/notes — List notes
/note <text> — Save note
/clear — Clear AI conversation memory
/status — Agent status
/help — Help
Or just talk naturally:
- "how's my system?"
- "what's the weather in Tokyo?"
- "remind me to call John in 30 minutes"
- "what's using all my CPU?"
- "take a screenshot"
- "what's my public IP?"
- "calculate 847 * 23"
AI Providers
| Provider | Free tier | Notes |
|---|---|---|
| Groq | ✅ Yes | Fast, free Llama/Mixtral |
| OpenRouter | ✅ Yes | Gemma 3, Llama 3.3 free |
| Ollama | ✅ Local | Fully offline |
| OpenAI | ❌ Paid | GPT-4o |
| Anthropic | ❌ Paid | Claude |
| Together AI | ❌ Paid | Various models |
Tools
| Tool | Description | Dangerous |
|---|---|---|
| system_health | CPU, RAM, disk, battery | No |
| list_processes | Top processes by CPU | No |
| kill_process | Kill process by PID | Yes |
| run_shell | Execute shell command | Yes |
| list_directory | List files | No |
| read_file | Read text file | No |
| write_file | Write to file | Yes |
| delete_file | Delete file/dir | Yes |
| move_file | Move/rename | Yes |
| copy_file | Copy | No |
| find_files | Search by pattern | No |
| ping | Ping host | No |
| get_public_ip | Public IP | No |
| dns_lookup | DNS resolve | No |
| http_get | HTTP GET | No |
| speedtest | Speed test | No |
| weather | Weather by city | No |
| get_volume | Get volume | No |
| set_volume | Set volume | No |
| screenshot | Take screenshot | No |
| get_clipboard | Clipboard read | No |
| set_clipboard | Clipboard write | No |
| set_reminder | Set reminder | No |
| get_datetime | Date/time | No |
| calculate | Math expression | No |
| add_note | Save note | No |
| list_notes | Read notes | No |
| open_app | Launch app | No |
| disk_usage | Partition usage | No |
| network_interfaces | Network info | No |
| shutdown | Shutdown PC | Yes |
| reboot | Reboot PC | Yes |
| sleep | Suspend | No |
| list_pip_packages | pip list | No |
Security
- Only your Telegram user ID can control the agent
- All other messages are silently rejected
- Dangerous tools require explicit tap-to-confirm via inline buttons
- API key is encrypted at rest (Fernet symmetric encryption)
- Encryption key stored at
~/.local/share/doit-fm/data/.enc_key(chmod 600)
Architecture
src/doitfm/
├── __init__.py — package metadata
├── config.py — constants, paths, provider registry
├── store.py — encrypted config file (singleton)
├── tools.py — 35 tool implementations + registry + dispatcher
├── ai.py — AIEngine + ConversationMemory
├── bot.py — TelegramAPI + TelegramBot
└── cli.py — Click CLI
Adding a new tool
- Write an async function in
tools.py— takes**kwargs, returnsdict, never raises - Add one entry to
TOOLSdict - Add one intent rule to the system prompt in
ai.py - Optionally add a slash command in
bot.py
Adding a new AI provider
- Add entry to
AI_PROVIDERSinconfig.py - If not OpenAI-compatible, add a branch in
AIEngineinai.py
License
MIT
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
doit_fm-3.0.6.tar.gz
(37.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
doit_fm-3.0.6-py3-none-any.whl
(38.2 kB
view details)
File details
Details for the file doit_fm-3.0.6.tar.gz.
File metadata
- Download URL: doit_fm-3.0.6.tar.gz
- Upload date:
- Size: 37.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.11.0rc1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
130cd0b3d9102e007f07708c1d2d70006e43857a9219c9d4304c1d86a6146238
|
|
| MD5 |
cc393389a252ed390d768f435058283a
|
|
| BLAKE2b-256 |
b06fb44a3c8d26c01713aa71e562d8345d4127b1121c5e443df64644995d0431
|
File details
Details for the file doit_fm-3.0.6-py3-none-any.whl.
File metadata
- Download URL: doit_fm-3.0.6-py3-none-any.whl
- Upload date:
- Size: 38.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.11.0rc1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2aad6f9922bae97b64210230519d88abd208936cddf3c96cd5b2bc00c25ba7a5
|
|
| MD5 |
77600dda7c70f4e413855da6ce5c1b42
|
|
| BLAKE2b-256 |
72840886c623a25b985f08d01f1c7d90f9b27d71b62bcc6483d3c93e76aea84a
|