devduck 0.7.0__py3-none-any.whl → 1.1.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 +151 -67
- devduck/_version.py +2 -2
- devduck/tools/speech_to_speech.py +750 -0
- devduck-1.1.0.dist-info/METADATA +716 -0
- {devduck-0.7.0.dist-info → devduck-1.1.0.dist-info}/RECORD +9 -8
- {devduck-0.7.0.dist-info → devduck-1.1.0.dist-info}/entry_points.txt +1 -0
- devduck-0.7.0.dist-info/METADATA +0 -589
- {devduck-0.7.0.dist-info → devduck-1.1.0.dist-info}/WHEEL +0 -0
- {devduck-0.7.0.dist-info → devduck-1.1.0.dist-info}/licenses/LICENSE +0 -0
- {devduck-0.7.0.dist-info → devduck-1.1.0.dist-info}/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
devduck/__init__.py,sha256=
|
|
1
|
+
devduck/__init__.py,sha256=P7xQxthfPj2sDfcxn-kwA24gtBbtfDYu2Tf_y8KuEic,71545
|
|
2
2
|
devduck/__main__.py,sha256=aeF2RR4k7lzSR2X1QKV9XQPCKhtsH0JYUv2etBBqmL0,145
|
|
3
|
-
devduck/_version.py,sha256=
|
|
3
|
+
devduck/_version.py,sha256=ePNVzJOkxR8FY5bezqKQ_fgBRbzH1G7QTaRDHvGQRAY,704
|
|
4
4
|
devduck/agentcore_handler.py,sha256=0DKJTTjoH9P8a70G0f5dOIIwy6bjqaN46voAWaSOpDY,2221
|
|
5
5
|
devduck/test_redduck.py,sha256=ILtKKMuoyVfmhnibmbojpbOsqbcKooZv4j9qtE2LWdw,1750
|
|
6
6
|
devduck/tools/__init__.py,sha256=AmIy8MInaClaZ71fqzy4EQJnBWsLkrv4QW9IIN7UQyw,1367
|
|
@@ -15,6 +15,7 @@ devduck/tools/create_subagent.py,sha256=UzRz9BmU4PbTveZROEpZ311aH-u-i6x89gttu-Cn
|
|
|
15
15
|
devduck/tools/install_tools.py,sha256=3uzRg5lEHX-L6gxnFn3mIKjGYDJ3h_AdwGnEwKA9qR0,14284
|
|
16
16
|
devduck/tools/ipc.py,sha256=e3KJeR2HmCKEtVLGNOtf6CeFi3pTDehwd7Fu4JJ19Ms,18607
|
|
17
17
|
devduck/tools/mcp_server.py,sha256=Ybp0PcJKW2TOvghsRL-i8Guqc9WokPwOD2bhVgzoj6Q,21490
|
|
18
|
+
devduck/tools/speech_to_speech.py,sha256=rw9Olrdd_JvfeInk1ZeztVzSSuw5QQ_2Vnt-WbtLu50,28627
|
|
18
19
|
devduck/tools/state_manager.py,sha256=hrleqdVoCboNd8R3wDRUXVKYCZdGoe1j925i948LTHc,10563
|
|
19
20
|
devduck/tools/store_in_kb.py,sha256=-JM-oRQKR3FBubKHFHmXRnZSvi9dVgHxG0lismMgG2k,6861
|
|
20
21
|
devduck/tools/system_prompt.py,sha256=waAdmvRhyulorw_tLqpqUJN_AahuaeF2rXqjMqN7IRY,16905
|
|
@@ -22,9 +23,9 @@ devduck/tools/tcp.py,sha256=w2m_Jf6vZ4NYu0AwgZd7C7eKs4No2EVHZ2WYIl_Bt0A,22017
|
|
|
22
23
|
devduck/tools/tray.py,sha256=FgVhUtLdsdv5_ERK-RyAIpDE8Zb0IfoqhHQdwMxrHUQ,7547
|
|
23
24
|
devduck/tools/use_github.py,sha256=nr3JSGk48mKUobpgW__2gu6lFyUj93a1XRs3I6vH8W4,13682
|
|
24
25
|
devduck/tools/websocket.py,sha256=A8bqgdDZs8hcf2HctkJzQOzMvb5mXUC7YZ-xqkOyn94,16959
|
|
25
|
-
devduck-
|
|
26
|
-
devduck-
|
|
27
|
-
devduck-
|
|
28
|
-
devduck-
|
|
29
|
-
devduck-
|
|
30
|
-
devduck-
|
|
26
|
+
devduck-1.1.0.dist-info/licenses/LICENSE,sha256=UANcoWwfVeuM9597WUkjEQbzqIUH0bJoE9Tpwgj_LvU,11345
|
|
27
|
+
devduck-1.1.0.dist-info/METADATA,sha256=UM7NICyyRNPlMkvh-qKaGktgJGjxEi6qboUeIzLmwvo,21855
|
|
28
|
+
devduck-1.1.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
29
|
+
devduck-1.1.0.dist-info/entry_points.txt,sha256=PJ8gvdi2MnKEK8yCwcmZDeLQ-lx94EV_jp4-v8AKuTA,58
|
|
30
|
+
devduck-1.1.0.dist-info/top_level.txt,sha256=ySXWlVronp8xHYfQ_Hdfr463e0EnbWuqyuxs94EU7yk,8
|
|
31
|
+
devduck-1.1.0.dist-info/RECORD,,
|
devduck-0.7.0.dist-info/METADATA
DELETED
|
@@ -1,589 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: devduck
|
|
3
|
-
Version: 0.7.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-fun-tools[all]; sys_platform == "darwin"
|
|
37
|
-
Requires-Dist: strands-fun-tools[audio]; sys_platform == "darwin"
|
|
38
|
-
Requires-Dist: beautifulsoup4
|
|
39
|
-
Requires-Dist: colorama
|
|
40
|
-
Requires-Dist: websockets
|
|
41
|
-
Requires-Dist: strands-mcp-server
|
|
42
|
-
Requires-Dist: bedrock-agentcore-starter-toolkit
|
|
43
|
-
Requires-Dist: bedrock-agentcore
|
|
44
|
-
Requires-Dist: rumps; sys_platform == "darwin"
|
|
45
|
-
Requires-Dist: strands-mlx; sys_platform == "darwin"
|
|
46
|
-
Dynamic: license-file
|
|
47
|
-
|
|
48
|
-
# 🦆 DevDuck
|
|
49
|
-
|
|
50
|
-
[](https://pypi.org/project/devduck/)
|
|
51
|
-
|
|
52
|
-
**Self-modifying AI agent that hot-reloads its own code—builds itself as it runs.**
|
|
53
|
-
|
|
54
|
-
One Python file that adapts to your environment, fixes itself, and expands capabilities at runtime.
|
|
55
|
-
|
|
56
|
-
Learn more: https://duck.nyc
|
|
57
|
-
|
|
58
|
-
## 🎬 See It In Action
|
|
59
|
-
|
|
60
|
-
| Feature | What You'll See | Video |
|
|
61
|
-
|---------|----------------|-------|
|
|
62
|
-
| 🔥 **Hot-Reload** | Agent detects code changes and restarts instantly—no manual intervention needed. Edit your agent code or tools while running, save the file, and watch it reload automatically. | [Watch Demo](https://redduck.dev/videos/hot-reload.mp4) |
|
|
63
|
-
| 🌐 **Web UI** | Clean, modern web interface for chatting with DevDuck. Real-time streaming responses, tool execution visibility, and beautiful markdown rendering. | [Watch Demo](https://redduck.dev/videos/web-ui.mp4) |
|
|
64
|
-
| 🛠️ **Dynamic Tool Creation** | Create a new tool by simply saving a `.py` file in the `./tools/` directory. No restart, no configuration—the agent loads it instantly and starts using it. Pure hot-reload magic. | [Watch Demo](https://redduck.dev/videos/dynamic-tool-creation.mp4) |
|
|
65
|
-
| 🌊 **TCP Streaming Server** | Connect from any client (netcat, custom apps, other agents) via TCP. Real-time streaming responses with parallel tool execution. Multi-protocol access to the same agent. | [Watch Demo](https://redduck.dev/videos/tcp.mp4) |
|
|
66
|
-
| 🔌 **IPC & macOS Tray** | Unix socket-based inter-process communication with native macOS menu bar integration. DevDuck runs in your menu bar with quick actions, status indicators, and seamless IPC streaming via `/tmp/devduck_main.sock`. |  |
|
|
67
|
-
| 💬 **Ambient Overlay** | Floating AI input overlay with glassmorphism UI. Real-time IPC streaming from devduck, auto-focus with blinking cursor, and ESC to hide / Enter to send. Perfect for desktop AI interactions. | [Watch Demo](https://redduck.dev/videos/floating-input.mp4) |
|
|
68
|
-
|
|
69
|
-
---
|
|
70
|
-
|
|
71
|
-
## Install & Run
|
|
72
|
-
|
|
73
|
-
| Method | Command |
|
|
74
|
-
|--------|---------|
|
|
75
|
-
| **pipx** | `pipx install devduck && devduck` |
|
|
76
|
-
| **uvx** | `uvx devduck "create a Flask API"` |
|
|
77
|
-
| **Python** | `pip install devduck` → `import devduck; devduck("query")` |
|
|
78
|
-
|
|
79
|
-
**Requirements:** Python 3.10-3.13, Bedrock (or Ollama/Anthropic/GitHub/MLX)
|
|
80
|
-
|
|
81
|
-
---
|
|
82
|
-
|
|
83
|
-
## Developer Setup
|
|
84
|
-
|
|
85
|
-
**Clone and develop:**
|
|
86
|
-
```bash
|
|
87
|
-
git clone git@github.com:cagataycali/devduck.git
|
|
88
|
-
cd devduck
|
|
89
|
-
python3.13 -m venv .venv
|
|
90
|
-
source .venv/bin/activate
|
|
91
|
-
.venv/bin/pip3.13 install -e .
|
|
92
|
-
|
|
93
|
-
# Now which devduck points to .venv
|
|
94
|
-
which devduck
|
|
95
|
-
# /path/to/devduck/.venv/bin/devduck
|
|
96
|
-
```
|
|
97
|
-
|
|
98
|
-
**Make changes → test instantly:**
|
|
99
|
-
```bash
|
|
100
|
-
# Edit devduck/__init__.py or tools/
|
|
101
|
-
code .
|
|
102
|
-
|
|
103
|
-
# Run immediately (hot-reloads on save)
|
|
104
|
-
devduck
|
|
105
|
-
```
|
|
106
|
-
|
|
107
|
-
---
|
|
108
|
-
|
|
109
|
-
## What It Does
|
|
110
|
-
|
|
111
|
-
| Feature | Description | Example |
|
|
112
|
-
|---------|-------------|---------|
|
|
113
|
-
| 🔥 **Hot-Reload** | Agent reloads its own code + custom tools instantly | Modify agent code → auto-restart, or add `weather.py` → use immediately |
|
|
114
|
-
| 🧠 **Auto-RAG** | Remembers past conversations | "I prefer FastAPI" → later uses FastAPI automatically |
|
|
115
|
-
| 🌊 **Multi-Protocol** | CLI, Python, TCP, WebSocket, MCP, IPC | `devduck "query"` or `nc localhost 9999` |
|
|
116
|
-
| ☁️ **AWS Deploy** | One-command serverless deployment | `agentcore_config(auto_launch=True)` |
|
|
117
|
-
| 🛠️ **35+ Tools** | Shell, GitHub, file editing, math, UI control | `devduck("create GitHub issue")` |
|
|
118
|
-
| 🎛️ **Flexible Config** | Load only tools you need | `DEVDUCK_TOOLS="strands_tools:shell,editor"` |
|
|
119
|
-
|
|
120
|
-
---
|
|
121
|
-
|
|
122
|
-
## Architecture
|
|
123
|
-
|
|
124
|
-
```mermaid
|
|
125
|
-
graph TB
|
|
126
|
-
A[User Input] -->|CLI/TCP/WS/MCP/IPC| B[DevDuck Core]
|
|
127
|
-
B -->|Auto RAG| C[Knowledge Base]
|
|
128
|
-
C -.->|Context Retrieval| B
|
|
129
|
-
B -->|Tool Calls| D[35+ Built-in Tools]
|
|
130
|
-
D --> E[shell/editor/calculator]
|
|
131
|
-
D --> F[GitHub/AgentCore]
|
|
132
|
-
D --> G[TCP/WebSocket/MCP/IPC]
|
|
133
|
-
D --> H[tray/ambient/cursor/clipboard]
|
|
134
|
-
B -->|Hot-reload| I[./tools/*.py + __init__.py]
|
|
135
|
-
I -.->|Load Instantly| D
|
|
136
|
-
B -->|Response| J[User Output]
|
|
137
|
-
J -.->|Store Memory| C
|
|
138
|
-
|
|
139
|
-
style B fill:#e1f5ff
|
|
140
|
-
style C fill:#d4edda
|
|
141
|
-
style I fill:#fff3cd
|
|
142
|
-
style H fill:#ffe6f0
|
|
143
|
-
```
|
|
144
|
-
|
|
145
|
-
**Self-adapting loop:** User queries → RAG retrieval → Tool execution → Response → Memory storage → Hot-reload new capabilities → Repeat.
|
|
146
|
-
|
|
147
|
-
---
|
|
148
|
-
|
|
149
|
-
## Quick Start
|
|
150
|
-
|
|
151
|
-
```bash
|
|
152
|
-
# 1. Install
|
|
153
|
-
pipx install devduck
|
|
154
|
-
|
|
155
|
-
# 2. Start (auto-launches TCP/WS/MCP/IPC servers)
|
|
156
|
-
devduck
|
|
157
|
-
|
|
158
|
-
# 3. Use
|
|
159
|
-
🦆 create a REST API with FastAPI
|
|
160
|
-
🦆 !ls -la
|
|
161
|
-
🦆 exit
|
|
162
|
-
```
|
|
163
|
-
|
|
164
|
-
**One-shot:**
|
|
165
|
-
```bash
|
|
166
|
-
devduck "analyze this error: ImportError: No module named 'flask'"
|
|
167
|
-
```
|
|
168
|
-
|
|
169
|
-
**Python API:**
|
|
170
|
-
```python
|
|
171
|
-
import devduck
|
|
172
|
-
devduck("refactor my code to use async/await")
|
|
173
|
-
```
|
|
174
|
-
|
|
175
|
-
---
|
|
176
|
-
|
|
177
|
-
## Model Setup
|
|
178
|
-
|
|
179
|
-
| Provider | Setup | When to Use |
|
|
180
|
-
|----------|-------|-------------|
|
|
181
|
-
| **Bedrock** (auto-detected) | [Get API key](https://console.aws.amazon.com/bedrock) → `export AWS_BEARER_TOKEN_BEDROCK=...` | Auto-selected if credentials found |
|
|
182
|
-
| **MLX** (macOS auto-detected) | Auto-detected on Apple Silicon | Local, optimized for M-series Macs |
|
|
183
|
-
| **Ollama** (fallback) | `ollama pull qwen3:1.7b` | Local, free, private (used if Bedrock/MLX unavailable) |
|
|
184
|
-
| **Anthropic** | `export ANTHROPIC_API_KEY=...` | Claude API direct access |
|
|
185
|
-
| **GitHub** | `export GITHUB_TOKEN=...` | Free GPT-4o for GitHub users |
|
|
186
|
-
|
|
187
|
-
**Quick Bedrock setup:**
|
|
188
|
-
```bash
|
|
189
|
-
export MODEL_PROVIDER=bedrock
|
|
190
|
-
export AWS_BEARER_TOKEN_BEDROCK=your_token # From AWS console
|
|
191
|
-
devduck
|
|
192
|
-
```
|
|
193
|
-
|
|
194
|
-
---
|
|
195
|
-
|
|
196
|
-
## Core Tools
|
|
197
|
-
|
|
198
|
-
| Category | Tools | Use Case |
|
|
199
|
-
|----------|-------|----------|
|
|
200
|
-
| **Dev** | `shell`, `editor`, `file_read`, `calculator` | Code, test, debug |
|
|
201
|
-
| **GitHub** | `use_github`, `create_subagent` | Issues, PRs, CI/CD automation |
|
|
202
|
-
| **Network** | `tcp`, `websocket`, `mcp_server`, `ipc` | Serve agents over protocols |
|
|
203
|
-
| **AWS** | `agentcore_config`, `agentcore_invoke`, `agentcore_logs`, `agentcore_agents` | Deploy to serverless |
|
|
204
|
-
| **AI** | `use_agent`, `retrieve`, `store_in_kb`, `state_manager` | Multi-agent, memory, state |
|
|
205
|
-
| **UI** (macOS) | `tray`, `ambient`, `cursor`, `clipboard` | Desktop automation |
|
|
206
|
-
|
|
207
|
-
<details>
|
|
208
|
-
<summary><strong>📋 Full tool list (click to expand)</strong></summary>
|
|
209
|
-
|
|
210
|
-
### DevDuck Core Tools
|
|
211
|
-
- `tcp` - TCP server with streaming
|
|
212
|
-
- `websocket` - WebSocket server with concurrent messaging
|
|
213
|
-
- `ipc` - Unix socket IPC server
|
|
214
|
-
- `mcp_server` - MCP server (HTTP/stdio)
|
|
215
|
-
- `install_tools` - Dynamic tool loading from packages
|
|
216
|
-
- `use_github` - GitHub GraphQL API operations
|
|
217
|
-
- `create_subagent` - Spawn sub-agents via GitHub Actions
|
|
218
|
-
- `store_in_kb` - Store content in Bedrock Knowledge Base
|
|
219
|
-
- `system_prompt` - Manage agent system prompt
|
|
220
|
-
- `state_manager` - Agent state management with time-travel capabilities
|
|
221
|
-
- `tray` - System tray app control (macOS)
|
|
222
|
-
- `ambient` - Ambient AI input overlay (macOS)
|
|
223
|
-
|
|
224
|
-
### AgentCore Tools (AWS)
|
|
225
|
-
- `agentcore_config` - Configure & launch on Bedrock AgentCore
|
|
226
|
-
- `agentcore_invoke` - Invoke deployed agents
|
|
227
|
-
- `agentcore_logs` - View CloudWatch logs
|
|
228
|
-
- `agentcore_agents` - List/manage agent runtimes
|
|
229
|
-
|
|
230
|
-
### strands-agents-tools
|
|
231
|
-
- `shell` - Interactive shell with PTY support
|
|
232
|
-
- `editor` - File editing (view/create/replace/insert)
|
|
233
|
-
- `file_read` - Multi-file reading with search
|
|
234
|
-
- `file_write` - Write content to files
|
|
235
|
-
- `calculator` - SymPy-powered math operations
|
|
236
|
-
- `image_reader` - Read images for Converse API
|
|
237
|
-
- `use_agent` - Nested agent with different model
|
|
238
|
-
- `load_tool` - Load custom tools at runtime
|
|
239
|
-
- `environment` - Environment variable management
|
|
240
|
-
- `mcp_client` - Connect to external MCP servers
|
|
241
|
-
- `retrieve` - Bedrock Knowledge Base retrieval
|
|
242
|
-
- `scraper` - HTML/XML parsing with BeautifulSoup4
|
|
243
|
-
- `fetch_github_tool` - Fetch and load tools from GitHub
|
|
244
|
-
- `gist` - Comprehensive GitHub Gist management
|
|
245
|
-
- `add_comment` - Add comments to GitHub issues/PRs
|
|
246
|
-
- `list_issues` - List GitHub issues
|
|
247
|
-
- `list_pull_requests` - List GitHub pull requests
|
|
248
|
-
|
|
249
|
-
### strands-fun-tools (macOS)
|
|
250
|
-
- `listen` - Background speech transcription with Whisper
|
|
251
|
-
- `cursor` - Mouse & keyboard control
|
|
252
|
-
- `clipboard` - Clipboard monitoring & control
|
|
253
|
-
- `screen_reader` - OCR & UI element detection
|
|
254
|
-
- `yolo_vision` - Object detection with YOLO
|
|
255
|
-
|
|
256
|
-
### Hot-Reload Tools
|
|
257
|
-
- Custom tools in `./tools/*.py` load instantly
|
|
258
|
-
- Agent code changes trigger auto-restart
|
|
259
|
-
|
|
260
|
-
</details>
|
|
261
|
-
|
|
262
|
-
---
|
|
263
|
-
|
|
264
|
-
## Hot-Reload Example
|
|
265
|
-
|
|
266
|
-
```python
|
|
267
|
-
# ./tools/weather.py
|
|
268
|
-
from strands import tool
|
|
269
|
-
import requests
|
|
270
|
-
|
|
271
|
-
@tool
|
|
272
|
-
def weather(city: str) -> str:
|
|
273
|
-
"""Get weather for a city."""
|
|
274
|
-
r = requests.get(f"https://wttr.in/{city}?format=%C+%t")
|
|
275
|
-
return r.text
|
|
276
|
-
```
|
|
277
|
-
|
|
278
|
-
**Save → use instantly:**
|
|
279
|
-
```bash
|
|
280
|
-
🦆 weather(city="Tokyo")
|
|
281
|
-
# Clear sky +15°C
|
|
282
|
-
```
|
|
283
|
-
|
|
284
|
-
No restart. No configuration. Just works.
|
|
285
|
-
|
|
286
|
-
---
|
|
287
|
-
|
|
288
|
-
## Access Methods
|
|
289
|
-
|
|
290
|
-
| Protocol | Endpoint | Test Command |
|
|
291
|
-
|----------|----------|--------------|
|
|
292
|
-
| CLI | Terminal | `devduck "query"` |
|
|
293
|
-
| Python | Import | `from devduck import devduck` |
|
|
294
|
-
| TCP | `localhost:9999` | `nc localhost 9999` |
|
|
295
|
-
| WebSocket | `ws://localhost:8080` | `wscat -c ws://localhost:8080` |
|
|
296
|
-
| MCP | `http://localhost:8000/mcp` | Add to Claude Desktop config |
|
|
297
|
-
| IPC | `/tmp/devduck_main.sock` | `nc -U /tmp/devduck_main.sock` |
|
|
298
|
-
|
|
299
|
-
**Custom ports:** `export DEVDUCK_TCP_PORT=9000`
|
|
300
|
-
|
|
301
|
-
---
|
|
302
|
-
|
|
303
|
-
## Configuration
|
|
304
|
-
|
|
305
|
-
| Variable | Default | Options |
|
|
306
|
-
|----------|---------|---------|
|
|
307
|
-
| `MODEL_PROVIDER` | Auto-detect | `bedrock`, `anthropic`, `github`, `mlx`, `ollama` |
|
|
308
|
-
| `STRANDS_MODEL_ID` | Auto | Model name (e.g., `qwen3:1.7b`, `claude-sonnet-4`) |
|
|
309
|
-
| `DEVDUCK_TOOLS` | 37 default tools | `package:tool1,tool2:package2:tool3` format |
|
|
310
|
-
| `DEVDUCK_LOAD_TOOLS_FROM_DIR` | `false` | `true`/`false` - Auto-load tools from `./tools/` directory |
|
|
311
|
-
| `DEVDUCK_KNOWLEDGE_BASE_ID` | - | Bedrock KB ID for auto-RAG |
|
|
312
|
-
| `DEVDUCK_TCP_PORT` | `9999` | TCP server port |
|
|
313
|
-
| `DEVDUCK_ENABLE_TCP` | `true` | Enable/disable TCP |
|
|
314
|
-
|
|
315
|
-
### Tool Configuration Format
|
|
316
|
-
|
|
317
|
-
**Format:** `package:tool1,tool2:package2:tool3`
|
|
318
|
-
|
|
319
|
-
**Directory Auto-Loading:**
|
|
320
|
-
|
|
321
|
-
By default, DevDuck **does not** automatically load tools from the `./tools/` directory. This gives you explicit control over which tools are loaded. To enable automatic loading of tools from `./tools/`, set:
|
|
322
|
-
|
|
323
|
-
```bash
|
|
324
|
-
export DEVDUCK_LOAD_TOOLS_FROM_DIR=true
|
|
325
|
-
devduck
|
|
326
|
-
```
|
|
327
|
-
|
|
328
|
-
When enabled, any `.py` file in `./tools/` with a `@tool` decorator will be loaded automatically. When disabled (default), you control tool loading via `DEVDUCK_TOOLS` or runtime `manage_tools()` calls.
|
|
329
|
-
|
|
330
|
-
**Examples:**
|
|
331
|
-
```bash
|
|
332
|
-
# Minimal (shell + editor only)
|
|
333
|
-
export DEVDUCK_TOOLS="strands_tools:shell,editor"
|
|
334
|
-
|
|
335
|
-
# Dev tools only
|
|
336
|
-
export DEVDUCK_TOOLS="strands_tools:shell,editor,file_read,file_write,calculator"
|
|
337
|
-
|
|
338
|
-
# Full DevDuck + Strands (no fun tools)
|
|
339
|
-
export DEVDUCK_TOOLS="devduck.tools:tcp,websocket,mcp_server,use_github:strands_tools:shell,editor,file_read"
|
|
340
|
-
|
|
341
|
-
# Custom package
|
|
342
|
-
export DEVDUCK_TOOLS="my_tools:custom_tool,another_tool:strands_tools:shell"
|
|
343
|
-
|
|
344
|
-
devduck
|
|
345
|
-
```
|
|
346
|
-
|
|
347
|
-
**Runtime tool management:**
|
|
348
|
-
```python
|
|
349
|
-
# List loaded tools
|
|
350
|
-
manage_tools(action="list")
|
|
351
|
-
|
|
352
|
-
# Add tools at runtime
|
|
353
|
-
manage_tools(action="add", package="strands_fun_tools", tool_names="cursor,clipboard")
|
|
354
|
-
|
|
355
|
-
# Remove tools
|
|
356
|
-
manage_tools(action="remove", tool_names="cursor,clipboard")
|
|
357
|
-
|
|
358
|
-
# Reload specific tools
|
|
359
|
-
manage_tools(action="reload", tool_names="shell,editor")
|
|
360
|
-
|
|
361
|
-
# Reload all (restart agent)
|
|
362
|
-
manage_tools(action="reload")
|
|
363
|
-
```
|
|
364
|
-
|
|
365
|
-
**Discover tools before loading:**
|
|
366
|
-
```python
|
|
367
|
-
# List available tools in a package
|
|
368
|
-
install_tools(action="list_available", package="strands-fun-tools", module="strands_fun_tools")
|
|
369
|
-
```
|
|
370
|
-
|
|
371
|
-
---
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
## MCP Integration
|
|
375
|
-
|
|
376
|
-
### Expose DevDuck as MCP Server
|
|
377
|
-
|
|
378
|
-
**Claude Desktop** (`~/Library/Application Support/Claude/claude_desktop_config.json`):
|
|
379
|
-
```json
|
|
380
|
-
{
|
|
381
|
-
"mcpServers": {
|
|
382
|
-
"devduck": {
|
|
383
|
-
"command": "uvx",
|
|
384
|
-
"args": ["devduck", "--mcp"]
|
|
385
|
-
}
|
|
386
|
-
}
|
|
387
|
-
}
|
|
388
|
-
```
|
|
389
|
-
|
|
390
|
-
Restart Claude → DevDuck tools appear automatically.
|
|
391
|
-
|
|
392
|
-
### Load External MCP Servers
|
|
393
|
-
|
|
394
|
-
DevDuck can act as an MCP client and load tools from external MCP servers automatically.
|
|
395
|
-
|
|
396
|
-
**Setup:**
|
|
397
|
-
```bash
|
|
398
|
-
export MCP_SERVERS='{
|
|
399
|
-
"mcpServers": {
|
|
400
|
-
"strands": {
|
|
401
|
-
"command": "uvx",
|
|
402
|
-
"args": ["strands-agents-mcp-server"]
|
|
403
|
-
}
|
|
404
|
-
}
|
|
405
|
-
}'
|
|
406
|
-
devduck
|
|
407
|
-
```
|
|
408
|
-
|
|
409
|
-
**Supported Transport Types:**
|
|
410
|
-
|
|
411
|
-
| Transport | Configuration | Example |
|
|
412
|
-
|-----------|--------------|---------|
|
|
413
|
-
| **stdio** | `command`, `args`, `env` | Executables via stdin/stdout |
|
|
414
|
-
| **HTTP** | `url`, `headers` | Remote servers via HTTP |
|
|
415
|
-
| **SSE** | `url` (with `/sse` path) | Server-Sent Events streaming |
|
|
416
|
-
|
|
417
|
-
**Examples:**
|
|
418
|
-
|
|
419
|
-
```bash
|
|
420
|
-
# Stdio server
|
|
421
|
-
export MCP_SERVERS='{
|
|
422
|
-
"mcpServers": {
|
|
423
|
-
"myserver": {
|
|
424
|
-
"command": "python",
|
|
425
|
-
"args": ["server.py"],
|
|
426
|
-
"env": {"API_KEY": "secret"}
|
|
427
|
-
}
|
|
428
|
-
}
|
|
429
|
-
}'
|
|
430
|
-
|
|
431
|
-
# HTTP server
|
|
432
|
-
export MCP_SERVERS='{
|
|
433
|
-
"mcpServers": {
|
|
434
|
-
"remote": {
|
|
435
|
-
"url": "https://api.example.com/mcp",
|
|
436
|
-
"headers": {"Authorization": "Bearer token"}
|
|
437
|
-
}
|
|
438
|
-
}
|
|
439
|
-
}'
|
|
440
|
-
|
|
441
|
-
# SSE server
|
|
442
|
-
export MCP_SERVERS='{
|
|
443
|
-
"mcpServers": {
|
|
444
|
-
"events": {
|
|
445
|
-
"url": "https://api.example.com/sse"
|
|
446
|
-
}
|
|
447
|
-
}
|
|
448
|
-
}'
|
|
449
|
-
|
|
450
|
-
# Multiple servers
|
|
451
|
-
export MCP_SERVERS='{
|
|
452
|
-
"mcpServers": {
|
|
453
|
-
"strands": {
|
|
454
|
-
"command": "uvx",
|
|
455
|
-
"args": ["strands-agents-mcp-server"]
|
|
456
|
-
},
|
|
457
|
-
"remote": {
|
|
458
|
-
"url": "https://api.example.com/mcp"
|
|
459
|
-
}
|
|
460
|
-
}
|
|
461
|
-
}'
|
|
462
|
-
|
|
463
|
-
devduck
|
|
464
|
-
# Tools from all MCP servers automatically available
|
|
465
|
-
```
|
|
466
|
-
|
|
467
|
-
**Tool Prefixing:** Each MCP server's tools are prefixed with the server name (e.g., `strands_tool_name`)
|
|
468
|
-
|
|
469
|
-
---
|
|
470
|
-
|
|
471
|
-
## Troubleshooting
|
|
472
|
-
|
|
473
|
-
**Ollama model not found:**
|
|
474
|
-
```bash
|
|
475
|
-
# DevDuck auto-pulls models, but if it fails:
|
|
476
|
-
ollama pull qwen3:1.7b
|
|
477
|
-
```
|
|
478
|
-
|
|
479
|
-
**Port already in use:**
|
|
480
|
-
```bash
|
|
481
|
-
# Change ports
|
|
482
|
-
export DEVDUCK_TCP_PORT=9000
|
|
483
|
-
export DEVDUCK_WS_PORT=8001
|
|
484
|
-
devduck
|
|
485
|
-
```
|
|
486
|
-
|
|
487
|
-
**Hot-reload not working:**
|
|
488
|
-
```bash
|
|
489
|
-
# Ensure tools directory exists
|
|
490
|
-
mkdir -p ./tools
|
|
491
|
-
|
|
492
|
-
# Check file watcher logs
|
|
493
|
-
devduck
|
|
494
|
-
🦆 view_logs(action="search", pattern="watcher")
|
|
495
|
-
```
|
|
496
|
-
|
|
497
|
-
**Memory/performance issues:**
|
|
498
|
-
```bash
|
|
499
|
-
# Use lighter model
|
|
500
|
-
export STRANDS_MODEL_ID="qwen3:0.5b"
|
|
501
|
-
|
|
502
|
-
# Reduce context
|
|
503
|
-
export DEVDUCK_LOG_LINE_COUNT=20
|
|
504
|
-
export DEVDUCK_LAST_MESSAGE_COUNT=50
|
|
505
|
-
```
|
|
506
|
-
|
|
507
|
-
**Ambient overlay not starting:**
|
|
508
|
-
```bash
|
|
509
|
-
# Make sure tkinter is installed
|
|
510
|
-
python3 -c "import tkinter"
|
|
511
|
-
|
|
512
|
-
# Install tkinter if missing
|
|
513
|
-
brew install python-tk@3.13 # macOS
|
|
514
|
-
sudo apt-get install python3-tk # Ubuntu/Debian
|
|
515
|
-
sudo dnf install python3-tkinter # Fedora
|
|
516
|
-
```
|
|
517
|
-
|
|
518
|
-
**Tray app not starting (macOS):**
|
|
519
|
-
```bash
|
|
520
|
-
# Install rumps
|
|
521
|
-
pip install rumps
|
|
522
|
-
|
|
523
|
-
# Or reinstall devduck
|
|
524
|
-
pip install -e .
|
|
525
|
-
```
|
|
526
|
-
|
|
527
|
-
**View logs:** `devduck` → `🦆 view_logs()`
|
|
528
|
-
|
|
529
|
-
---
|
|
530
|
-
|
|
531
|
-
## GitHub Actions
|
|
532
|
-
|
|
533
|
-
**Run DevDuck in CI/CD pipelines:**
|
|
534
|
-
|
|
535
|
-
```yaml
|
|
536
|
-
name: AI Code Assistant
|
|
537
|
-
on:
|
|
538
|
-
issues:
|
|
539
|
-
types: [opened, edited]
|
|
540
|
-
pull_request:
|
|
541
|
-
types: [opened, edited, synchronize]
|
|
542
|
-
|
|
543
|
-
jobs:
|
|
544
|
-
devduck:
|
|
545
|
-
runs-on: ubuntu-latest
|
|
546
|
-
permissions:
|
|
547
|
-
contents: read
|
|
548
|
-
issues: write
|
|
549
|
-
pull-requests: write
|
|
550
|
-
steps:
|
|
551
|
-
- uses: cagataycali/devduck@main
|
|
552
|
-
with:
|
|
553
|
-
task: "Analyze and help with this issue or PR"
|
|
554
|
-
provider: "github"
|
|
555
|
-
model: "gpt-4o"
|
|
556
|
-
tools: "shell,file_read,file_write,use_github,calculator"
|
|
557
|
-
env:
|
|
558
|
-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
559
|
-
```
|
|
560
|
-
|
|
561
|
-
**Sub-agent workflows:**
|
|
562
|
-
```python
|
|
563
|
-
devduck("Create a sub-agent to analyze test coverage")
|
|
564
|
-
```
|
|
565
|
-
|
|
566
|
-
---
|
|
567
|
-
|
|
568
|
-
## Resources
|
|
569
|
-
|
|
570
|
-
- **Strands SDK:** [github.com/strands-agents/sdk-python](https://github.com/strands-agents/sdk-python)
|
|
571
|
-
- **Documentation:** [strandsagents.com](https://strandsagents.com)
|
|
572
|
-
- **Web UI:** [cagataycali.github.io/devduck](http://cagataycali.github.io/devduck)
|
|
573
|
-
|
|
574
|
-
---
|
|
575
|
-
|
|
576
|
-
## Citation
|
|
577
|
-
|
|
578
|
-
```bibtex
|
|
579
|
-
@software{devduck2025,
|
|
580
|
-
author = {Cagatay Cali},
|
|
581
|
-
title = {DevDuck: Self-Modifying AI Agent with Hot-Reload and Multi-Protocol Servers},
|
|
582
|
-
year = {2025},
|
|
583
|
-
url = {https://github.com/cagataycali/devduck}
|
|
584
|
-
}
|
|
585
|
-
```
|
|
586
|
-
|
|
587
|
-
---
|
|
588
|
-
|
|
589
|
-
**Apache 2.0** | Built with [Strands Agents](https://strandsagents.com) | [@cagataycali](https://github.com/cagataycali)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|