doitagent 2.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- doitagent-2.0.0/CHANGELOG.md +23 -0
- doitagent-2.0.0/LICENSE +21 -0
- doitagent-2.0.0/MANIFEST.in +7 -0
- doitagent-2.0.0/PKG-INFO +550 -0
- doitagent-2.0.0/README.md +444 -0
- doitagent-2.0.0/doitagent/__init__.py +10 -0
- doitagent-2.0.0/doitagent/_version.py +2 -0
- doitagent-2.0.0/doitagent/agent/__init__.py +0 -0
- doitagent-2.0.0/doitagent/agent/executor.py +227 -0
- doitagent-2.0.0/doitagent/agent/memory.py +176 -0
- doitagent-2.0.0/doitagent/cli.py +442 -0
- doitagent-2.0.0/doitagent/config.py +284 -0
- doitagent-2.0.0/doitagent/core.py +463 -0
- doitagent-2.0.0/doitagent/daemon/__init__.py +0 -0
- doitagent-2.0.0/doitagent/daemon/watchdog.py +365 -0
- doitagent-2.0.0/doitagent/exceptions.py +71 -0
- doitagent-2.0.0/doitagent/llm/__init__.py +0 -0
- doitagent-2.0.0/doitagent/llm/client.py +265 -0
- doitagent-2.0.0/doitagent/modules/__init__.py +0 -0
- doitagent-2.0.0/doitagent/modules/base.py +32 -0
- doitagent-2.0.0/doitagent/modules/browser.py +303 -0
- doitagent-2.0.0/doitagent/modules/database.py +208 -0
- doitagent-2.0.0/doitagent/modules/documents.py +318 -0
- doitagent-2.0.0/doitagent/modules/email_mod.py +198 -0
- doitagent-2.0.0/doitagent/modules/files.py +380 -0
- doitagent-2.0.0/doitagent/modules/keyboard_mouse.py +240 -0
- doitagent-2.0.0/doitagent/modules/media.py +258 -0
- doitagent-2.0.0/doitagent/modules/screen.py +219 -0
- doitagent-2.0.0/doitagent/modules/search.py +162 -0
- doitagent-2.0.0/doitagent/modules/shell.py +240 -0
- doitagent-2.0.0/doitagent/modules/system.py +266 -0
- doitagent-2.0.0/doitagent/modules/voice.py +171 -0
- doitagent-2.0.0/doitagent/py.typed +0 -0
- doitagent-2.0.0/doitagent/security/__init__.py +0 -0
- doitagent-2.0.0/doitagent/security/sandbox.py +326 -0
- doitagent-2.0.0/doitagent/telegram/__init__.py +0 -0
- doitagent-2.0.0/doitagent/telegram/bot.py +584 -0
- doitagent-2.0.0/doitagent/utils/__init__.py +0 -0
- doitagent-2.0.0/doitagent/utils/installer.py +113 -0
- doitagent-2.0.0/doitagent/utils/logger.py +63 -0
- doitagent-2.0.0/doitagent.egg-info/PKG-INFO +550 -0
- doitagent-2.0.0/doitagent.egg-info/SOURCES.txt +48 -0
- doitagent-2.0.0/doitagent.egg-info/dependency_links.txt +1 -0
- doitagent-2.0.0/doitagent.egg-info/entry_points.txt +3 -0
- doitagent-2.0.0/doitagent.egg-info/requires.txt +82 -0
- doitagent-2.0.0/doitagent.egg-info/top_level.txt +1 -0
- doitagent-2.0.0/pyproject.toml +154 -0
- doitagent-2.0.0/setup.cfg +4 -0
- doitagent-2.0.0/tests/test_basic.py +157 -0
- doitagent-2.0.0/tests/test_functional.py +45 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## [2.0.0] — 2024
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
- 12 capability modules: screen, files, browser, shell, kb, system, media, docs, db, search, voice, email
|
|
7
|
+
- NVIDIA NIM backend (free tier GPU inference)
|
|
8
|
+
- Anthropic, OpenAI, DeepSeek, Ollama LLM backends
|
|
9
|
+
- Production Telegram bot with approval workflow, file upload/download, rate limiting
|
|
10
|
+
- 24/7 daemon with auto-restart watchdog
|
|
11
|
+
- Cross-platform auto-start (Windows Task Scheduler / Linux systemd / macOS LaunchAgent)
|
|
12
|
+
- Rich CLI with interactive setup wizard
|
|
13
|
+
- Persistent memory (task history, skills, preferences)
|
|
14
|
+
- Security sandbox with risk classification and audit logging
|
|
15
|
+
- Secrets stored in OS keyring (not plain text)
|
|
16
|
+
- Pipeline, watch, schedule, learn, listen APIs
|
|
17
|
+
- Auto-install missing dependencies
|
|
18
|
+
- Full type hints and docstrings
|
|
19
|
+
|
|
20
|
+
## [1.0.0] — Initial release
|
|
21
|
+
- Basic automation modules
|
|
22
|
+
- Telegram bot
|
|
23
|
+
- Ollama support
|
doitagent-2.0.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 DoItAgent Contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
doitagent-2.0.0/PKG-INFO
ADDED
|
@@ -0,0 +1,550 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: doitagent
|
|
3
|
+
Version: 2.0.0
|
|
4
|
+
Summary: The world's most powerful personal AGI agent — control your PC via Telegram, voice, or code. 100% free & open source.
|
|
5
|
+
Author: DoItAgent Contributors
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/doitagent/doitagent
|
|
8
|
+
Project-URL: Documentation, https://doitagent.readthedocs.io
|
|
9
|
+
Project-URL: Repository, https://github.com/doitagent/doitagent
|
|
10
|
+
Project-URL: Issues, https://github.com/doitagent/doitagent/issues
|
|
11
|
+
Project-URL: Changelog, https://github.com/doitagent/doitagent/blob/main/CHANGELOG.md
|
|
12
|
+
Keywords: ai,agent,agi,automation,windows,telegram,llm,ollama,nvidia,voice,robotics,pyautogui
|
|
13
|
+
Classifier: Development Status :: 4 - Beta
|
|
14
|
+
Classifier: Intended Audience :: End Users/Desktop
|
|
15
|
+
Classifier: Intended Audience :: Developers
|
|
16
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
21
|
+
Classifier: Operating System :: Microsoft :: Windows
|
|
22
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
23
|
+
Classifier: Operating System :: MacOS
|
|
24
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
25
|
+
Classifier: Topic :: System :: Systems Administration
|
|
26
|
+
Classifier: Topic :: Communications :: Chat
|
|
27
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
28
|
+
Requires-Python: >=3.9
|
|
29
|
+
Description-Content-Type: text/markdown
|
|
30
|
+
License-File: LICENSE
|
|
31
|
+
Requires-Dist: anyio>=4.0
|
|
32
|
+
Requires-Dist: aiofiles>=23.0
|
|
33
|
+
Requires-Dist: aiohttp>=3.9
|
|
34
|
+
Requires-Dist: httpx>=0.27
|
|
35
|
+
Requires-Dist: tenacity>=8.2
|
|
36
|
+
Requires-Dist: rich>=13.0
|
|
37
|
+
Requires-Dist: click>=8.1
|
|
38
|
+
Requires-Dist: pydantic>=2.0
|
|
39
|
+
Requires-Dist: python-dotenv>=1.0
|
|
40
|
+
Requires-Dist: psutil>=5.9
|
|
41
|
+
Requires-Dist: pyautogui>=0.9
|
|
42
|
+
Requires-Dist: pyperclip>=1.8
|
|
43
|
+
Requires-Dist: Pillow>=10.0
|
|
44
|
+
Requires-Dist: mss>=9.0
|
|
45
|
+
Requires-Dist: playwright>=1.40
|
|
46
|
+
Requires-Dist: duckduckgo-search>=6.0
|
|
47
|
+
Requires-Dist: beautifulsoup4>=4.12
|
|
48
|
+
Requires-Dist: requests>=2.31
|
|
49
|
+
Requires-Dist: lxml>=4.9
|
|
50
|
+
Requires-Dist: python-docx>=1.1
|
|
51
|
+
Requires-Dist: openpyxl>=3.1
|
|
52
|
+
Requires-Dist: reportlab>=4.0
|
|
53
|
+
Requires-Dist: python-telegram-bot>=21.0
|
|
54
|
+
Requires-Dist: apscheduler>=3.10
|
|
55
|
+
Requires-Dist: openai>=1.30
|
|
56
|
+
Requires-Dist: anthropic>=0.30
|
|
57
|
+
Requires-Dist: send2trash>=1.8
|
|
58
|
+
Requires-Dist: cryptography>=42.0
|
|
59
|
+
Requires-Dist: keyring>=25.0
|
|
60
|
+
Requires-Dist: platformdirs>=4.0
|
|
61
|
+
Provides-Extra: ollama
|
|
62
|
+
Requires-Dist: ollama>=0.2; extra == "ollama"
|
|
63
|
+
Provides-Extra: voice
|
|
64
|
+
Requires-Dist: openai-whisper>=20231117; extra == "voice"
|
|
65
|
+
Requires-Dist: sounddevice>=0.4; extra == "voice"
|
|
66
|
+
Requires-Dist: scipy>=1.11; extra == "voice"
|
|
67
|
+
Requires-Dist: SpeechRecognition>=3.10; extra == "voice"
|
|
68
|
+
Requires-Dist: pyttsx3>=2.90; extra == "voice"
|
|
69
|
+
Provides-Extra: media
|
|
70
|
+
Requires-Dist: pygame>=2.5; extra == "media"
|
|
71
|
+
Requires-Dist: python-vlc>=3.0; extra == "media"
|
|
72
|
+
Provides-Extra: windows
|
|
73
|
+
Requires-Dist: pywinauto>=0.6; extra == "windows"
|
|
74
|
+
Requires-Dist: pywin32>=306; extra == "windows"
|
|
75
|
+
Requires-Dist: pycaw>=20230408; extra == "windows"
|
|
76
|
+
Requires-Dist: comtypes>=1.2; extra == "windows"
|
|
77
|
+
Requires-Dist: plyer>=2.1; extra == "windows"
|
|
78
|
+
Provides-Extra: ocr
|
|
79
|
+
Requires-Dist: pytesseract>=0.3; extra == "ocr"
|
|
80
|
+
Requires-Dist: opencv-python>=4.8; extra == "ocr"
|
|
81
|
+
Provides-Extra: pdf
|
|
82
|
+
Requires-Dist: pdfplumber>=0.10; extra == "pdf"
|
|
83
|
+
Requires-Dist: PyPDF2>=3.0; extra == "pdf"
|
|
84
|
+
Provides-Extra: all
|
|
85
|
+
Requires-Dist: ollama>=0.2; extra == "all"
|
|
86
|
+
Requires-Dist: openai-whisper>=20231117; extra == "all"
|
|
87
|
+
Requires-Dist: sounddevice>=0.4; extra == "all"
|
|
88
|
+
Requires-Dist: scipy>=1.11; extra == "all"
|
|
89
|
+
Requires-Dist: SpeechRecognition>=3.10; extra == "all"
|
|
90
|
+
Requires-Dist: pyttsx3>=2.90; extra == "all"
|
|
91
|
+
Requires-Dist: pygame>=2.5; extra == "all"
|
|
92
|
+
Requires-Dist: pytesseract>=0.3; extra == "all"
|
|
93
|
+
Requires-Dist: opencv-python>=4.8; extra == "all"
|
|
94
|
+
Requires-Dist: pdfplumber>=0.10; extra == "all"
|
|
95
|
+
Requires-Dist: PyPDF2>=3.0; extra == "all"
|
|
96
|
+
Requires-Dist: plyer>=2.1; extra == "all"
|
|
97
|
+
Provides-Extra: dev
|
|
98
|
+
Requires-Dist: pytest>=7.4; extra == "dev"
|
|
99
|
+
Requires-Dist: pytest-asyncio>=0.23; extra == "dev"
|
|
100
|
+
Requires-Dist: black>=24.0; extra == "dev"
|
|
101
|
+
Requires-Dist: ruff>=0.4; extra == "dev"
|
|
102
|
+
Requires-Dist: mypy>=1.8; extra == "dev"
|
|
103
|
+
Requires-Dist: twine>=5.0; extra == "dev"
|
|
104
|
+
Requires-Dist: build>=1.0; extra == "dev"
|
|
105
|
+
Dynamic: license-file
|
|
106
|
+
|
|
107
|
+
# 🤖 DoItAgent — The World's Most Powerful Personal AGI
|
|
108
|
+
|
|
109
|
+
[](https://badge.fury.io/py/doitagent)
|
|
110
|
+
[](https://www.python.org/downloads/)
|
|
111
|
+
[](https://opensource.org/licenses/MIT)
|
|
112
|
+
[](https://github.com/doitagent/doitagent)
|
|
113
|
+
|
|
114
|
+
> **Control your entire PC from anywhere via Telegram, voice, or Python.**
|
|
115
|
+
> Natural language. 100% free. Runs 24/7. Fully autonomous.
|
|
116
|
+
|
|
117
|
+
---
|
|
118
|
+
|
|
119
|
+
## ⚡ What is DoItAgent?
|
|
120
|
+
|
|
121
|
+
DoItAgent is a Python library that turns any computer into an AI-powered agent you can control from **anywhere in the world** via Telegram. Tell it what to do in plain English — it executes.
|
|
122
|
+
|
|
123
|
+
```python
|
|
124
|
+
from doitagent import Agent
|
|
125
|
+
|
|
126
|
+
ai = Agent() # auto-loads config
|
|
127
|
+
ai.do("take a screenshot and save it to Desktop")
|
|
128
|
+
ai.do("find all PDFs in Downloads, zip them, email to me")
|
|
129
|
+
ai.do("search for today's AI news and create a Word summary doc")
|
|
130
|
+
ai.do("play lofi music on YouTube")
|
|
131
|
+
ai.do("what processes are consuming most memory?")
|
|
132
|
+
ai.do("create an Excel budget spreadsheet with 3 months of data")
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
Or message your **Telegram bot** from your phone — your laptop executes it instantly.
|
|
136
|
+
|
|
137
|
+
---
|
|
138
|
+
|
|
139
|
+
## 🚀 Quick Start
|
|
140
|
+
|
|
141
|
+
```bash
|
|
142
|
+
# Install
|
|
143
|
+
pip install doitagent
|
|
144
|
+
|
|
145
|
+
# Setup (interactive wizard — takes ~3 minutes)
|
|
146
|
+
doit setup
|
|
147
|
+
|
|
148
|
+
# Start the 24/7 Telegram bot
|
|
149
|
+
doit start
|
|
150
|
+
|
|
151
|
+
# Or use the interactive terminal
|
|
152
|
+
doit
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
That's it. The wizard handles everything.
|
|
156
|
+
|
|
157
|
+
---
|
|
158
|
+
|
|
159
|
+
## 📱 Telegram Setup
|
|
160
|
+
|
|
161
|
+
After `doit setup`, message your bot from anywhere:
|
|
162
|
+
|
|
163
|
+
```
|
|
164
|
+
take a screenshot
|
|
165
|
+
list files on my Desktop
|
|
166
|
+
create a Word doc about AI trends
|
|
167
|
+
open Chrome and go to YouTube
|
|
168
|
+
run: ipconfig
|
|
169
|
+
search for Python news
|
|
170
|
+
make an Excel file with my budget
|
|
171
|
+
set volume to 60%
|
|
172
|
+
zip my Documents folder
|
|
173
|
+
say "task complete" out loud
|
|
174
|
+
teach skill morning: take screenshot, check email, play music
|
|
175
|
+
run morning skill
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
---
|
|
179
|
+
|
|
180
|
+
## 🧠 Supported LLM Backends
|
|
181
|
+
|
|
182
|
+
| Backend | Cost | Privacy | Setup |
|
|
183
|
+
|---------|------|---------|-------|
|
|
184
|
+
| **Ollama** | Free | 100% local | `doit setup` → option 1 |
|
|
185
|
+
| **NVIDIA NIM** | Free tier | API | `nvapi-...` key from build.nvidia.com |
|
|
186
|
+
| **Anthropic** | ~$0.05/task | API | `sk-ant-...` key |
|
|
187
|
+
| **OpenAI** | ~$0.05/task | API | `sk-...` key |
|
|
188
|
+
| **DeepSeek** | ~$0.001/task | API | Key from platform.deepseek.com |
|
|
189
|
+
|
|
190
|
+
```python
|
|
191
|
+
# Ollama (free, local)
|
|
192
|
+
ai = Agent.with_ollama("mistral")
|
|
193
|
+
|
|
194
|
+
# NVIDIA NIM (free tier)
|
|
195
|
+
ai = Agent.with_nvidia("nvapi-your-key", model="llama-3.1-70b")
|
|
196
|
+
|
|
197
|
+
# Anthropic
|
|
198
|
+
ai = Agent.with_anthropic("sk-ant-...", model="claude-opus-4-6")
|
|
199
|
+
|
|
200
|
+
# OpenAI
|
|
201
|
+
ai = Agent.with_openai("sk-...", model="gpt-4o")
|
|
202
|
+
|
|
203
|
+
# DeepSeek
|
|
204
|
+
ai = Agent.with_deepseek("your-key")
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
---
|
|
208
|
+
|
|
209
|
+
## 🔧 12 Capability Modules
|
|
210
|
+
|
|
211
|
+
### `ai.screen` — See the Screen
|
|
212
|
+
```python
|
|
213
|
+
ai.screen.screenshot() # Full screenshot → file path
|
|
214
|
+
ai.screen.screenshot(region=(0,0,800,600)) # Region screenshot
|
|
215
|
+
ai.screen.read_text() # OCR all text on screen
|
|
216
|
+
ai.screen.find_text_on_screen("Submit") # → (x, y) coordinates
|
|
217
|
+
ai.screen.find_image_on_screen("icon.png") # Template matching
|
|
218
|
+
ai.screen.watch_for_change((0,0,300,100), cb) # Monitor region
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
### `ai.files` — File CRUD
|
|
222
|
+
```python
|
|
223
|
+
ai.files.create_file("~/Desktop/notes.txt", "content")
|
|
224
|
+
ai.files.read_file("~/Desktop/notes.txt")
|
|
225
|
+
ai.files.list_folder("~/Desktop", "*.pdf")
|
|
226
|
+
ai.files.find_files("*.pdf", "~/Downloads")
|
|
227
|
+
ai.files.move("~/Downloads/file.pdf", "~/Documents/")
|
|
228
|
+
ai.files.copy("~/file.txt", "~/backup/")
|
|
229
|
+
ai.files.trash("~/old.txt") # Recycle bin (safe)
|
|
230
|
+
ai.files.zip_folder("~/Project")
|
|
231
|
+
ai.files.unzip("~/archive.zip", "~/extracted/")
|
|
232
|
+
ai.files.read_json("~/config.json")
|
|
233
|
+
ai.files.write_json("~/config.json", {"key": "val"})
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
### `ai.browser` — Web Browser (Playwright)
|
|
237
|
+
```python
|
|
238
|
+
ai.browser.open("https://google.com")
|
|
239
|
+
ai.browser.goto("https://news.ycombinator.com")
|
|
240
|
+
ai.browser.click("text=Sign In")
|
|
241
|
+
ai.browser.type_text("input[name='q']", "python")
|
|
242
|
+
ai.browser.search_google("best Python books 2024")
|
|
243
|
+
ai.browser.get_text() # Full page text
|
|
244
|
+
ai.browser.screenshot("page.png", full_page=True)
|
|
245
|
+
ai.browser.fill_form({"#email": "me@x.com", "#pw": "pass"})
|
|
246
|
+
ai.browser.download_file("https://x.com/file.pdf", "~/file.pdf")
|
|
247
|
+
ai.browser.execute_js("return document.title")
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
### `ai.shell` — Commands & Scripts
|
|
251
|
+
```python
|
|
252
|
+
ai.shell.run("ipconfig")
|
|
253
|
+
ai.shell.run("dir C:/Users")
|
|
254
|
+
ai.shell.powershell("Get-Process | Sort CPU -Desc | Select -First 10")
|
|
255
|
+
ai.shell.open_app("notepad")
|
|
256
|
+
ai.shell.open_app("chrome")
|
|
257
|
+
ai.shell.kill_process("notepad.exe")
|
|
258
|
+
ai.shell.run_python("~/scripts/process.py", ["--input", "data.csv"])
|
|
259
|
+
ai.shell.run_python_code("import math; print(math.pi)")
|
|
260
|
+
ai.shell.pip_install("pandas numpy")
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
### `ai.kb` — Keyboard & Mouse
|
|
264
|
+
```python
|
|
265
|
+
ai.kb.click(500, 300)
|
|
266
|
+
ai.kb.click(500, 300, clicks=2) # Double-click
|
|
267
|
+
ai.kb.click_text("OK") # Find & click text on screen
|
|
268
|
+
ai.kb.type("Hello World!")
|
|
269
|
+
ai.kb.type_fast("Long text goes here...") # Paste method
|
|
270
|
+
ai.kb.hotkey("ctrl", "c")
|
|
271
|
+
ai.kb.hotkey("ctrl", "shift", "esc") # Task manager
|
|
272
|
+
ai.kb.hotkey("win", "d") # Show desktop
|
|
273
|
+
ai.kb.press("enter")
|
|
274
|
+
ai.kb.scroll(-5) # Scroll down
|
|
275
|
+
ai.kb.drag(100, 100, 500, 100)
|
|
276
|
+
ai.kb.set_clipboard("Copy this!")
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
### `ai.system` — Windows System
|
|
280
|
+
```python
|
|
281
|
+
ai.system.notify("DoItAgent", "Task complete!")
|
|
282
|
+
ai.system.list_processes() # → List[dict]
|
|
283
|
+
ai.system.kill_process("notepad.exe")
|
|
284
|
+
ai.system.get_system_info() # CPU, RAM, disk
|
|
285
|
+
ai.system.get_battery()
|
|
286
|
+
ai.system.get_network_info()
|
|
287
|
+
ai.system.set_volume(70)
|
|
288
|
+
ai.system.lock_screen()
|
|
289
|
+
ai.system.get_installed_apps()
|
|
290
|
+
ai.system.schedule_task("MyTask", "python script.py", "daily")
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
### `ai.media` — Audio & Video
|
|
294
|
+
```python
|
|
295
|
+
ai.media.play("C:/Music/song.mp3")
|
|
296
|
+
ai.media.play_youtube("lofi hip hop study")
|
|
297
|
+
ai.media.play_spotify("Discover Weekly")
|
|
298
|
+
ai.media.pause()
|
|
299
|
+
ai.media.next_track()
|
|
300
|
+
ai.media.set_volume(80)
|
|
301
|
+
ai.media.text_to_speech("Task completed!")
|
|
302
|
+
ai.media.record_audio(duration=10, save_path="~/recording.wav")
|
|
303
|
+
```
|
|
304
|
+
|
|
305
|
+
### `ai.docs` — Document Creation
|
|
306
|
+
```python
|
|
307
|
+
# Word
|
|
308
|
+
path = ai.docs.create_word("report.docx", title="Q3 Report",
|
|
309
|
+
paragraphs=["Revenue up 20%", "New markets: Asia, Europe"])
|
|
310
|
+
ai.docs.add_table_to_word("report.docx",
|
|
311
|
+
headers=["Name","Sales"], rows=[["Alice","$50K"]])
|
|
312
|
+
|
|
313
|
+
# Excel
|
|
314
|
+
path = ai.docs.create_excel("data.xlsx",
|
|
315
|
+
headers=["Date","Revenue","Units"],
|
|
316
|
+
rows=[["Jan",50000,120], ["Feb",62000,155]])
|
|
317
|
+
|
|
318
|
+
# PDF
|
|
319
|
+
path = ai.docs.create_pdf("report.pdf", title="Annual Report",
|
|
320
|
+
paragraphs=["Summary paragraph here."])
|
|
321
|
+
text = ai.docs.read_pdf("document.pdf")
|
|
322
|
+
|
|
323
|
+
# CSV
|
|
324
|
+
ai.docs.create_csv("export.csv", ["Name","Email"], [["Alice","a@b.com"]])
|
|
325
|
+
data = ai.docs.read_csv("export.csv")
|
|
326
|
+
```
|
|
327
|
+
|
|
328
|
+
### `ai.db` — SQLite Database
|
|
329
|
+
```python
|
|
330
|
+
ai.db.connect("~/myapp.db") # or ":memory:"
|
|
331
|
+
ai.db.create_table("tasks", {
|
|
332
|
+
"id": "INTEGER PRIMARY KEY AUTOINCREMENT",
|
|
333
|
+
"name": "TEXT NOT NULL",
|
|
334
|
+
"done": "INTEGER DEFAULT 0",
|
|
335
|
+
"created_at": "TEXT DEFAULT CURRENT_TIMESTAMP",
|
|
336
|
+
})
|
|
337
|
+
id = ai.db.insert("tasks", {"name": "Buy groceries"})
|
|
338
|
+
rows = ai.db.select("tasks")
|
|
339
|
+
rows = ai.db.select("tasks", "done = ?", (0,))
|
|
340
|
+
ai.db.update("tasks", {"done": 1}, "id = ?", (id,))
|
|
341
|
+
ai.db.delete("tasks", "done = 1")
|
|
342
|
+
ai.db.execute("SELECT COUNT(*) as total FROM tasks")
|
|
343
|
+
ai.db.export_to_csv("tasks", "~/tasks.csv")
|
|
344
|
+
```
|
|
345
|
+
|
|
346
|
+
### `ai.search` — Web Search & Scraping
|
|
347
|
+
```python
|
|
348
|
+
results = ai.search.web_search("Python automation 2024", num_results=10)
|
|
349
|
+
summary = ai.search.search_and_summarize("latest AI news")
|
|
350
|
+
text = ai.search.scrape_page("https://example.com")
|
|
351
|
+
links = ai.search.scrape_page("https://example.com", extract="links")
|
|
352
|
+
news = ai.search.search_news("artificial intelligence", num_results=5)
|
|
353
|
+
page = ai.search.get_page_text("https://docs.python.org", max_chars=5000)
|
|
354
|
+
```
|
|
355
|
+
|
|
356
|
+
### `ai.voice` — Speech I/O
|
|
357
|
+
```python
|
|
358
|
+
command = ai.voice.listen() # Listen 5 seconds
|
|
359
|
+
command = ai.voice.listen(duration=10)
|
|
360
|
+
ai.voice.speak("Task completed successfully!")
|
|
361
|
+
text = ai.voice.transcribe_file("~/meeting.mp3")
|
|
362
|
+
path = ai.voice.save_speech("Hello", "~/hello.mp3")
|
|
363
|
+
voices = ai.voice.list_voices()
|
|
364
|
+
```
|
|
365
|
+
|
|
366
|
+
### `ai.email` — Send & Read Email
|
|
367
|
+
```python
|
|
368
|
+
ai.email.configure("me@gmail.com", "app_password")
|
|
369
|
+
ai.email.send("boss@company.com", "Report Ready", "See attached.", ["~/report.pdf"])
|
|
370
|
+
emails = ai.email.read_inbox(limit=10, unread_only=True)
|
|
371
|
+
found = ai.email.search_emails("invoice")
|
|
372
|
+
```
|
|
373
|
+
|
|
374
|
+
---
|
|
375
|
+
|
|
376
|
+
## 🔗 Advanced Features
|
|
377
|
+
|
|
378
|
+
### Pipelines — Chain tasks
|
|
379
|
+
```python
|
|
380
|
+
ai.pipeline(
|
|
381
|
+
"search the web for top 5 Python frameworks in 2024",
|
|
382
|
+
"create a Word document summarizing the results with a comparison table",
|
|
383
|
+
"save it to Desktop as python_frameworks_2024.docx",
|
|
384
|
+
)
|
|
385
|
+
```
|
|
386
|
+
|
|
387
|
+
### Watch Triggers — React to events
|
|
388
|
+
```python
|
|
389
|
+
ai.watch(
|
|
390
|
+
trigger="CPU usage exceeds 90%",
|
|
391
|
+
action="notify me and save a list of top processes to Desktop/cpu_alert.txt",
|
|
392
|
+
interval=60,
|
|
393
|
+
)
|
|
394
|
+
ai.watch(
|
|
395
|
+
trigger="new PDF appears in Downloads folder",
|
|
396
|
+
action="move it to Documents/PDFs/ and send me a Telegram notification",
|
|
397
|
+
interval=15,
|
|
398
|
+
)
|
|
399
|
+
```
|
|
400
|
+
|
|
401
|
+
### Schedule Tasks — Time-based automation
|
|
402
|
+
```python
|
|
403
|
+
ai.schedule("take a screenshot and save with timestamp", "every day at 9am")
|
|
404
|
+
ai.schedule("search for AI news and append to ~/daily_news.txt", "every morning at 7am")
|
|
405
|
+
ai.schedule("clear old files in ~/Downloads older than 30 days", "every sunday at midnight")
|
|
406
|
+
```
|
|
407
|
+
|
|
408
|
+
### Learn Skills — Reusable workflows
|
|
409
|
+
```python
|
|
410
|
+
ai.learn(
|
|
411
|
+
skill_name="morning_briefing",
|
|
412
|
+
description="My morning routine",
|
|
413
|
+
steps=[
|
|
414
|
+
"take a screenshot of current desktop",
|
|
415
|
+
"search the web for today's top tech news",
|
|
416
|
+
"create a text file ~/Desktop/briefing.txt with the news",
|
|
417
|
+
"say 'Good morning! Your briefing is ready.'",
|
|
418
|
+
],
|
|
419
|
+
)
|
|
420
|
+
ai.do("run morning_briefing skill")
|
|
421
|
+
```
|
|
422
|
+
|
|
423
|
+
### Voice Command Mode
|
|
424
|
+
```python
|
|
425
|
+
ai.listen() # Speak commands aloud. Say "DoIt stop" to exit.
|
|
426
|
+
```
|
|
427
|
+
|
|
428
|
+
---
|
|
429
|
+
|
|
430
|
+
## 🛡️ Security
|
|
431
|
+
|
|
432
|
+
- **Safe mode** — confirms before deleting files or dangerous actions
|
|
433
|
+
- **Sandbox** — shell commands run in isolated temp directory
|
|
434
|
+
- **Risk classification** — CRITICAL/HIGH/MEDIUM/LOW for every command
|
|
435
|
+
- **Audit log** — every action logged to `~/.doitagent/logs/audit.jsonl`
|
|
436
|
+
- **Approval workflow** — Telegram bot asks before destructive actions
|
|
437
|
+
- **User whitelist** — only your Telegram user ID can control the bot
|
|
438
|
+
- **Secrets in keyring** — API keys stored in OS keyring, not plain text
|
|
439
|
+
|
|
440
|
+
---
|
|
441
|
+
|
|
442
|
+
## 🔄 24/7 Daemon
|
|
443
|
+
|
|
444
|
+
```bash
|
|
445
|
+
doit start # Start with watchdog (auto-restarts on crash)
|
|
446
|
+
doit stop # Stop the daemon
|
|
447
|
+
doit status # Check status
|
|
448
|
+
```
|
|
449
|
+
|
|
450
|
+
Features:
|
|
451
|
+
- Automatic restart on crash (configurable max attempts)
|
|
452
|
+
- Periodic Telegram heartbeat messages
|
|
453
|
+
- Cross-platform: Windows Task Scheduler / Linux systemd / macOS LaunchAgent
|
|
454
|
+
- PID file management
|
|
455
|
+
- Full crash log
|
|
456
|
+
|
|
457
|
+
---
|
|
458
|
+
|
|
459
|
+
## 📦 Installation Options
|
|
460
|
+
|
|
461
|
+
```bash
|
|
462
|
+
# Minimal
|
|
463
|
+
pip install doitagent
|
|
464
|
+
|
|
465
|
+
# With voice (Whisper STT + pyttsx3 TTS)
|
|
466
|
+
pip install doitagent[voice]
|
|
467
|
+
|
|
468
|
+
# With Windows-specific extras
|
|
469
|
+
pip install doitagent[windows]
|
|
470
|
+
|
|
471
|
+
# Everything
|
|
472
|
+
pip install doitagent[all]
|
|
473
|
+
```
|
|
474
|
+
|
|
475
|
+
---
|
|
476
|
+
|
|
477
|
+
## 🗂️ Project Structure
|
|
478
|
+
|
|
479
|
+
```
|
|
480
|
+
doitagent/
|
|
481
|
+
├── core.py # Agent — the main class
|
|
482
|
+
├── config.py # Secure configuration
|
|
483
|
+
├── cli.py # CLI (doit command)
|
|
484
|
+
├── exceptions.py # Exception hierarchy
|
|
485
|
+
├── _version.py
|
|
486
|
+
├── agent/
|
|
487
|
+
│ ├── executor.py # LLM reasoning loop
|
|
488
|
+
│ └── memory.py # Persistent memory
|
|
489
|
+
├── llm/
|
|
490
|
+
│ └── client.py # Multi-backend LLM client
|
|
491
|
+
├── modules/
|
|
492
|
+
│ ├── screen.py # Screen vision & OCR
|
|
493
|
+
│ ├── files.py # File CRUD
|
|
494
|
+
│ ├── browser.py # Playwright automation
|
|
495
|
+
│ ├── shell.py # Shell execution
|
|
496
|
+
│ ├── keyboard_mouse.py
|
|
497
|
+
│ ├── system.py # Windows system
|
|
498
|
+
│ ├── media.py # Audio/video
|
|
499
|
+
│ ├── documents.py # Word/Excel/PDF
|
|
500
|
+
│ ├── database.py # SQLite
|
|
501
|
+
│ ├── search.py # Web search
|
|
502
|
+
│ ├── voice.py # STT + TTS
|
|
503
|
+
│ └── email_mod.py # Email
|
|
504
|
+
├── telegram/
|
|
505
|
+
│ └── bot.py # Telegram bot
|
|
506
|
+
├── security/
|
|
507
|
+
│ └── sandbox.py # Sandboxing + audit
|
|
508
|
+
├── daemon/
|
|
509
|
+
│ └── watchdog.py # 24/7 daemon
|
|
510
|
+
└── utils/
|
|
511
|
+
├── logger.py # Rich logging
|
|
512
|
+
└── installer.py # Auto-install deps
|
|
513
|
+
```
|
|
514
|
+
|
|
515
|
+
---
|
|
516
|
+
|
|
517
|
+
## 💻 CLI Reference
|
|
518
|
+
|
|
519
|
+
```bash
|
|
520
|
+
doit setup # First-time setup wizard
|
|
521
|
+
doit start # Start Telegram bot (24/7)
|
|
522
|
+
doit stop # Stop daemon
|
|
523
|
+
doit status # Show agent status
|
|
524
|
+
doit "take a screenshot" # Run a single task
|
|
525
|
+
doit # Interactive chat mode
|
|
526
|
+
doit listen # Voice command mode
|
|
527
|
+
doit run reset # Reset configuration
|
|
528
|
+
doit --version # Show version
|
|
529
|
+
```
|
|
530
|
+
|
|
531
|
+
---
|
|
532
|
+
|
|
533
|
+
## 🤝 Contributing
|
|
534
|
+
|
|
535
|
+
```bash
|
|
536
|
+
git clone https://github.com/doitagent/doitagent
|
|
537
|
+
cd doitagent
|
|
538
|
+
pip install -e .[dev]
|
|
539
|
+
pytest tests/
|
|
540
|
+
```
|
|
541
|
+
|
|
542
|
+
---
|
|
543
|
+
|
|
544
|
+
## 📄 License
|
|
545
|
+
|
|
546
|
+
MIT License — Free to use, modify, distribute.
|
|
547
|
+
|
|
548
|
+
---
|
|
549
|
+
|
|
550
|
+
*Because life's too short to click things yourself.*
|