@zshuangmu/agenthub 0.4.14 โ†’ 0.4.16

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.
Files changed (43) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +268 -268
  3. package/package.json +41 -41
  4. package/src/api-server.js +518 -244
  5. package/src/cli.js +714 -671
  6. package/src/commands/api.js +9 -9
  7. package/src/commands/doctor.js +335 -335
  8. package/src/commands/info.js +15 -15
  9. package/src/commands/install.js +56 -56
  10. package/src/commands/list.js +78 -78
  11. package/src/commands/pack.js +249 -156
  12. package/src/commands/publish-remote.js +9 -9
  13. package/src/commands/publish.js +7 -7
  14. package/src/commands/rollback.js +59 -59
  15. package/src/commands/search.js +14 -14
  16. package/src/commands/serve.js +9 -9
  17. package/src/commands/stats.js +105 -105
  18. package/src/commands/uninstall.js +76 -76
  19. package/src/commands/update.js +54 -54
  20. package/src/commands/verify.js +133 -133
  21. package/src/commands/versions.js +75 -75
  22. package/src/commands/web.js +9 -9
  23. package/src/index.js +18 -18
  24. package/src/lib/auth.js +301 -0
  25. package/src/lib/bundle-transfer.js +58 -58
  26. package/src/lib/colors.js +60 -60
  27. package/src/lib/database.js +450 -244
  28. package/src/lib/debug.js +135 -135
  29. package/src/lib/fs-utils.js +107 -50
  30. package/src/lib/html.js +2163 -1824
  31. package/src/lib/http.js +168 -168
  32. package/src/lib/install.js +60 -60
  33. package/src/lib/manifest.js +124 -124
  34. package/src/lib/openclaw-config.js +40 -40
  35. package/src/lib/permissions.js +105 -0
  36. package/src/lib/privacy-engine.js +220 -0
  37. package/src/lib/registry.js +130 -130
  38. package/src/lib/remote.js +11 -11
  39. package/src/lib/security-scanner.js +233 -233
  40. package/src/lib/signing.js +158 -0
  41. package/src/lib/version-manager.js +77 -77
  42. package/src/server.js +176 -176
  43. package/src/web-server.js +135 -135
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2024 AgentHub
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.
1
+ MIT License
2
+
3
+ Copyright (c) 2024 AgentHub
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.
package/README.md CHANGED
@@ -1,268 +1,268 @@
1
- <div align="center">
2
-
3
- # ๐Ÿค– AgentHub
4
-
5
- **OpenClaw Agent ็š„ๆ‰“ๅŒ…ใ€ๅ‘ๅธƒไธŽๅˆ†ๅ‘ๅนณๅฐ**
6
-
7
- [![npm version](https://img.shields.io/npm/v/@zshuangmu/agenthub.svg)](https://www.npmjs.com/package/@zshuangmu/agenthub)
8
- [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)
9
- [![Node: >=18](https://img.shields.io/badge/Node.js->=18-green.svg)](https://nodejs.org/)
10
- [![GitHub Stars](https://img.shields.io/github/stars/itshaungmu/AgentHub?style=social)](https://github.com/itshaungmu/AgentHub)
11
-
12
- **ๆŠŠไฝ ่ฐƒๆ•™ๅฅฝ็š„ OpenClaw Agent ๅ˜ๆˆๅฏๅค็”จใ€ๅฏๅˆ†ๅ‘ใ€ๅฏๅ‡็บง็š„ๆ ‡ๅ‡†่ต„ไบง**
13
-
14
- ๐ŸŒ **ๅœจ็บฟๆผ”็คบ**: [https://agenthub.cyou](https://agenthub.cyou/)
15
-
16
- [English](README.md) | [ไธญๆ–‡](README_CN.md)
17
-
18
- </div>
19
-
20
- ---
21
-
22
- ## ๐ŸŽฏ AgentHub ๆ˜ฏไป€ไนˆ๏ผŸ
23
-
24
- AgentHub ๆ˜ฏไธ€ไธชไธ“ไธบ **OpenClaw** ่ฎพ่ฎก็š„ Agent ๆ‰“ๅŒ…ไธŽๅˆ†ๅ‘ๅนณๅฐ๏ผŒ็ฑปไผผไบŽ๏ผš
25
- - **Docker Hub** ไน‹ไบŽ Docker ๅฎนๅ™จ
26
- - **npm** ไน‹ไบŽ Node.js ๅŒ…
27
-
28
- ไฝ†ไธ“ๆณจไบŽ **OpenClaw Agent ็š„ๅˆ†ๅ‘ไธŽๅคๅˆป**ใ€‚
29
-
30
- ### ๆ ธๅฟƒ่ƒฝๅŠ›
31
-
32
- | ่ƒฝๅŠ› | ๆ่ฟฐ |
33
- |------|------|
34
- | ๐Ÿ“ฆ **ไธ€้”ฎๆ‰“ๅŒ…** | ๅฐ† Agent ็š„ personalityใ€memoryใ€skills ๆ‰“ๅŒ…ๆˆๆ ‡ๅ‡† Bundle |
35
- | ๐Ÿš€ **ๅ‘ๅธƒๅˆ†ๅ‘** | ๅ‘ๅธƒๅˆฐๆœฌๅœฐๆˆ–่ฟœ็จ‹ Registry๏ผŒ็”Ÿๆˆๅฏๅˆ†ไบซ้“พๆŽฅ |
36
- | โšก **ไธ€้”ฎๅฎ‰่ฃ…** | ๅ›ข้˜Ÿๆˆๅ‘˜้€š่ฟ‡็ปŸไธ€ๅ‘ฝไปคๅฎ‰่ฃ…๏ผŒๅคๅˆปๅฎŒๆ•ด Agent ่ƒฝๅŠ› |
37
- | ๐Ÿ”„ **็‰ˆๆœฌ็ฎก็†** | ๅฎŒๆ•ด็š„ๅ‡็บงใ€ๅ›žๆปšใ€ๆ ก้ชŒๆ”ฏๆŒ |
38
-
39
- ### ้€‚ๅˆ่ฐ๏ผŸ
40
-
41
- - **โœ… OpenClaw ๅ›ข้˜Ÿ็”จๆˆท**: ็ปŸไธ€ๅˆ†ๅ‘ใ€็‰ˆๆœฌ็ฎก็†ใ€ๅ›ข้˜Ÿๅค็”จ
42
- - **โœ… Agent ๅˆ›ไฝœ่€…**: ๆ‰“ๅŒ…ๅˆ†ไบซไฝ ่ฐƒๆ•™ๅฅฝ็š„ Agent
43
- - **โœ… AI ้‡ๅบฆ็”จๆˆท**: ๅฟซ้€Ÿ่Žทๅพ—ๅˆซไบบ่ฐƒๆ•™ๅฅฝ็š„ Agent ่ƒฝๅŠ›
44
-
45
- ### ไธ้€‚ๅˆ่ฐ๏ผŸ
46
-
47
- - โŒ ้ž OpenClaw ็”จๆˆท๏ผˆๅฝ“ๅ‰ไป…ๆ”ฏๆŒ OpenClaw๏ผ‰
48
- - โŒ ้œ€่ฆ Prompt ๆ”ถ่—ๅคน๏ผˆ่ฏทไฝฟ็”จไธ“้—จ็š„ Prompt ๅทฅๅ…ท๏ผ‰
49
- - โŒ ๅ•ไธช Skill ๅˆ†ๅ‘๏ผˆ่ฏทไฝฟ็”จ ClawHub๏ผ‰
50
-
51
- ## ๐ŸŽฏ ๅฎ˜ๆ–นๆ ทๆฟ Agent
52
-
53
- ๆˆ‘ไปฌๆไพ›ไบ† 3 ไธชๅฎ˜ๆ–นๆ ทๆฟ Agent๏ผŒๅธฎๅŠฉไฝ ๅฟซ้€ŸไธŠๆ‰‹๏ผš
54
-
55
- | Agent | ๆ่ฟฐ | ้€‚็”จๅœบๆ™ฏ |
56
- |-------|------|----------|
57
- | **code-review-assistant** | ไปฃ็ ๅฎกๆŸฅๅŠฉๆ‰‹ | ไปฃ็ ่ดจ้‡ๅฎกๆŸฅใ€ๅฎ‰ๅ…จๆผๆดž่ฏ†ๅˆซ |
58
- | **team-knowledge-assistant** | ๅ›ข้˜Ÿ็Ÿฅ่ฏ†้—ฎ็ญ” | ้กน็›ฎไฟกๆฏๆฃ€็ดขใ€ๆ–ฐๅ‘˜ๅทฅๅ…ฅ่Œ |
59
- | **product-doc-writer** | ไบงๅ“ๆ–‡ๆกฃๆ’ฐๅ†™ | ๅŠŸ่ƒฝๆ–‡ๆกฃใ€็”จๆˆทๆŒ‡ๅ—ใ€API ๆ–‡ๆกฃ |
60
-
61
- ### ๅฟซ้€Ÿ่ฏ•็”จ
62
-
63
- ```bash
64
- # ๆ‰“ๅŒ…ไปปๆ„ๆ ทๆฟ Agent
65
- agenthub pack --workspace ./samples/code-review-assistant --config ./samples/code-review-assistant/openclaw.json
66
-
67
- # ๅ‘ๅธƒๅนถๅฎ‰่ฃ…
68
- agenthub publish ./bundles/code-review-assistant-1.0.0.agent --registry ./.registry
69
- agenthub install code-review-assistant --registry ./.registry --target-workspace ./workspace
70
- ```
71
-
72
- ## ๐Ÿ“ธ Screenshots
73
-
74
- ![AgentHub Web Interface](./docs/image.png)
75
-
76
- ## ๐Ÿš€ 3 ๆญฅไธŠๆ‰‹
77
-
78
- ### ็ฌฌไธ€ๆญฅ๏ผšๅฎ‰่ฃ…
79
-
80
- ```bash
81
- # ้€š่ฟ‡ npm ๅ…จๅฑ€ๅฎ‰่ฃ…
82
- npm install -g @zshuangmu/agenthub
83
-
84
- # ๆˆ–ๅ…‹้š†ๆบ็ 
85
- git clone https://github.com/itshaungmu/AgentHub.git
86
- cd AgentHub && npm install && npm link
87
- ```
88
-
89
- ### ็ฌฌไบŒๆญฅ๏ผšๆ‰“ๅŒ…ๅนถๅ‘ๅธƒไฝ ็š„ Agent
90
-
91
- ```bash
92
- # 1. ๆ‰“ๅŒ…ไฝ ็š„ OpenClaw workspace
93
- agenthub pack --workspace ./my-workspace --config openclaw.json
94
-
95
- # ๆˆ–ๆŒ‡ๅฎš็‰ˆๆœฌๅท
96
- agenthub pack --workspace ./my-workspace --config openclaw.json --version 2.0.0
97
-
98
- # 2. ๅ‘ๅธƒๅˆฐ Registry
99
- agenthub publish ./bundles/my-agent.agent --registry ./.registry
100
- ```
101
-
102
- ### ็ฌฌไธ‰ๆญฅ๏ผšๅ›ข้˜Ÿๆˆๅ‘˜ๅฎ‰่ฃ…ไฝฟ็”จ
103
-
104
- ```bash
105
- # ๅ›ข้˜Ÿๆˆๅ‘˜ไธ€้”ฎๅฎ‰่ฃ…
106
- agenthub install my-agent --registry ./.registry --target-workspace ./workspace
107
-
108
- # ๆˆ–ๅฏๅŠจ Web ็•Œ้ขๆต่งˆ
109
- agenthub serve --registry ./.registry --port 3000
110
- ```
111
-
112
- ่ฎฟ้—ฎ http://localhost:3000 ๆŸฅ็œ‹ไฝ ็š„ Agent๏ผ
113
-
114
- ### ๐ŸŽฏ ่ฏ•็”จๆ ทๆฟ Agent
115
-
116
- ๆˆ‘ไปฌๆไพ›ไบ†ไธ€ไธชๅฎ˜ๆ–นๆ ทๆฟ Agent๏ผŒๅธฎๅŠฉไฝ ๅฟซ้€Ÿไฝ“้ชŒ๏ผš
117
-
118
- ```bash
119
- # 1. ๅ…‹้š†ไป“ๅบ“
120
- git clone https://github.com/itshaungmu/AgentHub.git
121
- cd AgentHub
122
-
123
- # 2. ๆ‰“ๅŒ…ๆ ทๆฟ Agent
124
- agenthub pack --workspace ./samples/code-review-assistant --config ./samples/code-review-assistant/openclaw.json
125
-
126
- # 3. ๅ‘ๅธƒๅˆฐๆœฌๅœฐ Registry
127
- agenthub publish ./bundles/code-review-assistant-1.0.0.agent --registry ./.registry
128
-
129
- # 4. ๅฎ‰่ฃ…ๅˆฐไฝ ็š„ workspace
130
- agenthub install code-review-assistant --registry ./.registry --target-workspace ./my-workspace
131
-
132
- # 5. ๆ ก้ชŒๅฎ‰่ฃ…
133
- agenthub verify code-review-assistant --registry ./.registry --target-workspace ./my-workspace
134
- ```
135
-
136
- ---
137
-
138
- ## ๐Ÿ“– ๅ‘ฝไปคๆ–‡ๆกฃ
139
-
140
- ### CLI ๅ‘ฝไปค
141
-
142
- | ๅ‘ฝไปค | ๆ่ฟฐ |
143
- |------|------|
144
- | `pack` | ๆ‰“ๅŒ… workspace ไธบ Agent Bundle๏ผˆๆ”ฏๆŒ `--version` ๆŒ‡ๅฎš็‰ˆๆœฌ๏ผ‰ |
145
- | `publish` | ๅ‘ๅธƒๅˆฐๆœฌๅœฐ Registry |
146
- | `publish-remote` | ๅ‘ๅธƒๅˆฐ่ฟœ็จ‹ๆœๅŠกๅ™จ |
147
- | `search` | ๆœ็ดข Registry ไธญ็š„ Agent |
148
- | `info` | ๆŸฅ็œ‹ Agent ่ฏฆๆƒ… |
149
- | `install` | ๅฎ‰่ฃ… Agent ๅˆฐ workspace |
150
- | `list` | ๅˆ—ๅ‡บๅทฒๅฎ‰่ฃ…็š„ Agent |
151
- | `uninstall` | ๅธ่ฝฝๅทฒๅฎ‰่ฃ…็š„ Agent |
152
- | `verify` | ๆ ก้ชŒๅทฒๅฎ‰่ฃ… Agent ๆ˜ฏๅฆๅฎŒๆ•ด |
153
- | `versions` | ๆŸฅ็œ‹ Agent ็‰ˆๆœฌๅކๅฒ |
154
- | `update` | ๆ›ดๆ–ฐ Agent ๅˆฐๆœ€ๆ–ฐ็‰ˆ |
155
- | `rollback` | ๅ›žๆปš Agent ๅˆฐๆŒ‡ๅฎš็‰ˆๆœฌ |
156
- | `stats` | ๆŸฅ็œ‹ Agent ็ปŸ่ฎกไฟกๆฏ |
157
- | `doctor` | ่ฏŠๆ–ญ AgentHub ๅฎ‰่ฃ…ๅ’Œ็Žฏๅขƒ้—ฎ้ข˜ |
158
- | `serve` | ๅฏๅŠจ Web + API ๆœๅŠก |
159
- | `api` | ไป…ๅฏๅŠจ API ๆœๅŠก |
160
- | `web` | ไป…ๅฏๅŠจ Web ๅ‰็ซฏ |
161
-
162
- ### HTTP API
163
-
164
- ```bash
165
- # ๅฅๅบทๆฃ€ๆŸฅ
166
- curl http://localhost:3001/api/health
167
-
168
- # ๅˆ—ๅ‡บๆ‰€ๆœ‰ Agent
169
- curl http://localhost:3001/api/agents
170
-
171
- # ๆœ็ดข Agent
172
- curl "http://localhost:3001/api/agents?q=react"
173
-
174
- # ่Žทๅ– Agent ่ฏฆๆƒ…
175
- curl http://localhost:3001/api/agents/my-agent
176
-
177
- # ไธ‹่ฝฝ Agent Bundle
178
- curl http://localhost:3001/api/agents/my-agent/download
179
-
180
- # ่Žทๅ–็ปŸ่ฎกไฟกๆฏ
181
- curl http://localhost:3001/api/stats
182
-
183
- # ่Žทๅ–ไธ‹่ฝฝๆŽ’่กŒ
184
- curl "http://localhost:3001/api/stats/ranking?limit=10"
185
-
186
- # ๅ‘ๅธƒ Agent (POST)
187
- curl -X POST http://localhost:3001/api/publish -H "Content-Type: application/json" -d '{"slug":"my-agent","version":"1.0.0"}'
188
-
189
- # ไธŠไผ ๅ‘ๅธƒ Agent (POST)
190
- curl -X POST http://localhost:3001/api/publish-upload -H "Content-Type: application/json" -d '{"bundleData":"..."}'
191
- ```
192
-
193
- ### AI ่‡ชๅŠจๅ‘็Žฐ
194
-
195
- ่ฎฉไฝ ็š„ AI ๅŠฉๆ‰‹่‡ชๅŠจๅ‘็Žฐๅฏ็”จ็š„ Agent๏ผš
196
-
197
- ```bash
198
- curl http://localhost:3001/api/skills/agenthub-discover
199
- ```
200
-
201
- ## ๐Ÿ“š ๆ•™็จ‹ๆ–‡ๆกฃ
202
-
203
- | ๆ•™็จ‹ | ๆ่ฟฐ |
204
- |------|------|
205
- | [3 ๆญฅๅคๅˆป Agent](./docs/quick-start-3-steps.md) | 10 ๅˆ†้’Ÿๅฟซ้€ŸไธŠๆ‰‹ๆŒ‡ๅ— |
206
- | [ๅ›ข้˜Ÿๅˆ†ๅ‘ๆŒ‡ๅ—](./docs/team-distribution-guide.md) | ๅฆ‚ไฝ•ๆŠŠๅ›ข้˜Ÿ Agent ๆ ‡ๅ‡†ๅŒ–ๅˆ†ๅ‘ |
207
- | [ๅธธ่ง้—ฎ้ข˜ FAQ](./docs/faq.md) | ๅธธ่ง้—ฎ้ข˜่งฃ็ญ” |
208
-
209
- ## ๐Ÿ—๏ธ ๆžถๆž„
210
-
211
- ```
212
- โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” pack โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” publish โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
213
- โ”‚ OpenClaw โ”‚ โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–บ โ”‚ Bundle โ”‚ โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–บ โ”‚ Registry โ”‚
214
- โ”‚ Workspace โ”‚ โ”‚ (*.agent) โ”‚ โ”‚ (.registry) โ”‚
215
- โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
216
- โ”‚
217
- โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
218
- โ”‚
219
- โ–ผ
220
- โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
221
- โ”‚ AgentHub โ”‚
222
- โ”‚ Web + API โ”‚
223
- โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
224
- ```
225
-
226
- ## ๐Ÿงช ๅผ€ๅ‘
227
-
228
- ```bash
229
- # ่ฟ่กŒๆต‹่ฏ•
230
- npm test
231
-
232
- # ๅฏๅŠจๅผ€ๅ‘ๆœๅŠกๅ™จ
233
- node src/cli.js serve --registry ./.registry
234
- ```
235
-
236
- ## ๐Ÿณ Docker ้ƒจ็ฝฒ
237
-
238
- ```bash
239
- # ็”Ÿไบง็ŽฏๅขƒๅฏๅŠจ๏ผˆๅฎนๅ™จๅ†…๏ผ‰
240
- NODE_ENV=production node src/cli.js serve --registry ./.registry --port 3000 --host 0.0.0.0
241
- ```
242
-
243
- ## ๐Ÿค ่ดก็Œฎ
244
-
245
- ๆฌข่ฟŽ่ดก็Œฎ๏ผ่ฏทๆŸฅ็œ‹ [CONTRIBUTING.md](CONTRIBUTING.md) ไบ†่งฃ่ฏฆๆƒ…ใ€‚
246
-
247
- - ๐Ÿ› [ๆŠฅๅ‘Š Bug](https://github.com/itshaungmu/AgentHub/issues/new?template=bug_report.md)
248
- - ๐Ÿ’ก [่ฏทๆฑ‚ๅŠŸ่ƒฝ](https://github.com/itshaungmu/AgentHub/issues/new?template=feature_request.md)
249
- - ๐Ÿ”ง [ๆไบค PR](https://github.com/itshaungmu/AgentHub/pulls)
250
-
251
- ## ๐Ÿ“„ ่ฎธๅฏ่ฏ
252
-
253
- [MIT License](LICENSE) ยฉ AgentHub Team
254
-
255
- ## ๐Ÿ™ ่‡ด่ฐข
256
-
257
- - ไธบ [OpenClaw](https://github.com/openclaw) ็”Ÿๆ€็ณป็ปŸๆž„ๅปบ
258
- - ็ตๆ„Ÿๆฅ่‡ช npm ๅ’Œ Docker Hub
259
-
260
- ---
261
-
262
- <div align="center">
263
-
264
- **[โฌ† ่ฟ”ๅ›ž้กถ้ƒจ](#agenthub)**
265
-
266
- Made with โค๏ธ by the AgentHub Team
267
-
268
- </div>
1
+ <div align="center">
2
+
3
+ # ๐Ÿค– AgentHub
4
+
5
+ **Packaging, Publishing & Distribution Platform for OpenClaw Agents**
6
+
7
+ [![npm version](https://img.shields.io/npm/v/@zshuangmu/agenthub.svg)](https://www.npmjs.com/package/@zshuangmu/agenthub)
8
+ [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)
9
+ [![Node: >=18](https://img.shields.io/badge/Node.js->=18-green.svg)](https://nodejs.org/)
10
+ [![GitHub Stars](https://img.shields.io/github/stars/itshaungmu/AgentHub?style=social)](https://github.com/itshaungmu/AgentHub)
11
+
12
+ **Turn your well-trained OpenClaw Agent into reusable, distributable, and upgradable standard assets**
13
+
14
+ ๐ŸŒ **Live Demo**: [https://agenthub.cyou](https://agenthub.cyou/)
15
+
16
+ [English](README.md) | [ไธญๆ–‡](README_CN.md)
17
+
18
+ </div>
19
+
20
+ ---
21
+
22
+ ## ๐ŸŽฏ What is AgentHub?
23
+
24
+ AgentHub is a packaging and distribution platform designed specifically for **OpenClaw**, similar to:
25
+ - **Docker Hub** for Docker containers
26
+ - **npm** for Node.js packages
27
+
28
+ But focused on **OpenClaw Agent distribution and replication**.
29
+
30
+ ### Core Capabilities
31
+
32
+ | Capability | Description |
33
+ |------------|-------------|
34
+ | ๐Ÿ“ฆ **One-Click Packaging** | Package Agent's personality, memory, and skills into a standard Bundle |
35
+ | ๐Ÿš€ **Publish & Distribute** | Publish to local or remote Registry, generate shareable links |
36
+ | โšก **One-Click Install** | Team members install via unified command, replicate complete Agent capabilities |
37
+ | ๐Ÿ”„ **Version Management** | Full support for upgrades, rollbacks, and verification |
38
+
39
+ ### Who is it for?
40
+
41
+ - **โœ… OpenClaw Team Users**: Unified distribution, version management, team reuse
42
+ - **โœ… Agent Creators**: Package and share your well-trained Agents
43
+ - **โœ… AI Power Users**: Quickly acquire Agent capabilities trained by others
44
+
45
+ ### Who is it NOT for?
46
+
47
+ - โŒ Non-OpenClaw users (currently only supports OpenClaw)
48
+ - โŒ Those needing a Prompt collection (please use dedicated Prompt tools)
49
+ - โŒ Single Skill distribution (please use ClawHub)
50
+
51
+ ## ๐ŸŽฏ Official Sample Agents
52
+
53
+ We provide 3 official sample Agents to help you get started quickly:
54
+
55
+ | Agent | Description | Use Cases |
56
+ |-------|-------------|-----------|
57
+ | **code-review-assistant** | Code Review Assistant | Code quality review, security vulnerability identification |
58
+ | **team-knowledge-assistant** | Team Knowledge Q&A | Project information retrieval, new employee onboarding |
59
+ | **product-doc-writer** | Product Documentation Writer | Feature docs, user guides, API documentation |
60
+
61
+ ### Quick Try
62
+
63
+ ```bash
64
+ # Package any sample Agent
65
+ agenthub pack --workspace ./samples/code-review-assistant --config ./samples/code-review-assistant/openclaw.json
66
+
67
+ # Publish and install
68
+ agenthub publish ./bundles/code-review-assistant-1.0.0.agent --registry ./.registry
69
+ agenthub install code-review-assistant --registry ./.registry --target-workspace ./workspace
70
+ ```
71
+
72
+ ## ๐Ÿ“ธ Screenshots
73
+
74
+ ![AgentHub Web Interface](./docs/image.png)
75
+
76
+ ## ๐Ÿš€ 3 Steps to Get Started
77
+
78
+ ### Step 1: Installation
79
+
80
+ ```bash
81
+ # Install globally via npm
82
+ npm install -g @zshuangmu/agenthub
83
+
84
+ # Or clone from source
85
+ git clone https://github.com/itshaungmu/AgentHub.git
86
+ cd AgentHub && npm install && npm link
87
+ ```
88
+
89
+ ### Step 2: Package and Publish Your Agent
90
+
91
+ ```bash
92
+ # 1. Package your OpenClaw workspace
93
+ agenthub pack --workspace ./my-workspace --config openclaw.json
94
+
95
+ # Or specify a version number
96
+ agenthub pack --workspace ./my-workspace --config openclaw.json --version 2.0.0
97
+
98
+ # 2. Publish to Registry
99
+ agenthub publish ./bundles/my-agent.agent --registry ./.registry
100
+ ```
101
+
102
+ ### Step 3: Team Members Install and Use
103
+
104
+ ```bash
105
+ # Team members install with one click
106
+ agenthub install my-agent --registry ./.registry --target-workspace ./workspace
107
+
108
+ # Or start the Web interface to browse
109
+ agenthub serve --registry ./.registry --port 3000
110
+ ```
111
+
112
+ Visit http://localhost:3000 to see your Agent!
113
+
114
+ ### ๐ŸŽฏ Try Sample Agents
115
+
116
+ We provide an official sample Agent for quick experience:
117
+
118
+ ```bash
119
+ # 1. Clone the repository
120
+ git clone https://github.com/itshaungmu/AgentHub.git
121
+ cd AgentHub
122
+
123
+ # 2. Package the sample Agent
124
+ agenthub pack --workspace ./samples/code-review-assistant --config ./samples/code-review-assistant/openclaw.json
125
+
126
+ # 3. Publish to local Registry
127
+ agenthub publish ./bundles/code-review-assistant-1.0.0.agent --registry ./.registry
128
+
129
+ # 4. Install to your workspace
130
+ agenthub install code-review-assistant --registry ./.registry --target-workspace ./my-workspace
131
+
132
+ # 5. Verify installation
133
+ agenthub verify code-review-assistant --registry ./.registry --target-workspace ./my-workspace
134
+ ```
135
+
136
+ ---
137
+
138
+ ## ๐Ÿ“– Command Documentation
139
+
140
+ ### CLI Commands
141
+
142
+ | Command | Description |
143
+ |---------|-------------|
144
+ | `pack` | Package workspace as Agent Bundle (supports `--version` to specify version) |
145
+ | `publish` | Publish to local Registry |
146
+ | `publish-remote` | Publish to remote server |
147
+ | `search` | Search Agents in Registry |
148
+ | `info` | View Agent details |
149
+ | `install` | Install Agent to workspace |
150
+ | `list` | List installed Agents |
151
+ | `uninstall` | Uninstall an installed Agent |
152
+ | `verify` | Verify installed Agent integrity |
153
+ | `versions` | View Agent version history |
154
+ | `update` | Update Agent to latest version |
155
+ | `rollback` | Rollback Agent to specified version |
156
+ | `stats` | View Agent statistics |
157
+ | `doctor` | Diagnose AgentHub installation and environment issues |
158
+ | `serve` | Start Web + API services |
159
+ | `api` | Start API service only |
160
+ | `web` | Start Web frontend only |
161
+
162
+ ### HTTP API
163
+
164
+ ```bash
165
+ # Health check
166
+ curl http://localhost:3001/api/health
167
+
168
+ # List all Agents
169
+ curl http://localhost:3001/api/agents
170
+
171
+ # Search Agents
172
+ curl "http://localhost:3001/api/agents?q=react"
173
+
174
+ # Get Agent details
175
+ curl http://localhost:3001/api/agents/my-agent
176
+
177
+ # Download Agent Bundle
178
+ curl http://localhost:3001/api/agents/my-agent/download
179
+
180
+ # Get statistics
181
+ curl http://localhost:3001/api/stats
182
+
183
+ # Get download ranking
184
+ curl "http://localhost:3001/api/stats/ranking?limit=10"
185
+
186
+ # Publish Agent (POST)
187
+ curl -X POST http://localhost:3001/api/publish -H "Content-Type: application/json" -d '{"slug":"my-agent","version":"1.0.0"}'
188
+
189
+ # Upload and publish Agent (POST)
190
+ curl -X POST http://localhost:3001/api/publish-upload -H "Content-Type: application/json" -d '{"bundleData":"..."}'
191
+ ```
192
+
193
+ ### AI Auto-Discovery
194
+
195
+ Let your AI assistant automatically discover available Agents:
196
+
197
+ ```bash
198
+ curl http://localhost:3001/api/skills/agenthub-discover
199
+ ```
200
+
201
+ ## ๐Ÿ“š Tutorial Documentation
202
+
203
+ | Tutorial | Description |
204
+ |----------|-------------|
205
+ | [3 Steps to Replicate Agent](./docs/quick-start-3-steps.md) | 10-minute quick start guide |
206
+ | [Team Distribution Guide](./docs/team-distribution-guide.md) | How to standardize team Agent distribution |
207
+ | [FAQ](./docs/faq.md) | Frequently asked questions |
208
+
209
+ ## ๐Ÿ—๏ธ Architecture
210
+
211
+ ```
212
+ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” pack โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” publish โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
213
+ โ”‚ OpenClaw โ”‚ โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–บ โ”‚ Bundle โ”‚ โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–บ โ”‚ Registry โ”‚
214
+ โ”‚ Workspace โ”‚ โ”‚ (*.agent) โ”‚ โ”‚ (.registry) โ”‚
215
+ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
216
+ โ”‚
217
+ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
218
+ โ”‚
219
+ โ–ผ
220
+ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
221
+ โ”‚ AgentHub โ”‚
222
+ โ”‚ Web + API โ”‚
223
+ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
224
+ ```
225
+
226
+ ## ๐Ÿงช Development
227
+
228
+ ```bash
229
+ # Run tests
230
+ npm test
231
+
232
+ # Start development server
233
+ node src/cli.js serve --registry ./.registry
234
+ ```
235
+
236
+ ## ๐Ÿณ Docker Deployment
237
+
238
+ ```bash
239
+ # Production startup (inside container)
240
+ NODE_ENV=production node src/cli.js serve --registry ./.registry --port 3000 --host 0.0.0.0
241
+ ```
242
+
243
+ ## ๐Ÿค Contributing
244
+
245
+ Contributions are welcome! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for details.
246
+
247
+ - ๐Ÿ› [Report a Bug](https://github.com/itshaungmu/AgentHub/issues/new?template=bug_report.md)
248
+ - ๐Ÿ’ก [Request a Feature](https://github.com/itshaungmu/AgentHub/issues/new?template=feature_request.md)
249
+ - ๐Ÿ”ง [Submit a PR](https://github.com/itshaungmu/AgentHub/pulls)
250
+
251
+ ## ๐Ÿ“„ License
252
+
253
+ [MIT License](LICENSE) ยฉ AgentHub Team
254
+
255
+ ## ๐Ÿ™ Acknowledgments
256
+
257
+ - Built for the [OpenClaw](https://github.com/openclaw) ecosystem
258
+ - Inspired by npm and Docker Hub
259
+
260
+ ---
261
+
262
+ <div align="center">
263
+
264
+ **[โฌ† Back to Top](#agenthub)**
265
+
266
+ Made with โค๏ธ by the AgentHub Team
267
+
268
+ </div>