devduck 0.4.1__tar.gz → 0.5.2__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.
Potentially problematic release.
This version of devduck might be problematic. Click here for more details.
- devduck-0.5.2/.gitignore +10 -0
- devduck-0.5.2/LICENSE +201 -0
- devduck-0.5.2/PKG-INFO +415 -0
- devduck-0.5.2/README.md +368 -0
- {devduck-0.4.1 → devduck-0.5.2}/action.yml +3 -17
- devduck-0.5.2/devduck/__init__.py +1173 -0
- {devduck-0.4.1 → devduck-0.5.2}/devduck/_version.py +3 -3
- devduck-0.5.2/devduck/agentcore_handler.py +76 -0
- devduck-0.5.2/devduck/tools/__init__.py +52 -0
- devduck-0.5.2/devduck/tools/_ambient_input.py +423 -0
- devduck-0.5.2/devduck/tools/_tray_app.py +530 -0
- devduck-0.5.2/devduck/tools/agentcore_agents.py +197 -0
- devduck-0.5.2/devduck/tools/agentcore_config.py +441 -0
- devduck-0.5.2/devduck/tools/agentcore_invoke.py +422 -0
- devduck-0.5.2/devduck/tools/agentcore_logs.py +320 -0
- devduck-0.5.2/devduck/tools/ambient.py +157 -0
- devduck-0.5.2/devduck/tools/ipc.py +543 -0
- {devduck-0.4.1 → devduck-0.5.2}/devduck/tools/tcp.py +0 -4
- devduck-0.5.2/devduck/tools/tray.py +246 -0
- devduck-0.5.2/devduck.egg-info/PKG-INFO +415 -0
- {devduck-0.4.1 → devduck-0.5.2}/devduck.egg-info/SOURCES.txt +10 -2
- {devduck-0.4.1 → devduck-0.5.2}/devduck.egg-info/requires.txt +11 -6
- {devduck-0.4.1 → devduck-0.5.2}/pyproject.toml +18 -13
- devduck-0.5.2/requirements.txt +1 -0
- devduck-0.4.1/.gitignore +0 -8
- devduck-0.4.1/LICENSE +0 -21
- devduck-0.4.1/PKG-INFO +0 -283
- devduck-0.4.1/README.md +0 -238
- devduck-0.4.1/devduck/__init__.py +0 -1531
- devduck-0.4.1/devduck/tools/__init__.py +0 -7
- devduck-0.4.1/devduck.egg-info/PKG-INFO +0 -283
- devduck-0.4.1/install.sh +0 -42
- devduck-0.4.1/mcp.json +0 -10
- devduck-0.4.1/requirements.txt +0 -4
- {devduck-0.4.1 → devduck-0.5.2}/.github/workflows/agent.yml +0 -0
- {devduck-0.4.1 → devduck-0.5.2}/MANIFEST.in +0 -0
- {devduck-0.4.1 → devduck-0.5.2}/agent_runner.py +0 -0
- {devduck-0.4.1 → devduck-0.5.2}/devduck/__main__.py +0 -0
- {devduck-0.4.1 → devduck-0.5.2}/devduck/test_redduck.py +0 -0
- {devduck-0.4.1 → devduck-0.5.2}/devduck/tools/create_subagent.py +0 -0
- {devduck-0.4.1 → devduck-0.5.2}/devduck/tools/install_tools.py +0 -0
- {devduck-0.4.1 → devduck-0.5.2}/devduck/tools/mcp_server.py +0 -0
- {devduck-0.4.1 → devduck-0.5.2}/devduck/tools/store_in_kb.py +0 -0
- {devduck-0.4.1 → devduck-0.5.2}/devduck/tools/system_prompt.py +0 -0
- {devduck-0.4.1 → devduck-0.5.2}/devduck/tools/use_github.py +0 -0
- {devduck-0.4.1 → devduck-0.5.2}/devduck/tools/websocket.py +0 -0
- {devduck-0.4.1 → devduck-0.5.2}/devduck.egg-info/dependency_links.txt +0 -0
- {devduck-0.4.1 → devduck-0.5.2}/devduck.egg-info/entry_points.txt +0 -0
- {devduck-0.4.1 → devduck-0.5.2}/devduck.egg-info/top_level.txt +0 -0
- {devduck-0.4.1 → devduck-0.5.2}/docs/index.html +0 -0
- {devduck-0.4.1 → devduck-0.5.2}/setup-aws-oidc.sh +0 -0
- {devduck-0.4.1 → devduck-0.5.2}/setup.cfg +0 -0
- {devduck-0.4.1 → devduck-0.5.2}/test.py +0 -0
- {devduck-0.4.1 → devduck-0.5.2}/tools/__init__.py +0 -0
- {devduck-0.4.1 → devduck-0.5.2}/tools/fetch_github_tool.py +0 -0
- {devduck-0.4.1 → devduck-0.5.2}/tools/gist.py +0 -0
- {devduck-0.4.1 → devduck-0.5.2}/tools/github_tools.py +0 -0
- {devduck-0.4.1 → devduck-0.5.2}/tools/scraper.py +0 -0
devduck-0.5.2/.gitignore
ADDED
devduck-0.5.2/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [2025] [Cagatay Cali]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
devduck-0.5.2/PKG-INFO
ADDED
|
@@ -0,0 +1,415 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: devduck
|
|
3
|
+
Version: 0.5.2
|
|
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" and platform_machine == "arm64"
|
|
46
|
+
Dynamic: license-file
|
|
47
|
+
|
|
48
|
+
# 🦆 DevDuck
|
|
49
|
+
|
|
50
|
+
[](https://pypi.org/project/devduck/) [](https://github.com/cagataycali/homebrew-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
|
+
---
|
|
57
|
+
|
|
58
|
+
## Install & Run
|
|
59
|
+
|
|
60
|
+
| Method | Command |
|
|
61
|
+
|--------|---------|
|
|
62
|
+
| **pipx** | `pipx install devduck && devduck` |
|
|
63
|
+
| **uvx** | `uvx devduck "create a Flask API"` |
|
|
64
|
+
| **Homebrew** | `brew tap cagataycali/devduck && brew install devduck` |
|
|
65
|
+
| **Python** | `pip install devduck` → `import devduck; devduck("query")` |
|
|
66
|
+
|
|
67
|
+
**Requirements:** Python 3.10-3.13, Bedrock (or Ollama/Anthropic/GitHub/MLX)
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## What It Does
|
|
72
|
+
|
|
73
|
+
| Feature | Description | Example |
|
|
74
|
+
|---------|-------------|---------|
|
|
75
|
+
| 🔥 **Hot-Reload** | Agent reloads its own code + custom tools instantly | Modify agent code → auto-restart, or add `weather.py` → use immediately |
|
|
76
|
+
| 🧠 **Auto-RAG** | Remembers past conversations | "I prefer FastAPI" → later uses FastAPI automatically |
|
|
77
|
+
| 🌊 **Multi-Protocol** | CLI, Python, TCP, WebSocket, MCP, IPC | `devduck "query"` or `nc localhost 9999` |
|
|
78
|
+
| ☁️ **AWS Deploy** | One-command serverless deployment | `agentcore_config(auto_launch=True)` |
|
|
79
|
+
| 🛠️ **30+ Tools** | Shell, GitHub, file editing, math, UI control | `devduck("create GitHub issue")` |
|
|
80
|
+
| 🎛️ **Flexible Config** | Load only tools you need | `DEVDUCK_TOOLS="strands_tools:shell,editor"` |
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## Architecture
|
|
85
|
+
|
|
86
|
+
```mermaid
|
|
87
|
+
graph TB
|
|
88
|
+
A[User Input] -->|CLI/TCP/WS/MCP/IPC| B[DevDuck Core]
|
|
89
|
+
B -->|Auto RAG| C[Knowledge Base]
|
|
90
|
+
C -.->|Context Retrieval| B
|
|
91
|
+
B -->|Tool Calls| D[30+ Built-in Tools]
|
|
92
|
+
D --> E[shell/editor/calculator]
|
|
93
|
+
D --> F[GitHub/AgentCore]
|
|
94
|
+
D --> G[TCP/WebSocket/MCP/IPC]
|
|
95
|
+
D --> H[tray/ambient/cursor/clipboard]
|
|
96
|
+
B -->|Hot-reload| I[./tools/*.py + __init__.py]
|
|
97
|
+
I -.->|Load Instantly| D
|
|
98
|
+
B -->|Response| J[User Output]
|
|
99
|
+
J -.->|Store Memory| C
|
|
100
|
+
|
|
101
|
+
style B fill:#e1f5ff
|
|
102
|
+
style C fill:#d4edda
|
|
103
|
+
style I fill:#fff3cd
|
|
104
|
+
style H fill:#ffe6f0
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
**Self-adapting loop:** User queries → RAG retrieval → Tool execution → Response → Memory storage → Hot-reload new capabilities → Repeat.
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
## Quick Start
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
# 1. Install
|
|
115
|
+
pipx install devduck
|
|
116
|
+
|
|
117
|
+
# 2. Start (auto-launches TCP/WS/MCP/IPC servers)
|
|
118
|
+
devduck
|
|
119
|
+
|
|
120
|
+
# 3. Use
|
|
121
|
+
🦆 create a REST API with FastAPI
|
|
122
|
+
🦆 !ls -la
|
|
123
|
+
🦆 exit
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
**One-shot:**
|
|
127
|
+
```bash
|
|
128
|
+
devduck "analyze this error: ImportError: No module named 'flask'"
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
**Python API:**
|
|
132
|
+
```python
|
|
133
|
+
import devduck
|
|
134
|
+
devduck("refactor my code to use async/await")
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
---
|
|
138
|
+
|
|
139
|
+
## Model Setup
|
|
140
|
+
|
|
141
|
+
| Provider | Setup | When to Use |
|
|
142
|
+
|----------|-------|-------------|
|
|
143
|
+
| **Bedrock** (auto-detected) | [Get API key](https://console.aws.amazon.com/bedrock) → `export AWS_BEARER_TOKEN_BEDROCK=...` | Production (auto-selected if credentials found) |
|
|
144
|
+
| **MLX** (macOS auto-detected) | Auto-detected on Apple Silicon | Local, optimized for M-series Macs |
|
|
145
|
+
| **Ollama** (fallback) | `ollama pull qwen3:1.7b` | Local, free, private (used if Bedrock/MLX unavailable) |
|
|
146
|
+
| **Anthropic** | `export ANTHROPIC_API_KEY=...` | Claude API direct access |
|
|
147
|
+
| **GitHub** | `export GITHUB_TOKEN=...` | Free GPT-4o for GitHub users |
|
|
148
|
+
|
|
149
|
+
**Quick Bedrock setup:**
|
|
150
|
+
```bash
|
|
151
|
+
export MODEL_PROVIDER=bedrock
|
|
152
|
+
export AWS_BEARER_TOKEN_BEDROCK=your_token # From AWS console
|
|
153
|
+
devduck
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
---
|
|
157
|
+
|
|
158
|
+
## Core Tools
|
|
159
|
+
|
|
160
|
+
| Category | Tools | Use Case |
|
|
161
|
+
|----------|-------|----------|
|
|
162
|
+
| **Dev** | `shell`, `editor`, `file_read`, `calculator` | Code, test, debug |
|
|
163
|
+
| **GitHub** | `use_github`, `create_subagent` | Issues, PRs, CI/CD automation |
|
|
164
|
+
| **Network** | `tcp`, `websocket`, `mcp_server`, `ipc` | Serve agents over protocols |
|
|
165
|
+
| **AWS** | `agentcore_config`, `agentcore_invoke`, `agentcore_logs` | Deploy to serverless |
|
|
166
|
+
| **AI** | `use_agent`, `retrieve`, `store_in_kb` | Multi-agent, memory |
|
|
167
|
+
| **UI** (macOS) | `tray`, `ambient`, `cursor`, `clipboard` | Desktop automation |
|
|
168
|
+
|
|
169
|
+
<details>
|
|
170
|
+
<summary><strong>📋 Full tool list (click to expand)</strong></summary>
|
|
171
|
+
|
|
172
|
+
### DevDuck Core Tools
|
|
173
|
+
- `tcp` - TCP server with streaming
|
|
174
|
+
- `websocket` - WebSocket server with concurrent messaging
|
|
175
|
+
- `ipc` - Unix socket IPC server
|
|
176
|
+
- `mcp_server` - MCP server (HTTP/stdio)
|
|
177
|
+
- `install_tools` - Dynamic tool loading from packages
|
|
178
|
+
- `use_github` - GitHub GraphQL API operations
|
|
179
|
+
- `create_subagent` - Spawn sub-agents via GitHub Actions
|
|
180
|
+
- `store_in_kb` - Store content in Bedrock Knowledge Base
|
|
181
|
+
- `system_prompt` - Manage agent system prompt
|
|
182
|
+
- `tray` - System tray app control (macOS)
|
|
183
|
+
- `ambient` - Ambient AI input overlay (macOS)
|
|
184
|
+
|
|
185
|
+
### AgentCore Tools (AWS)
|
|
186
|
+
- `agentcore_config` - Configure & launch on Bedrock AgentCore
|
|
187
|
+
- `agentcore_invoke` - Invoke deployed agents
|
|
188
|
+
- `agentcore_logs` - View CloudWatch logs
|
|
189
|
+
- `agentcore_agents` - List/manage agent runtimes
|
|
190
|
+
|
|
191
|
+
### strands-agents-tools
|
|
192
|
+
- `shell` - Interactive shell with PTY support
|
|
193
|
+
- `editor` - File editing (view/create/replace/insert)
|
|
194
|
+
- `file_read` - Multi-file reading with search
|
|
195
|
+
- `file_write` - Write content to files
|
|
196
|
+
- `calculator` - SymPy-powered math operations
|
|
197
|
+
- `image_reader` - Read images for Converse API
|
|
198
|
+
- `use_agent` - Nested agent with different model
|
|
199
|
+
- `load_tool` - Load custom tools at runtime
|
|
200
|
+
- `environment` - Environment variable management
|
|
201
|
+
- `mcp_client` - Connect to external MCP servers
|
|
202
|
+
- `retrieve` - Bedrock Knowledge Base retrieval
|
|
203
|
+
|
|
204
|
+
### strands-fun-tools (macOS)
|
|
205
|
+
- `listen` - Background speech transcription with Whisper
|
|
206
|
+
- `cursor` - Mouse & keyboard control
|
|
207
|
+
- `clipboard` - Clipboard monitoring & control
|
|
208
|
+
- `screen_reader` - OCR & UI element detection
|
|
209
|
+
- `yolo_vision` - Object detection with YOLO
|
|
210
|
+
|
|
211
|
+
### Hot-Reload Tools
|
|
212
|
+
- Custom tools in `./tools/*.py` load instantly
|
|
213
|
+
- Agent code changes trigger auto-restart
|
|
214
|
+
|
|
215
|
+
</details>
|
|
216
|
+
|
|
217
|
+
---
|
|
218
|
+
|
|
219
|
+
## Hot-Reload Example
|
|
220
|
+
|
|
221
|
+
```python
|
|
222
|
+
# ./tools/weather.py
|
|
223
|
+
from strands import tool
|
|
224
|
+
import requests
|
|
225
|
+
|
|
226
|
+
@tool
|
|
227
|
+
def weather(city: str) -> str:
|
|
228
|
+
"""Get weather for a city."""
|
|
229
|
+
r = requests.get(f"https://wttr.in/{city}?format=%C+%t")
|
|
230
|
+
return r.text
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
**Save → use instantly:**
|
|
234
|
+
```bash
|
|
235
|
+
🦆 weather(city="Tokyo")
|
|
236
|
+
# Clear sky +15°C
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
No restart. No configuration. Just works.
|
|
240
|
+
|
|
241
|
+
---
|
|
242
|
+
|
|
243
|
+
## Access Methods
|
|
244
|
+
|
|
245
|
+
| Protocol | Endpoint | Test Command |
|
|
246
|
+
|----------|----------|--------------|
|
|
247
|
+
| CLI | Terminal | `devduck "query"` |
|
|
248
|
+
| Python | Import | `from devduck import devduck` |
|
|
249
|
+
| TCP | `localhost:9999` | `nc localhost 9999` |
|
|
250
|
+
| WebSocket | `ws://localhost:8080` | `wscat -c ws://localhost:8080` |
|
|
251
|
+
| MCP | `http://localhost:8000/mcp` | Add to Claude Desktop config |
|
|
252
|
+
| IPC | `/tmp/devduck_main.sock` | `nc -U /tmp/devduck_main.sock` |
|
|
253
|
+
|
|
254
|
+
**Custom ports:** `export DEVDUCK_TCP_PORT=9000`
|
|
255
|
+
|
|
256
|
+
---
|
|
257
|
+
|
|
258
|
+
## Configuration
|
|
259
|
+
|
|
260
|
+
| Variable | Default | Options |
|
|
261
|
+
|----------|---------|---------|
|
|
262
|
+
| `MODEL_PROVIDER` | Auto-detect | `bedrock`, `anthropic`, `github`, `mlx`, `ollama` |
|
|
263
|
+
| `STRANDS_MODEL_ID` | Auto | Model name (e.g., `qwen3:1.7b`, `claude-sonnet-4`) |
|
|
264
|
+
| `DEVDUCK_TOOLS` | All | `pkg:tool1,tool2:pkg2:tool3` |
|
|
265
|
+
| `DEVDUCK_KNOWLEDGE_BASE_ID` | - | Bedrock KB ID for auto-RAG |
|
|
266
|
+
| `DEVDUCK_TCP_PORT` | `9999` | TCP server port |
|
|
267
|
+
| `DEVDUCK_ENABLE_TCP` | `true` | Enable/disable TCP |
|
|
268
|
+
|
|
269
|
+
**Minimal config (shell + editor only):**
|
|
270
|
+
```bash
|
|
271
|
+
export DEVDUCK_TOOLS="strands_tools:shell,editor"
|
|
272
|
+
devduck
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
---
|
|
276
|
+
|
|
277
|
+
|
|
278
|
+
## MCP Integration
|
|
279
|
+
|
|
280
|
+
**Claude Desktop** (`~/Library/Application Support/Claude/claude_desktop_config.json`):
|
|
281
|
+
```json
|
|
282
|
+
{
|
|
283
|
+
"mcpServers": {
|
|
284
|
+
"devduck": {
|
|
285
|
+
"command": "uvx",
|
|
286
|
+
"args": ["devduck", "--mcp"]
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
Restart Claude → DevDuck tools appear automatically.
|
|
293
|
+
|
|
294
|
+
---
|
|
295
|
+
|
|
296
|
+
## Troubleshooting
|
|
297
|
+
|
|
298
|
+
**Ollama model not found:**
|
|
299
|
+
```bash
|
|
300
|
+
# DevDuck auto-pulls models, but if it fails:
|
|
301
|
+
ollama pull qwen3:1.7b
|
|
302
|
+
```
|
|
303
|
+
|
|
304
|
+
**Port already in use:**
|
|
305
|
+
```bash
|
|
306
|
+
# Change ports
|
|
307
|
+
export DEVDUCK_TCP_PORT=9000
|
|
308
|
+
export DEVDUCK_WS_PORT=8001
|
|
309
|
+
devduck
|
|
310
|
+
```
|
|
311
|
+
|
|
312
|
+
**Hot-reload not working:**
|
|
313
|
+
```bash
|
|
314
|
+
# Ensure tools directory exists
|
|
315
|
+
mkdir -p ./tools
|
|
316
|
+
|
|
317
|
+
# Check file watcher logs
|
|
318
|
+
devduck
|
|
319
|
+
🦆 view_logs(action="search", pattern="watcher")
|
|
320
|
+
```
|
|
321
|
+
|
|
322
|
+
**Memory/performance issues:**
|
|
323
|
+
```bash
|
|
324
|
+
# Use lighter model
|
|
325
|
+
export STRANDS_MODEL_ID="qwen3:0.5b"
|
|
326
|
+
|
|
327
|
+
# Reduce context
|
|
328
|
+
export DEVDUCK_LOG_LINE_COUNT=20
|
|
329
|
+
export DEVDUCK_LAST_MESSAGE_COUNT=50
|
|
330
|
+
```
|
|
331
|
+
|
|
332
|
+
**Ambient overlay not starting:**
|
|
333
|
+
```bash
|
|
334
|
+
# Make sure tkinter is installed
|
|
335
|
+
python3 -c "import tkinter"
|
|
336
|
+
|
|
337
|
+
# Install tkinter if missing
|
|
338
|
+
brew install python-tk@3.13 # macOS
|
|
339
|
+
sudo apt-get install python3-tk # Ubuntu/Debian
|
|
340
|
+
sudo dnf install python3-tkinter # Fedora
|
|
341
|
+
```
|
|
342
|
+
|
|
343
|
+
**Tray app not starting (macOS):**
|
|
344
|
+
```bash
|
|
345
|
+
# Install rumps
|
|
346
|
+
pip install rumps
|
|
347
|
+
|
|
348
|
+
# Or reinstall devduck
|
|
349
|
+
pip install -e .
|
|
350
|
+
```
|
|
351
|
+
|
|
352
|
+
**View logs:** `devduck` → `🦆 view_logs()`
|
|
353
|
+
|
|
354
|
+
---
|
|
355
|
+
|
|
356
|
+
## GitHub Actions
|
|
357
|
+
|
|
358
|
+
**Run DevDuck in CI/CD pipelines:**
|
|
359
|
+
|
|
360
|
+
```yaml
|
|
361
|
+
name: AI Code Assistant
|
|
362
|
+
on:
|
|
363
|
+
issues:
|
|
364
|
+
types: [opened, edited]
|
|
365
|
+
pull_request:
|
|
366
|
+
types: [opened, edited, synchronize]
|
|
367
|
+
|
|
368
|
+
jobs:
|
|
369
|
+
devduck:
|
|
370
|
+
runs-on: ubuntu-latest
|
|
371
|
+
permissions:
|
|
372
|
+
contents: read
|
|
373
|
+
issues: write
|
|
374
|
+
pull-requests: write
|
|
375
|
+
steps:
|
|
376
|
+
- uses: cagataycali/devduck@main
|
|
377
|
+
with:
|
|
378
|
+
task: "Analyze and help with this issue or PR"
|
|
379
|
+
provider: "github"
|
|
380
|
+
model: "gpt-4o"
|
|
381
|
+
tools: "shell,file_read,file_write,use_github,calculator"
|
|
382
|
+
env:
|
|
383
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
384
|
+
```
|
|
385
|
+
|
|
386
|
+
**Sub-agent workflows:**
|
|
387
|
+
```python
|
|
388
|
+
devduck("Create a sub-agent to analyze test coverage")
|
|
389
|
+
```
|
|
390
|
+
|
|
391
|
+
---
|
|
392
|
+
|
|
393
|
+
## Resources
|
|
394
|
+
|
|
395
|
+
- **Strands SDK:** [github.com/strands-agents/sdk-python](https://github.com/strands-agents/sdk-python)
|
|
396
|
+
- **Documentation:** [strandsagents.com](https://strandsagents.com)
|
|
397
|
+
- **Web UI:** [cagataycali.github.io/devduck](http://cagataycali.github.io/devduck)
|
|
398
|
+
- **Homebrew:** [github.com/cagataycali/homebrew-devduck](https://github.com/cagataycali/homebrew-devduck)
|
|
399
|
+
|
|
400
|
+
---
|
|
401
|
+
|
|
402
|
+
## Citation
|
|
403
|
+
|
|
404
|
+
```bibtex
|
|
405
|
+
@software{devduck2025,
|
|
406
|
+
author = {Cagatay Cali},
|
|
407
|
+
title = {DevDuck: Self-Modifying AI Agent with Hot-Reload and Multi-Protocol Servers},
|
|
408
|
+
year = {2025},
|
|
409
|
+
url = {https://github.com/cagataycali/devduck}
|
|
410
|
+
}
|
|
411
|
+
```
|
|
412
|
+
|
|
413
|
+
---
|
|
414
|
+
|
|
415
|
+
**Apache 2.0** | Built with [Strands Agents](https://strandsagents.com) | [@cagataycali](https://github.com/cagataycali)
|