devduck 0.4.0__py3-none-any.whl → 0.5.0__py3-none-any.whl
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.
Potentially problematic release.
This version of devduck might be problematic. Click here for more details.
- devduck/__init__.py +64 -179
- devduck/_version.py +2 -2
- devduck/tools/__init__.py +3 -1
- devduck/tools/_ambient_input.py +423 -0
- devduck/tools/_tray_app.py +522 -0
- devduck/tools/ambient.py +157 -0
- devduck/tools/ipc.py +543 -0
- devduck/tools/system_prompt.py +485 -0
- devduck/tools/tcp.py +0 -4
- devduck/tools/tray.py +246 -0
- devduck-0.5.0.dist-info/METADATA +554 -0
- devduck-0.5.0.dist-info/RECORD +24 -0
- {devduck-0.4.0.dist-info → devduck-0.5.0.dist-info}/entry_points.txt +1 -0
- devduck-0.5.0.dist-info/licenses/LICENSE +201 -0
- devduck-0.4.0.dist-info/METADATA +0 -260
- devduck-0.4.0.dist-info/RECORD +0 -18
- devduck-0.4.0.dist-info/licenses/LICENSE +0 -21
- {devduck-0.4.0.dist-info → devduck-0.5.0.dist-info}/WHEEL +0 -0
- {devduck-0.4.0.dist-info → devduck-0.5.0.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,554 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: devduck
|
|
3
|
+
Version: 0.5.0
|
|
4
|
+
Summary: 🦆 Extreme minimalist self-adapting AI agent - one file, self-healing, runtime dependencies
|
|
5
|
+
Author-email: Cagatay Cali <cagataycali@icloud.com>
|
|
6
|
+
License: Apache-2.0
|
|
7
|
+
Project-URL: Homepage, https://github.com/cagataycali/devduck
|
|
8
|
+
Project-URL: Repository, https://github.com/cagataycali/devduck.git
|
|
9
|
+
Project-URL: Documentation, https://github.com/cagataycali/devduck#readme
|
|
10
|
+
Project-URL: Bug Tracker, https://github.com/cagataycali/devduck/issues
|
|
11
|
+
Keywords: ai,agent,minimalist,self-healing,ollama,strands-agents
|
|
12
|
+
Classifier: Development Status :: 4 - Beta
|
|
13
|
+
Classifier: Environment :: Console
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: Intended Audience :: System Administrators
|
|
16
|
+
Classifier: Operating System :: OS Independent
|
|
17
|
+
Classifier: Programming Language :: Python :: 3
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
22
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
23
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
24
|
+
Classifier: Topic :: System :: Systems Administration
|
|
25
|
+
Classifier: Topic :: Utilities
|
|
26
|
+
Requires-Python: <3.14,>=3.10
|
|
27
|
+
Description-Content-Type: text/markdown
|
|
28
|
+
License-File: LICENSE
|
|
29
|
+
Requires-Dist: strands-agents
|
|
30
|
+
Requires-Dist: prompt_toolkit
|
|
31
|
+
Requires-Dist: strands-agents[ollama]
|
|
32
|
+
Requires-Dist: strands-agents[anthropic]
|
|
33
|
+
Requires-Dist: strands-agents[openai]
|
|
34
|
+
Requires-Dist: strands-agents[otel]
|
|
35
|
+
Requires-Dist: strands-agents-tools
|
|
36
|
+
Requires-Dist: strands-agents-tools[all]; sys_platform == "darwin"
|
|
37
|
+
Requires-Dist: strands-agentcore-tools
|
|
38
|
+
Requires-Dist: strands-fun-tools[all]; sys_platform == "darwin"
|
|
39
|
+
Requires-Dist: strands-fun-tools[audio]; sys_platform == "darwin"
|
|
40
|
+
Requires-Dist: beautifulsoup4
|
|
41
|
+
Requires-Dist: colorama
|
|
42
|
+
Requires-Dist: websockets
|
|
43
|
+
Requires-Dist: strands-mcp-server
|
|
44
|
+
Requires-Dist: rumps; sys_platform == "darwin"
|
|
45
|
+
Dynamic: license-file
|
|
46
|
+
|
|
47
|
+
# 🦆 DevDuck
|
|
48
|
+
|
|
49
|
+
[](https://pypi.org/project/devduck/)
|
|
50
|
+
[](https://github.com/cagataycali/homebrew-devduck)
|
|
51
|
+
|
|
52
|
+
**Self-healing AI agent with hot-reload, RAG memory, and multi-protocol servers**
|
|
53
|
+
|
|
54
|
+
One Python file that adapts to your environment, fixes itself, and expands capabilities at runtime.
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
**Requirements:**
|
|
59
|
+
- Python ≥3.10, <3.14
|
|
60
|
+
- Ollama (or any Strands-supported provider)
|
|
61
|
+
- **tkinter** (required for ambient overlay - install separately)
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
# Quick install
|
|
65
|
+
pipx install "devduck"
|
|
66
|
+
|
|
67
|
+
# Or instant run (no install)
|
|
68
|
+
uvx devduck "analyze this code"
|
|
69
|
+
|
|
70
|
+
# Or Homebrew
|
|
71
|
+
brew tap cagataycali/devduck && brew install devduck
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
**⚠️ Installing tkinter:**
|
|
75
|
+
|
|
76
|
+
tkinter is not included in the Python package and must be installed separately:
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
# macOS (Homebrew Python)
|
|
80
|
+
brew install python-tk@3.13
|
|
81
|
+
|
|
82
|
+
# Ubuntu/Debian
|
|
83
|
+
sudo apt-get install python3-tk
|
|
84
|
+
|
|
85
|
+
# Fedora
|
|
86
|
+
sudo dnf install python3-tkinter
|
|
87
|
+
|
|
88
|
+
# Windows
|
|
89
|
+
# tkinter is included with official Python installers from python.org
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
---
|
|
93
|
+
|
|
94
|
+
## Quick Start
|
|
95
|
+
|
|
96
|
+
**CLI:**
|
|
97
|
+
```bash
|
|
98
|
+
devduck # Interactive + auto-start servers
|
|
99
|
+
devduck "calculate 15 * 7" # One-shot query
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
**Python API:**
|
|
103
|
+
```python
|
|
104
|
+
from devduck import devduck
|
|
105
|
+
|
|
106
|
+
devduck("Create a Flask API for weather data")
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
**TCP client:**
|
|
110
|
+
```bash
|
|
111
|
+
nc localhost 9999
|
|
112
|
+
> help me debug this error
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
**Ambient overlay:**
|
|
116
|
+
```bash
|
|
117
|
+
devduck
|
|
118
|
+
🦆 ambient(action="start")
|
|
119
|
+
# Modern glassmorphism UI appears - press ESC to hide, Enter to send
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
**System tray app:**
|
|
123
|
+
```bash
|
|
124
|
+
devduck
|
|
125
|
+
🦆 tray(action="start")
|
|
126
|
+
# 🦆 appears in menu bar with server controls
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
---
|
|
130
|
+
|
|
131
|
+
## Architecture
|
|
132
|
+
|
|
133
|
+
```mermaid
|
|
134
|
+
graph TB
|
|
135
|
+
A[User Input] -->|CLI/TCP/WS/MCP/IPC| B[DevDuck Core]
|
|
136
|
+
B -->|Auto RAG| C[Knowledge Base]
|
|
137
|
+
C -.->|Context Retrieval| B
|
|
138
|
+
B -->|Tool Calls| D[27+ Built-in Tools]
|
|
139
|
+
D --> E[shell/file_read/file_write/calculator]
|
|
140
|
+
D --> F[GitHub/subagents]
|
|
141
|
+
D --> G[TCP/WebSocket/MCP/IPC]
|
|
142
|
+
D --> H[tray/ambient/listen/cursor]
|
|
143
|
+
B -->|Hot-reload| I[./tools/*.py]
|
|
144
|
+
I -.->|Load Instantly| D
|
|
145
|
+
B -->|Response| J[User Output]
|
|
146
|
+
J -.->|Store Memory| C
|
|
147
|
+
|
|
148
|
+
style B fill:#e1f5ff
|
|
149
|
+
style C fill:#d4edda
|
|
150
|
+
style I fill:#fff3cd
|
|
151
|
+
style H fill:#ffe6f0
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
**Self-adapting loop:** User queries → RAG retrieval → Tool execution → Response → Memory storage → Hot-reload new capabilities → Repeat.
|
|
155
|
+
|
|
156
|
+
---
|
|
157
|
+
|
|
158
|
+
## Core Workflow
|
|
159
|
+
|
|
160
|
+
**3 steps: Install → Run → Extend**
|
|
161
|
+
|
|
162
|
+
### 1. Install & Start
|
|
163
|
+
|
|
164
|
+
```bash
|
|
165
|
+
pipx install "devduck"
|
|
166
|
+
devduck
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
**Auto-starts:**
|
|
170
|
+
- 🔌 TCP server (port 9999)
|
|
171
|
+
- 🌊 WebSocket server (port 8080)
|
|
172
|
+
- 🔗 MCP server (port 8000)
|
|
173
|
+
- 🔌 IPC server (Unix socket at /tmp/devduck_main.sock)
|
|
174
|
+
- 📁 File watcher (hot-reload)
|
|
175
|
+
|
|
176
|
+
### 2. Use Built-in Tools
|
|
177
|
+
|
|
178
|
+
```python
|
|
179
|
+
import devduck
|
|
180
|
+
|
|
181
|
+
# Code editing
|
|
182
|
+
devduck("Create a FastAPI server in ./app.py")
|
|
183
|
+
|
|
184
|
+
# Shell commands
|
|
185
|
+
devduck("Install dependencies and run tests")
|
|
186
|
+
|
|
187
|
+
# GitHub integration
|
|
188
|
+
devduck("Create a gist with my training notes")
|
|
189
|
+
|
|
190
|
+
# Multi-agent workflows
|
|
191
|
+
devduck("Delegate data analysis to a subagent")
|
|
192
|
+
|
|
193
|
+
# System tray integration
|
|
194
|
+
devduck("Start the tray app and show ambient overlay")
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
### 3. Extend with Hot-Reload
|
|
198
|
+
|
|
199
|
+
**Create custom tool:**
|
|
200
|
+
```python
|
|
201
|
+
# ./tools/weather.py
|
|
202
|
+
from strands import tool
|
|
203
|
+
import requests
|
|
204
|
+
|
|
205
|
+
@tool
|
|
206
|
+
def weather(city: str) -> str:
|
|
207
|
+
"""Get current weather for a city."""
|
|
208
|
+
api_key = "your_key"
|
|
209
|
+
url = f"https://api.openweathermap.org/data/2.5/weather?q={city}&appid={api_key}"
|
|
210
|
+
data = requests.get(url).json()
|
|
211
|
+
return f"{city}: {data['weather'][0]['description']}, {data['main']['temp']}°K"
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
**Save → Use instantly (no restart):**
|
|
215
|
+
```bash
|
|
216
|
+
🦆 weather(city="London")
|
|
217
|
+
# London: clear sky, 285.3°K
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
---
|
|
221
|
+
|
|
222
|
+
## Multi-Protocol Access
|
|
223
|
+
|
|
224
|
+
| Protocol | Endpoint | Usage |
|
|
225
|
+
|----------|----------|-------|
|
|
226
|
+
| **CLI** | Terminal | `devduck "query"` |
|
|
227
|
+
| **Python** | API | `from devduck import devduck` |
|
|
228
|
+
| **TCP** | `localhost:9999` | `nc localhost 9999` |
|
|
229
|
+
| **WebSocket** | `ws://localhost:8080` | Browser/Node.js clients |
|
|
230
|
+
| **MCP** | `http://localhost:8000/mcp` | Claude Desktop, other agents |
|
|
231
|
+
| **IPC** | `/tmp/devduck_main.sock` | Local processes (tray, ambient) |
|
|
232
|
+
| **Web UI** | [cagataycali.github.io/devduck](http://cagataycali.github.io/devduck) | Browser interface |
|
|
233
|
+
|
|
234
|
+
**Custom ports:**
|
|
235
|
+
```bash
|
|
236
|
+
export DEVDUCK_TCP_PORT=9000
|
|
237
|
+
export DEVDUCK_WS_PORT=8001
|
|
238
|
+
export DEVDUCK_MCP_PORT=3000
|
|
239
|
+
export DEVDUCK_IPC_SOCKET=/tmp/custom.sock
|
|
240
|
+
devduck
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
---
|
|
244
|
+
|
|
245
|
+
## Built-in Tools
|
|
246
|
+
|
|
247
|
+
| Tool | Purpose |
|
|
248
|
+
|------|---------|
|
|
249
|
+
| **Development** |
|
|
250
|
+
| `shell` | Execute shell commands with PTY support |
|
|
251
|
+
| `file_read` | Read files with multiple modes (view, lines, chunk, search, stats, preview, diff) |
|
|
252
|
+
| `file_write` | Write content to files with proper formatting |
|
|
253
|
+
| `python_repl` | Run Python code in isolated environment |
|
|
254
|
+
| `load_tool` | Load custom tools from `.py` files |
|
|
255
|
+
| `environment` | Manage environment variables |
|
|
256
|
+
| **GitHub & CI/CD** |
|
|
257
|
+
| `use_github` | GraphQL API operations (issues, PRs, repos) |
|
|
258
|
+
| `create_subagent` | Spawn GitHub Actions sub-agents |
|
|
259
|
+
| `gist` | Create/manage gists |
|
|
260
|
+
| `add_comment` | Comment on issues/PRs |
|
|
261
|
+
| `list_issues` / `list_pull_requests` | List repo items |
|
|
262
|
+
| **Network & Servers** |
|
|
263
|
+
| `tcp` | Start/manage TCP servers (streaming) |
|
|
264
|
+
| `websocket` | WebSocket server with concurrency |
|
|
265
|
+
| `mcp_server` | Expose as MCP server (HTTP/stdio) |
|
|
266
|
+
| `mcp_client` | Connect to external MCP servers |
|
|
267
|
+
| `ipc` | Unix socket IPC server for local processes |
|
|
268
|
+
| `http_request` | HTTP client with retry logic |
|
|
269
|
+
| **UI & System** |
|
|
270
|
+
| `tray` | System tray app with menu controls (macOS) |
|
|
271
|
+
| `ambient` | Ambient AI input overlay with glassmorphism UI |
|
|
272
|
+
| `listen` | Background speech transcription with Whisper |
|
|
273
|
+
| `cursor` | Mouse and keyboard control |
|
|
274
|
+
| `clipboard` | Clipboard monitoring and control |
|
|
275
|
+
| `screen_reader` | Screen OCR and UI element detection |
|
|
276
|
+
| `yolo_vision` | Background object detection with YOLO |
|
|
277
|
+
| **AI & Memory** |
|
|
278
|
+
| `use_agent` | Nested agent instances with different prompts |
|
|
279
|
+
| `install_tools` | Load tools from Python packages at runtime |
|
|
280
|
+
| `retrieve` | RAG retrieval from Bedrock Knowledge Base |
|
|
281
|
+
| `store_in_kb` | Store content in Knowledge Base |
|
|
282
|
+
| **Utilities** |
|
|
283
|
+
| `calculator` | SymPy-powered math (calculus, matrices, equations) |
|
|
284
|
+
| `image_reader` | Read images for vision models |
|
|
285
|
+
| `scraper` | BeautifulSoup4 HTML/XML parsing |
|
|
286
|
+
| `system_prompt` | View/modify agent system prompt |
|
|
287
|
+
| `view_logs` | Search/analyze devduck logs |
|
|
288
|
+
|
|
289
|
+
---
|
|
290
|
+
|
|
291
|
+
## UI Features
|
|
292
|
+
|
|
293
|
+
### Ambient Overlay
|
|
294
|
+
|
|
295
|
+
**Modern glassmorphism input overlay with real-time streaming:**
|
|
296
|
+
|
|
297
|
+
```python
|
|
298
|
+
devduck("start ambient overlay")
|
|
299
|
+
```
|
|
300
|
+
|
|
301
|
+
**Features:**
|
|
302
|
+
- 🎨 Modern glassmorphism UI
|
|
303
|
+
- ⚡ Blinking cursor with auto-focus
|
|
304
|
+
- 🌊 Real-time IPC streaming from devduck
|
|
305
|
+
- 📦 Structured message handling
|
|
306
|
+
- ⌨️ ESC to hide, Enter to send
|
|
307
|
+
- 📜 Preserves scroll position during updates
|
|
308
|
+
|
|
309
|
+
**Requires:** tkinter (install separately - see above)
|
|
310
|
+
|
|
311
|
+
### System Tray App
|
|
312
|
+
|
|
313
|
+
**Menu bar integration with server controls (macOS only):**
|
|
314
|
+
|
|
315
|
+
```python
|
|
316
|
+
devduck("start tray app")
|
|
317
|
+
```
|
|
318
|
+
|
|
319
|
+
**Features:**
|
|
320
|
+
- 🦆 Lives in menu bar
|
|
321
|
+
- 🎛️ Server controls (TCP, WebSocket, MCP)
|
|
322
|
+
- 🌊 Live streaming status
|
|
323
|
+
- 🤖 Quick agent actions (clipboard, listening, screen reader, YOLO)
|
|
324
|
+
- 📊 Recent results history
|
|
325
|
+
- 💬 Native macOS notifications
|
|
326
|
+
|
|
327
|
+
**Requires:** rumps (macOS only)
|
|
328
|
+
|
|
329
|
+
---
|
|
330
|
+
|
|
331
|
+
## RAG Memory
|
|
332
|
+
|
|
333
|
+
**Enable automatic context retrieval and storage:**
|
|
334
|
+
|
|
335
|
+
```bash
|
|
336
|
+
export STRANDS_KNOWLEDGE_BASE_ID="your-kb-id"
|
|
337
|
+
devduck
|
|
338
|
+
```
|
|
339
|
+
|
|
340
|
+
**How it works:**
|
|
341
|
+
1. **Before each query:** Retrieves relevant past conversations
|
|
342
|
+
2. **After each response:** Stores the interaction for future reference
|
|
343
|
+
3. **Zero manual calls:** Fully automatic
|
|
344
|
+
|
|
345
|
+
**Example:**
|
|
346
|
+
```python
|
|
347
|
+
# Session 1
|
|
348
|
+
devduck("I prefer FastAPI over Flask")
|
|
349
|
+
# Stored automatically
|
|
350
|
+
|
|
351
|
+
# Session 2 (days later)
|
|
352
|
+
devduck("Create a web API for me")
|
|
353
|
+
# Retrieves preference → uses FastAPI automatically
|
|
354
|
+
```
|
|
355
|
+
|
|
356
|
+
Works with AWS Bedrock Knowledge Bases.
|
|
357
|
+
|
|
358
|
+
---
|
|
359
|
+
|
|
360
|
+
## MCP Integration
|
|
361
|
+
|
|
362
|
+
**Claude Desktop config:**
|
|
363
|
+
|
|
364
|
+
```json
|
|
365
|
+
{
|
|
366
|
+
"mcpServers": {
|
|
367
|
+
"devduck": {
|
|
368
|
+
"command": "uvx",
|
|
369
|
+
"args": ["devduck", "--mcp"]
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
```
|
|
374
|
+
|
|
375
|
+
**Or connect as MCP client:**
|
|
376
|
+
```python
|
|
377
|
+
devduck("Connect to MCP server at http://localhost:9000/mcp")
|
|
378
|
+
```
|
|
379
|
+
|
|
380
|
+
---
|
|
381
|
+
|
|
382
|
+
## Multi-Model Support
|
|
383
|
+
|
|
384
|
+
**Switch providers via environment:**
|
|
385
|
+
|
|
386
|
+
```bash
|
|
387
|
+
# Bedrock (Claude Sonnet 4.5)
|
|
388
|
+
export MODEL_PROVIDER="bedrock"
|
|
389
|
+
export STRANDS_MODEL_ID="us.anthropic.claude-sonnet-4-5-20250929-v1:0"
|
|
390
|
+
export STRANDS_MAX_TOKENS="60000"
|
|
391
|
+
export STRANDS_ADDITIONAL_REQUEST_FIELDS='{"anthropic_beta": ["interleaved-thinking-2025-05-14", "context-1m-2025-08-07"], "thinking": {"type": "enabled", "budget_tokens": 2048}}'
|
|
392
|
+
|
|
393
|
+
# Anthropic API
|
|
394
|
+
export MODEL_PROVIDER="anthropic"
|
|
395
|
+
export STRANDS_MODEL_ID="claude-sonnet-4-20250514"
|
|
396
|
+
|
|
397
|
+
# Ollama (default - lightweight)
|
|
398
|
+
export MODEL_PROVIDER="ollama"
|
|
399
|
+
export OLLAMA_HOST="http://localhost:11434"
|
|
400
|
+
|
|
401
|
+
# GitHub Models
|
|
402
|
+
export MODEL_PROVIDER="github"
|
|
403
|
+
export STRANDS_MODEL_ID="openai/gpt-4o"
|
|
404
|
+
```
|
|
405
|
+
|
|
406
|
+
**Adaptive defaults:**
|
|
407
|
+
- macOS: `qwen3:1.7b` (lightweight)
|
|
408
|
+
- Linux: `qwen3:30b` (more power)
|
|
409
|
+
- Windows: `qwen3:8b` (balanced)
|
|
410
|
+
|
|
411
|
+
---
|
|
412
|
+
|
|
413
|
+
## Advanced Configuration
|
|
414
|
+
|
|
415
|
+
**Environment variables:**
|
|
416
|
+
|
|
417
|
+
| Variable | Default | Description |
|
|
418
|
+
|----------|---------|-------------|
|
|
419
|
+
| `MODEL_PROVIDER` | `ollama` | Model provider (bedrock, anthropic, ollama, github) |
|
|
420
|
+
| `STRANDS_MODEL_ID` | Auto | Specific model ID |
|
|
421
|
+
| `STRANDS_KNOWLEDGE_BASE_ID` | - | Enable auto-RAG |
|
|
422
|
+
| `DEVDUCK_TCP_PORT` | `9999` | TCP server port |
|
|
423
|
+
| `DEVDUCK_WS_PORT` | `8080` | WebSocket port |
|
|
424
|
+
| `DEVDUCK_MCP_PORT` | `8000` | MCP server port |
|
|
425
|
+
| `DEVDUCK_IPC_SOCKET` | `/tmp/devduck_main.sock` | IPC Unix socket path |
|
|
426
|
+
| `DEVDUCK_ENABLE_TCP` | `true` | Enable TCP server |
|
|
427
|
+
| `DEVDUCK_ENABLE_WS` | `true` | Enable WebSocket |
|
|
428
|
+
| `DEVDUCK_ENABLE_MCP` | `true` | Enable MCP server |
|
|
429
|
+
| `DEVDUCK_ENABLE_IPC` | `true` | Enable IPC server |
|
|
430
|
+
| `DEVDUCK_LOG_LINE_COUNT` | `50` | Log lines in system prompt context |
|
|
431
|
+
| `SYSTEM_PROMPT` | - | Custom system prompt override |
|
|
432
|
+
|
|
433
|
+
**Disable servers:**
|
|
434
|
+
```bash
|
|
435
|
+
export DEVDUCK_ENABLE_TCP=false
|
|
436
|
+
export DEVDUCK_ENABLE_WS=false
|
|
437
|
+
export DEVDUCK_ENABLE_IPC=false
|
|
438
|
+
devduck # Only MCP server
|
|
439
|
+
```
|
|
440
|
+
|
|
441
|
+
---
|
|
442
|
+
|
|
443
|
+
## Troubleshooting
|
|
444
|
+
|
|
445
|
+
**Ollama model not found:**
|
|
446
|
+
```bash
|
|
447
|
+
# DevDuck auto-pulls models, but if it fails:
|
|
448
|
+
ollama pull qwen3:1.7b
|
|
449
|
+
```
|
|
450
|
+
|
|
451
|
+
**Port already in use:**
|
|
452
|
+
```bash
|
|
453
|
+
# Change ports
|
|
454
|
+
export DEVDUCK_TCP_PORT=9000
|
|
455
|
+
export DEVDUCK_WS_PORT=8001
|
|
456
|
+
devduck
|
|
457
|
+
```
|
|
458
|
+
|
|
459
|
+
**Hot-reload not working:**
|
|
460
|
+
```bash
|
|
461
|
+
# Ensure tools directory exists
|
|
462
|
+
mkdir -p ./tools
|
|
463
|
+
|
|
464
|
+
# Check file watcher logs
|
|
465
|
+
devduck
|
|
466
|
+
🦆 view_logs(action="search", pattern="watcher")
|
|
467
|
+
```
|
|
468
|
+
|
|
469
|
+
**Memory/performance issues:**
|
|
470
|
+
```bash
|
|
471
|
+
# Use lighter model
|
|
472
|
+
export STRANDS_MODEL_ID="qwen3:0.5b"
|
|
473
|
+
|
|
474
|
+
# Reduce context
|
|
475
|
+
export DEVDUCK_LOG_LINE_COUNT=20
|
|
476
|
+
export DEVDUCK_LAST_MESSAGE_COUNT=50
|
|
477
|
+
```
|
|
478
|
+
|
|
479
|
+
**Ambient overlay not starting:**
|
|
480
|
+
```bash
|
|
481
|
+
# Make sure tkinter is installed
|
|
482
|
+
python3 -c "import tkinter"
|
|
483
|
+
|
|
484
|
+
# Install tkinter if missing (see installation section above)
|
|
485
|
+
brew install python-tk@3.13 # macOS
|
|
486
|
+
```
|
|
487
|
+
|
|
488
|
+
**Tray app not starting (macOS):**
|
|
489
|
+
```bash
|
|
490
|
+
# Install rumps
|
|
491
|
+
pip install rumps
|
|
492
|
+
|
|
493
|
+
# Or reinstall devduck
|
|
494
|
+
pip install -e .
|
|
495
|
+
```
|
|
496
|
+
|
|
497
|
+
---
|
|
498
|
+
|
|
499
|
+
## GitHub Actions Integration
|
|
500
|
+
|
|
501
|
+
**Run DevDuck in CI/CD pipelines:**
|
|
502
|
+
|
|
503
|
+
```yaml
|
|
504
|
+
name: AI Code Assistant
|
|
505
|
+
on:
|
|
506
|
+
issues:
|
|
507
|
+
types: [opened, edited]
|
|
508
|
+
pull_request:
|
|
509
|
+
types: [opened, edited, synchronize]
|
|
510
|
+
|
|
511
|
+
jobs:
|
|
512
|
+
devduck:
|
|
513
|
+
runs-on: ubuntu-latest
|
|
514
|
+
permissions:
|
|
515
|
+
contents: read
|
|
516
|
+
issues: write
|
|
517
|
+
pull-requests: write
|
|
518
|
+
steps:
|
|
519
|
+
- uses: cagataycali/devduck@main
|
|
520
|
+
with:
|
|
521
|
+
task: "Analyze and help with this issue or PR"
|
|
522
|
+
provider: "github"
|
|
523
|
+
model: "gpt-4o"
|
|
524
|
+
tools: "shell,file_read,file_write,use_github,calculator"
|
|
525
|
+
```
|
|
526
|
+
|
|
527
|
+
**Sub-agent workflows:**
|
|
528
|
+
```python
|
|
529
|
+
devduck("Create a sub-agent to analyze test coverage")
|
|
530
|
+
```
|
|
531
|
+
|
|
532
|
+
---
|
|
533
|
+
|
|
534
|
+
## Resources
|
|
535
|
+
|
|
536
|
+
- **Strands SDK:** [github.com/strands-agents/sdk-python](https://github.com/strands-agents/sdk-python)
|
|
537
|
+
- **Documentation:** [strandsagents.com](https://strandsagents.com)
|
|
538
|
+
- **Web UI:** [cagataycali.github.io/devduck](http://cagataycali.github.io/devduck)
|
|
539
|
+
- **Homebrew:** [github.com/cagataycali/homebrew-devduck](https://github.com/cagataycali/homebrew-devduck)
|
|
540
|
+
|
|
541
|
+
---
|
|
542
|
+
|
|
543
|
+
## Citation
|
|
544
|
+
|
|
545
|
+
```bibtex
|
|
546
|
+
@software{devduck2025,
|
|
547
|
+
author = {Cagatay Cali},
|
|
548
|
+
title = {DevDuck: Self-Healing AI Agent with Hot-Reload and Multi-Protocol Servers},
|
|
549
|
+
year = {2025},
|
|
550
|
+
url = {https://github.com/cagataycali/devduck}
|
|
551
|
+
}
|
|
552
|
+
```
|
|
553
|
+
|
|
554
|
+
**Apache 2 License** | Built with [Strands Agents SDK](https://strandsagents.com)
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
devduck/__init__.py,sha256=q0IrDemVoenG34IU_LHdmjB7canmluWHQBbiTsgMYR8,57338
|
|
2
|
+
devduck/__main__.py,sha256=aeF2RR4k7lzSR2X1QKV9XQPCKhtsH0JYUv2etBBqmL0,145
|
|
3
|
+
devduck/_version.py,sha256=fvHpBU3KZKRinkriKdtAt3crenOyysELF-M9y3ozg3U,704
|
|
4
|
+
devduck/test_redduck.py,sha256=nqRchR7d54jWGx7JN5tji2ZV4Ek4L9s-P7hp0mKjA0Y,1773
|
|
5
|
+
devduck/tools/__init__.py,sha256=PAgIkQcxTx5KU441wi6OgCHiinRqjckQxRLcWqbUCwM,248
|
|
6
|
+
devduck/tools/_ambient_input.py,sha256=3lBgLO81BvkxjgTrQc-EuxNLXmO1oPUt2Ysg1jR4Fsk,13897
|
|
7
|
+
devduck/tools/_tray_app.py,sha256=VOuuOLNpOJ0vp5WMgOnBvlfHYSeKzUiSpeJuFBFvxRw,19152
|
|
8
|
+
devduck/tools/ambient.py,sha256=HB1ZhfeOdOaMU0xe4e44VNUT_-DQ5SY7sl3r4r-4X44,4806
|
|
9
|
+
devduck/tools/create_subagent.py,sha256=UzRz9BmU4PbTveZROEpZ311aH-u-i6x89gttu-CniAE,24687
|
|
10
|
+
devduck/tools/install_tools.py,sha256=wm_67b9IfY-2wRuWgxuEKhaSIV5vNfbGmZL3G9dGi2A,10348
|
|
11
|
+
devduck/tools/ipc.py,sha256=4YARnIwAkvUwTKUG534hfiZjEL4Km63ykJ_6DnJ72Dc,18478
|
|
12
|
+
devduck/tools/mcp_server.py,sha256=Ybp0PcJKW2TOvghsRL-i8Guqc9WokPwOD2bhVgzoj6Q,21490
|
|
13
|
+
devduck/tools/store_in_kb.py,sha256=-JM-oRQKR3FBubKHFHmXRnZSvi9dVgHxG0lismMgG2k,6861
|
|
14
|
+
devduck/tools/system_prompt.py,sha256=waAdmvRhyulorw_tLqpqUJN_AahuaeF2rXqjMqN7IRY,16905
|
|
15
|
+
devduck/tools/tcp.py,sha256=f74xWa9pgBgQ3icr-KsRVM8GEEs6Wi9B4eP_ZYlKxhQ,21726
|
|
16
|
+
devduck/tools/tray.py,sha256=hlX7LSsS1sOavVDulcsyydmKQ0jCa4Ong3kzsBYMlQY,7531
|
|
17
|
+
devduck/tools/use_github.py,sha256=nr3JSGk48mKUobpgW__2gu6lFyUj93a1XRs3I6vH8W4,13682
|
|
18
|
+
devduck/tools/websocket.py,sha256=lRJZt813iHorVr5UI66Lq-lmaFuLYAfpodeV2gtda7k,16635
|
|
19
|
+
devduck-0.5.0.dist-info/licenses/LICENSE,sha256=UANcoWwfVeuM9597WUkjEQbzqIUH0bJoE9Tpwgj_LvU,11345
|
|
20
|
+
devduck-0.5.0.dist-info/METADATA,sha256=OcmZn6REtBizgbUtfB9cro43M_w0DvgxAQeMryJ39cM,14533
|
|
21
|
+
devduck-0.5.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
22
|
+
devduck-0.5.0.dist-info/entry_points.txt,sha256=n2-DJpbibfm1YlPARgBdlseUZkZWYj09-eEadxamSGI,56
|
|
23
|
+
devduck-0.5.0.dist-info/top_level.txt,sha256=ySXWlVronp8xHYfQ_Hdfr463e0EnbWuqyuxs94EU7yk,8
|
|
24
|
+
devduck-0.5.0.dist-info/RECORD,,
|