milaidy 1.0.0

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 (253) hide show
  1. package/LICENSE +8 -0
  2. package/README.md +538 -0
  3. package/dist/argv-CfSowvEA.js +63 -0
  4. package/dist/config-B-mboG4v.js +4 -0
  5. package/dist/eliza-CPJjgw-e.js +1491 -0
  6. package/dist/eliza.js +2192 -0
  7. package/dist/entry.js +232 -0
  8. package/dist/index.js +209 -0
  9. package/dist/links-BFKlWqSe.js +15 -0
  10. package/dist/paths-D_yh1DEJ.js +69 -0
  11. package/dist/plugins-cli-B7kSre2c.js +134 -0
  12. package/dist/program-6KwWwKKh.js +510 -0
  13. package/dist/register.agents-CPVmSjMG.js +17 -0
  14. package/dist/register.browser-B2ooXxNx.js +15 -0
  15. package/dist/register.channels-CMYQ6K6Y.js +42 -0
  16. package/dist/register.cron-D91lY1_Y.js +9 -0
  17. package/dist/register.devices-rU5I5L_y.js +13 -0
  18. package/dist/register.gateway-82SLAvw3.js +22 -0
  19. package/dist/register.hooks-B_XTBEkt.js +9 -0
  20. package/dist/register.logs-BgEGcPd8.js +10 -0
  21. package/dist/register.models-BJt9eVgZ.js +26 -0
  22. package/dist/register.nodes-B5xY1s8a.js +9 -0
  23. package/dist/register.skills-SFQqYIhg.js +10 -0
  24. package/dist/register.subclis-uF_AsbWR.js +187 -0
  25. package/dist/run-main-XODklzS-.js +56 -0
  26. package/dist/theme-DBvtuGeq.js +36 -0
  27. package/dist/utils-C1AUpp_V.js +42 -0
  28. package/dist/version-Cpn3yr5D.js +26 -0
  29. package/dist/workspace-Co3Wul2D.js +206 -0
  30. package/dist/workspace-DCA6MNVK.js +350 -0
  31. package/docs/.i18n/README.md +31 -0
  32. package/docs/.i18n/glossary.zh-CN.json +210 -0
  33. package/docs/.i18n/zh-CN.tm.jsonl +1329 -0
  34. package/docs/CNAME +1 -0
  35. package/docs/automation/cron-jobs.md +468 -0
  36. package/docs/automation/cron-vs-heartbeat.md +254 -0
  37. package/docs/automation/gmail-pubsub.md +256 -0
  38. package/docs/automation/poll.md +69 -0
  39. package/docs/automation/webhook.md +163 -0
  40. package/docs/bedrock.md +176 -0
  41. package/docs/brave-search.md +41 -0
  42. package/docs/broadcast-groups.md +442 -0
  43. package/docs/cli/acp.md +170 -0
  44. package/docs/cli/agent.md +24 -0
  45. package/docs/cli/agents.md +75 -0
  46. package/docs/cli/approvals.md +50 -0
  47. package/docs/cli/browser.md +107 -0
  48. package/docs/cli/channels.md +79 -0
  49. package/docs/cli/config.md +50 -0
  50. package/docs/cli/configure.md +33 -0
  51. package/docs/cli/cron.md +42 -0
  52. package/docs/cli/dashboard.md +16 -0
  53. package/docs/cli/devices.md +67 -0
  54. package/docs/cli/directory.md +63 -0
  55. package/docs/cli/dns.md +23 -0
  56. package/docs/cli/docs.md +15 -0
  57. package/docs/cli/doctor.md +41 -0
  58. package/docs/cli/gateway.md +199 -0
  59. package/docs/cli/health.md +21 -0
  60. package/docs/cli/hooks.md +291 -0
  61. package/docs/cli/index.md +1029 -0
  62. package/docs/cli/logs.md +24 -0
  63. package/docs/cli/memory.md +45 -0
  64. package/docs/cli/message.md +239 -0
  65. package/docs/cli/models.md +79 -0
  66. package/docs/cli/node.md +112 -0
  67. package/docs/cli/nodes.md +73 -0
  68. package/docs/cli/onboard.md +29 -0
  69. package/docs/cli/pairing.md +21 -0
  70. package/docs/cli/plugins.md +62 -0
  71. package/docs/cli/reset.md +17 -0
  72. package/docs/cli/sandbox.md +152 -0
  73. package/docs/cli/security.md +26 -0
  74. package/docs/cli/sessions.md +16 -0
  75. package/docs/cli/setup.md +29 -0
  76. package/docs/cli/skills.md +26 -0
  77. package/docs/cli/status.md +26 -0
  78. package/docs/cli/system.md +60 -0
  79. package/docs/cli/tui.md +23 -0
  80. package/docs/cli/uninstall.md +17 -0
  81. package/docs/cli/update.md +98 -0
  82. package/docs/cli/voicecall.md +34 -0
  83. package/docs/cli/webhooks.md +25 -0
  84. package/docs/concepts/agent-loop.md +146 -0
  85. package/docs/concepts/agent-workspace.md +229 -0
  86. package/docs/concepts/agent.md +122 -0
  87. package/docs/concepts/architecture.md +129 -0
  88. package/docs/concepts/channel-routing.md +114 -0
  89. package/docs/concepts/compaction.md +61 -0
  90. package/docs/concepts/context.md +159 -0
  91. package/docs/concepts/features.md +53 -0
  92. package/docs/concepts/group-messages.md +84 -0
  93. package/docs/concepts/groups.md +373 -0
  94. package/docs/concepts/markdown-formatting.md +130 -0
  95. package/docs/concepts/memory.md +546 -0
  96. package/docs/concepts/messages.md +154 -0
  97. package/docs/concepts/model-failover.md +149 -0
  98. package/docs/concepts/model-providers.md +315 -0
  99. package/docs/concepts/models.md +208 -0
  100. package/docs/concepts/multi-agent.md +376 -0
  101. package/docs/concepts/oauth.md +145 -0
  102. package/docs/concepts/plugins.md +454 -0
  103. package/docs/concepts/presence.md +102 -0
  104. package/docs/concepts/queue.md +89 -0
  105. package/docs/concepts/retry.md +69 -0
  106. package/docs/concepts/secrets.md +300 -0
  107. package/docs/concepts/session-pruning.md +122 -0
  108. package/docs/concepts/session-tool.md +193 -0
  109. package/docs/concepts/session.md +188 -0
  110. package/docs/concepts/sessions.md +10 -0
  111. package/docs/concepts/skills.md +392 -0
  112. package/docs/concepts/streaming.md +135 -0
  113. package/docs/concepts/system-prompt.md +114 -0
  114. package/docs/concepts/timezone.md +91 -0
  115. package/docs/concepts/typebox.md +289 -0
  116. package/docs/concepts/typing-indicators.md +68 -0
  117. package/docs/concepts/usage-tracking.md +35 -0
  118. package/docs/custom.css +4 -0
  119. package/docs/date-time.md +128 -0
  120. package/docs/debugging.md +162 -0
  121. package/docs/docs.json +1599 -0
  122. package/docs/environment.md +81 -0
  123. package/docs/hooks.md +876 -0
  124. package/docs/index.md +179 -0
  125. package/docs/install/ansible.md +208 -0
  126. package/docs/install/bun.md +59 -0
  127. package/docs/install/development-channels.md +75 -0
  128. package/docs/install/docker.md +567 -0
  129. package/docs/install/index.md +185 -0
  130. package/docs/install/installer.md +123 -0
  131. package/docs/install/migrating.md +192 -0
  132. package/docs/install/nix.md +96 -0
  133. package/docs/install/node.md +78 -0
  134. package/docs/install/uninstall.md +128 -0
  135. package/docs/install/updating.md +228 -0
  136. package/docs/logging.md +350 -0
  137. package/docs/multi-agent-sandbox-tools.md +395 -0
  138. package/docs/network.md +54 -0
  139. package/docs/nodes/audio.md +114 -0
  140. package/docs/nodes/camera.md +156 -0
  141. package/docs/nodes/images.md +72 -0
  142. package/docs/nodes/index.md +341 -0
  143. package/docs/nodes/location-command.md +113 -0
  144. package/docs/nodes/media-understanding.md +379 -0
  145. package/docs/nodes/talk.md +90 -0
  146. package/docs/nodes/voicewake.md +65 -0
  147. package/docs/northflank.mdx +53 -0
  148. package/docs/perplexity.md +80 -0
  149. package/docs/platforms/android.md +129 -0
  150. package/docs/platforms/digitalocean.md +262 -0
  151. package/docs/platforms/exe-dev.md +125 -0
  152. package/docs/platforms/fly.md +486 -0
  153. package/docs/platforms/gcp.md +503 -0
  154. package/docs/platforms/hetzner.md +330 -0
  155. package/docs/platforms/index.md +53 -0
  156. package/docs/platforms/ios.md +106 -0
  157. package/docs/platforms/linux.md +94 -0
  158. package/docs/platforms/mac/bundled-gateway.md +73 -0
  159. package/docs/platforms/mac/canvas.md +125 -0
  160. package/docs/platforms/mac/child-process.md +69 -0
  161. package/docs/platforms/mac/dev-setup.md +102 -0
  162. package/docs/platforms/mac/health.md +34 -0
  163. package/docs/platforms/mac/icon.md +31 -0
  164. package/docs/platforms/mac/logging.md +57 -0
  165. package/docs/platforms/mac/menu-bar.md +81 -0
  166. package/docs/platforms/mac/peekaboo.md +65 -0
  167. package/docs/platforms/mac/permissions.md +44 -0
  168. package/docs/platforms/mac/release.md +85 -0
  169. package/docs/platforms/mac/remote.md +83 -0
  170. package/docs/platforms/mac/signing.md +47 -0
  171. package/docs/platforms/mac/skills.md +33 -0
  172. package/docs/platforms/mac/voice-overlay.md +60 -0
  173. package/docs/platforms/mac/voicewake.md +67 -0
  174. package/docs/platforms/mac/webchat.md +41 -0
  175. package/docs/platforms/mac/xpc.md +61 -0
  176. package/docs/platforms/macos-vm.md +281 -0
  177. package/docs/platforms/macos.md +203 -0
  178. package/docs/platforms/oracle.md +303 -0
  179. package/docs/platforms/raspberry-pi.md +358 -0
  180. package/docs/platforms/windows.md +159 -0
  181. package/docs/plugin.md +651 -0
  182. package/docs/plugins/agent-tools.md +99 -0
  183. package/docs/plugins/manifest.md +71 -0
  184. package/docs/plugins/voice-call.md +273 -0
  185. package/docs/plugins/zalouser.md +70 -0
  186. package/docs/providers/anthropic.md +152 -0
  187. package/docs/providers/claude-max-api-proxy.md +148 -0
  188. package/docs/providers/cloudflare-ai-gateway.md +71 -0
  189. package/docs/providers/deepgram.md +93 -0
  190. package/docs/providers/glm.md +33 -0
  191. package/docs/providers/index.md +63 -0
  192. package/docs/providers/minimax.md +208 -0
  193. package/docs/providers/models.md +51 -0
  194. package/docs/providers/moonshot.md +142 -0
  195. package/docs/providers/ollama.md +223 -0
  196. package/docs/providers/openai.md +62 -0
  197. package/docs/providers/opencode.md +36 -0
  198. package/docs/providers/openrouter.md +37 -0
  199. package/docs/providers/qwen.md +53 -0
  200. package/docs/providers/synthetic.md +99 -0
  201. package/docs/providers/venice.md +267 -0
  202. package/docs/providers/vercel-ai-gateway.md +50 -0
  203. package/docs/providers/xiaomi.md +64 -0
  204. package/docs/providers/zai.md +36 -0
  205. package/docs/railway.mdx +99 -0
  206. package/docs/reference/templates/AGENTS.md +9 -0
  207. package/docs/reference/templates/BOOTSTRAP.md +3 -0
  208. package/docs/reference/templates/HEARTBEAT.md +3 -0
  209. package/docs/reference/templates/IDENTITY.md +3 -0
  210. package/docs/reference/templates/TOOLS.md +3 -0
  211. package/docs/reference/templates/USER.md +3 -0
  212. package/docs/render.mdx +165 -0
  213. package/docs/start/docs-directory.md +63 -0
  214. package/docs/start/getting-started.md +212 -0
  215. package/docs/start/milaidy.md +247 -0
  216. package/docs/start/onboarding.md +258 -0
  217. package/docs/start/pairing.md +86 -0
  218. package/docs/start/quickstart.md +81 -0
  219. package/docs/start/setup.md +149 -0
  220. package/docs/start/showcase.md +416 -0
  221. package/docs/start/wizard.md +418 -0
  222. package/docs/testing.md +368 -0
  223. package/docs/token-use.md +112 -0
  224. package/docs/tools/agent-send.md +53 -0
  225. package/docs/tools/apply-patch.md +50 -0
  226. package/docs/tools/browser-linux-troubleshooting.md +139 -0
  227. package/docs/tools/browser-login.md +68 -0
  228. package/docs/tools/browser.md +576 -0
  229. package/docs/tools/chrome-extension.md +178 -0
  230. package/docs/tools/clawhub.md +257 -0
  231. package/docs/tools/creating-skills.md +54 -0
  232. package/docs/tools/elevated.md +57 -0
  233. package/docs/tools/exec-approvals.md +246 -0
  234. package/docs/tools/exec.md +179 -0
  235. package/docs/tools/firecrawl.md +61 -0
  236. package/docs/tools/index.md +508 -0
  237. package/docs/tools/llm-task.md +115 -0
  238. package/docs/tools/reactions.md +22 -0
  239. package/docs/tools/skills-config.md +76 -0
  240. package/docs/tools/skills.md +300 -0
  241. package/docs/tools/slash-commands.md +196 -0
  242. package/docs/tools/subagents.md +151 -0
  243. package/docs/tools/thinking.md +73 -0
  244. package/docs/tools/web.md +261 -0
  245. package/docs/tui.md +159 -0
  246. package/docs/vps.md +43 -0
  247. package/docs/web/control-ui.md +221 -0
  248. package/docs/web/dashboard.md +46 -0
  249. package/docs/web/index.md +116 -0
  250. package/docs/web/webchat.md +49 -0
  251. package/milaidy.mjs +14 -0
  252. package/package.json +271 -0
  253. package/skills/.cache/catalog.json +88519 -0
@@ -0,0 +1,442 @@
1
+ ---
2
+ summary: "Broadcast a WhatsApp message to multiple agents"
3
+ read_when:
4
+ - Configuring broadcast groups
5
+ - Debugging multi-agent replies in WhatsApp
6
+ status: experimental
7
+ title: "Broadcast Groups"
8
+ ---
9
+
10
+ # Broadcast Groups
11
+
12
+ **Status:** Experimental
13
+ **Version:** Added in 2026.1.9
14
+
15
+ ## Overview
16
+
17
+ Broadcast Groups enable multiple agents to process and respond to the same message simultaneously. This allows you to create specialized agent teams that work together in a single WhatsApp group or DM — all using one phone number.
18
+
19
+ Current scope: **WhatsApp only** (web channel).
20
+
21
+ Broadcast groups are evaluated after channel allowlists and group activation rules. In WhatsApp groups, this means broadcasts happen when Milaidy would normally reply (for example: on mention, depending on your group settings).
22
+
23
+ ## Use Cases
24
+
25
+ ### 1. Specialized Agent Teams
26
+
27
+ Deploy multiple agents with atomic, focused responsibilities:
28
+
29
+ ```
30
+ Group: "Development Team"
31
+ Agents:
32
+ - CodeReviewer (reviews code snippets)
33
+ - DocumentationBot (generates docs)
34
+ - SecurityAuditor (checks for vulnerabilities)
35
+ - TestGenerator (suggests test cases)
36
+ ```
37
+
38
+ Each agent processes the same message and provides its specialized perspective.
39
+
40
+ ### 2. Multi-Language Support
41
+
42
+ ```
43
+ Group: "International Support"
44
+ Agents:
45
+ - Agent_EN (responds in English)
46
+ - Agent_DE (responds in German)
47
+ - Agent_ES (responds in Spanish)
48
+ ```
49
+
50
+ ### 3. Quality Assurance Workflows
51
+
52
+ ```
53
+ Group: "Customer Support"
54
+ Agents:
55
+ - SupportAgent (provides answer)
56
+ - QAAgent (reviews quality, only responds if issues found)
57
+ ```
58
+
59
+ ### 4. Task Automation
60
+
61
+ ```
62
+ Group: "Project Management"
63
+ Agents:
64
+ - TaskTracker (updates task database)
65
+ - TimeLogger (logs time spent)
66
+ - ReportGenerator (creates summaries)
67
+ ```
68
+
69
+ ## Configuration
70
+
71
+ ### Basic Setup
72
+
73
+ Add a top-level `broadcast` section (next to `bindings`). Keys are WhatsApp peer ids:
74
+
75
+ - group chats: group JID (e.g. `120363403215116621@g.us`)
76
+ - DMs: E.164 phone number (e.g. `+15551234567`)
77
+
78
+ ```json
79
+ {
80
+ "broadcast": {
81
+ "120363403215116621@g.us": ["alfred", "baerbel", "assistant3"]
82
+ }
83
+ }
84
+ ```
85
+
86
+ **Result:** When Milaidy would reply in this chat, it will run all three agents.
87
+
88
+ ### Processing Strategy
89
+
90
+ Control how agents process messages:
91
+
92
+ #### Parallel (Default)
93
+
94
+ All agents process simultaneously:
95
+
96
+ ```json
97
+ {
98
+ "broadcast": {
99
+ "strategy": "parallel",
100
+ "120363403215116621@g.us": ["alfred", "baerbel"]
101
+ }
102
+ }
103
+ ```
104
+
105
+ #### Sequential
106
+
107
+ Agents process in order (one waits for previous to finish):
108
+
109
+ ```json
110
+ {
111
+ "broadcast": {
112
+ "strategy": "sequential",
113
+ "120363403215116621@g.us": ["alfred", "baerbel"]
114
+ }
115
+ }
116
+ ```
117
+
118
+ ### Complete Example
119
+
120
+ ```json
121
+ {
122
+ "agents": {
123
+ "list": [
124
+ {
125
+ "id": "code-reviewer",
126
+ "name": "Code Reviewer",
127
+ "workspace": "/path/to/code-reviewer",
128
+ "sandbox": { "mode": "all" }
129
+ },
130
+ {
131
+ "id": "security-auditor",
132
+ "name": "Security Auditor",
133
+ "workspace": "/path/to/security-auditor",
134
+ "sandbox": { "mode": "all" }
135
+ },
136
+ {
137
+ "id": "docs-generator",
138
+ "name": "Documentation Generator",
139
+ "workspace": "/path/to/docs-generator",
140
+ "sandbox": { "mode": "all" }
141
+ }
142
+ ]
143
+ },
144
+ "broadcast": {
145
+ "strategy": "parallel",
146
+ "120363403215116621@g.us": ["code-reviewer", "security-auditor", "docs-generator"],
147
+ "120363424282127706@g.us": ["support-en", "support-de"],
148
+ "+15555550123": ["assistant", "logger"]
149
+ }
150
+ }
151
+ ```
152
+
153
+ ## How It Works
154
+
155
+ ### Message Flow
156
+
157
+ 1. **Incoming message** arrives in a WhatsApp group
158
+ 2. **Broadcast check**: System checks if peer ID is in `broadcast`
159
+ 3. **If in broadcast list**:
160
+ - All listed agents process the message
161
+ - Each agent has its own session key and isolated context
162
+ - Agents process in parallel (default) or sequentially
163
+ 4. **If not in broadcast list**:
164
+ - Normal routing applies (first matching binding)
165
+
166
+ Note: broadcast groups do not bypass channel allowlists or group activation rules (mentions/commands/etc). They only change _which agents run_ when a message is eligible for processing.
167
+
168
+ ### Session Isolation
169
+
170
+ Each agent in a broadcast group maintains completely separate:
171
+
172
+ - **Session keys** (`agent:alfred:whatsapp:group:120363...` vs `agent:baerbel:whatsapp:group:120363...`)
173
+ - **Conversation history** (agent doesn't see other agents' messages)
174
+ - **Workspace** (separate sandboxes if configured)
175
+ - **Tool access** (different allow/deny lists)
176
+ - **Memory/context** (separate IDENTITY.md, character definitions, etc.)
177
+ - **Group context buffer** (recent group messages used for context) is shared per peer, so all broadcast agents see the same context when triggered
178
+
179
+ This allows each agent to have:
180
+
181
+ - Different personalities
182
+ - Different tool access (e.g., read-only vs. read-write)
183
+ - Different models (e.g., opus vs. sonnet)
184
+ - Different skills installed
185
+
186
+ ### Example: Isolated Sessions
187
+
188
+ In group `120363403215116621@g.us` with agents `["alfred", "baerbel"]`:
189
+
190
+ **Alfred's context:**
191
+
192
+ ```
193
+ Session: agent:alfred:whatsapp:group:120363403215116621@g.us
194
+ History: [user message, alfred's previous responses]
195
+ Workspace: /Users/pascal/milaidy-alfred/
196
+ Tools: read, write, exec
197
+ ```
198
+
199
+ **Bärbel's context:**
200
+
201
+ ```
202
+ Session: agent:baerbel:whatsapp:group:120363403215116621@g.us
203
+ History: [user message, baerbel's previous responses]
204
+ Workspace: /Users/pascal/milaidy-baerbel/
205
+ Tools: read only
206
+ ```
207
+
208
+ ## Best Practices
209
+
210
+ ### 1. Keep Agents Focused
211
+
212
+ Design each agent with a single, clear responsibility:
213
+
214
+ ```json
215
+ {
216
+ "broadcast": {
217
+ "DEV_GROUP": ["formatter", "linter", "tester"]
218
+ }
219
+ }
220
+ ```
221
+
222
+ ✅ **Good:** Each agent has one job
223
+ ❌ **Bad:** One generic "dev-helper" agent
224
+
225
+ ### 2. Use Descriptive Names
226
+
227
+ Make it clear what each agent does:
228
+
229
+ ```json
230
+ {
231
+ "agents": {
232
+ "security-scanner": { "name": "Security Scanner" },
233
+ "code-formatter": { "name": "Code Formatter" },
234
+ "test-generator": { "name": "Test Generator" }
235
+ }
236
+ }
237
+ ```
238
+
239
+ ### 3. Configure Different Tool Access
240
+
241
+ Give agents only the tools they need:
242
+
243
+ ```json
244
+ {
245
+ "agents": {
246
+ "reviewer": {
247
+ "tools": { "allow": ["read", "exec"] } // Read-only
248
+ },
249
+ "fixer": {
250
+ "tools": { "allow": ["read", "write", "edit", "exec"] } // Read-write
251
+ }
252
+ }
253
+ }
254
+ ```
255
+
256
+ ### 4. Monitor Performance
257
+
258
+ With many agents, consider:
259
+
260
+ - Using `"strategy": "parallel"` (default) for speed
261
+ - Limiting broadcast groups to 5-10 agents
262
+ - Using faster models for simpler agents
263
+
264
+ ### 5. Handle Failures Gracefully
265
+
266
+ Agents fail independently. One agent's error doesn't block others:
267
+
268
+ ```
269
+ Message → [Agent A ✓, Agent B ✗ error, Agent C ✓]
270
+ Result: Agent A and C respond, Agent B logs error
271
+ ```
272
+
273
+ ## Compatibility
274
+
275
+ ### Providers
276
+
277
+ Broadcast groups currently work with:
278
+
279
+ - ✅ WhatsApp (implemented)
280
+ - 🚧 Telegram (planned)
281
+ - 🚧 Discord (planned)
282
+ - 🚧 Slack (planned)
283
+
284
+ ### Routing
285
+
286
+ Broadcast groups work alongside existing routing:
287
+
288
+ ```json
289
+ {
290
+ "bindings": [
291
+ {
292
+ "match": { "channel": "whatsapp", "peer": { "kind": "group", "id": "GROUP_A" } },
293
+ "agentId": "alfred"
294
+ }
295
+ ],
296
+ "broadcast": {
297
+ "GROUP_B": ["agent1", "agent2"]
298
+ }
299
+ }
300
+ ```
301
+
302
+ - `GROUP_A`: Only alfred responds (normal routing)
303
+ - `GROUP_B`: agent1 AND agent2 respond (broadcast)
304
+
305
+ **Precedence:** `broadcast` takes priority over `bindings`.
306
+
307
+ ## Troubleshooting
308
+
309
+ ### Agents Not Responding
310
+
311
+ **Check:**
312
+
313
+ 1. Agent IDs exist in `agents.list`
314
+ 2. Peer ID format is correct (e.g., `120363403215116621@g.us`)
315
+ 3. Agents are not in deny lists
316
+
317
+ **Debug:**
318
+
319
+ ```bash
320
+ tail -f ~/.milaidy/logs/gateway.log | grep broadcast
321
+ ```
322
+
323
+ ### Only One Agent Responding
324
+
325
+ **Cause:** Peer ID might be in `bindings` but not `broadcast`.
326
+
327
+ **Fix:** Add to broadcast config or remove from bindings.
328
+
329
+ ### Performance Issues
330
+
331
+ **If slow with many agents:**
332
+
333
+ - Reduce number of agents per group
334
+ - Use lighter models (sonnet instead of opus)
335
+ - Check sandbox startup time
336
+
337
+ ## Examples
338
+
339
+ ### Example 1: Code Review Team
340
+
341
+ ```json
342
+ {
343
+ "broadcast": {
344
+ "strategy": "parallel",
345
+ "120363403215116621@g.us": [
346
+ "code-formatter",
347
+ "security-scanner",
348
+ "test-coverage",
349
+ "docs-checker"
350
+ ]
351
+ },
352
+ "agents": {
353
+ "list": [
354
+ {
355
+ "id": "code-formatter",
356
+ "workspace": "~/agents/formatter",
357
+ "tools": { "allow": ["read", "write"] }
358
+ },
359
+ {
360
+ "id": "security-scanner",
361
+ "workspace": "~/agents/security",
362
+ "tools": { "allow": ["read", "exec"] }
363
+ },
364
+ {
365
+ "id": "test-coverage",
366
+ "workspace": "~/agents/testing",
367
+ "tools": { "allow": ["read", "exec"] }
368
+ },
369
+ { "id": "docs-checker", "workspace": "~/agents/docs", "tools": { "allow": ["read"] } }
370
+ ]
371
+ }
372
+ }
373
+ ```
374
+
375
+ **User sends:** Code snippet
376
+ **Responses:**
377
+
378
+ - code-formatter: "Fixed indentation and added type hints"
379
+ - security-scanner: "⚠️ SQL injection vulnerability in line 12"
380
+ - test-coverage: "Coverage is 45%, missing tests for error cases"
381
+ - docs-checker: "Missing docstring for function `process_data`"
382
+
383
+ ### Example 2: Multi-Language Support
384
+
385
+ ```json
386
+ {
387
+ "broadcast": {
388
+ "strategy": "sequential",
389
+ "+15555550123": ["detect-language", "translator-en", "translator-de"]
390
+ },
391
+ "agents": {
392
+ "list": [
393
+ { "id": "detect-language", "workspace": "~/agents/lang-detect" },
394
+ { "id": "translator-en", "workspace": "~/agents/translate-en" },
395
+ { "id": "translator-de", "workspace": "~/agents/translate-de" }
396
+ ]
397
+ }
398
+ }
399
+ ```
400
+
401
+ ## API Reference
402
+
403
+ ### Config Schema
404
+
405
+ ```typescript
406
+ interface MilaidyConfig {
407
+ broadcast?: {
408
+ strategy?: "parallel" | "sequential";
409
+ [peerId: string]: string[];
410
+ };
411
+ }
412
+ ```
413
+
414
+ ### Fields
415
+
416
+ - `strategy` (optional): How to process agents
417
+ - `"parallel"` (default): All agents process simultaneously
418
+ - `"sequential"`: Agents process in array order
419
+ - `[peerId]`: WhatsApp group JID, E.164 number, or other peer ID
420
+ - Value: Array of agent IDs that should process messages
421
+
422
+ ## Limitations
423
+
424
+ 1. **Max agents:** No hard limit, but 10+ agents may be slow
425
+ 2. **Shared context:** Agents don't see each other's responses (by design)
426
+ 3. **Message ordering:** Parallel responses may arrive in any order
427
+ 4. **Rate limits:** All agents count toward WhatsApp rate limits
428
+
429
+ ## Future Enhancements
430
+
431
+ Planned features:
432
+
433
+ - [ ] Shared context mode (agents see each other's responses)
434
+ - [ ] Agent coordination (agents can signal each other)
435
+ - [ ] Dynamic agent selection (choose agents based on message content)
436
+ - [ ] Agent priorities (some agents respond before others)
437
+
438
+ ## See Also
439
+
440
+ - [Multi-Agent Configuration](/multi-agent-sandbox-tools)
441
+ - [Routing Configuration](/concepts/channel-routing)
442
+ - [Session Management](/concepts/sessions)
@@ -0,0 +1,170 @@
1
+ ---
2
+ summary: "Run the ACP bridge for IDE integrations"
3
+ read_when:
4
+ - Setting up ACP-based IDE integrations
5
+ - Debugging ACP session routing to the Gateway
6
+ title: "acp"
7
+ ---
8
+
9
+ # acp
10
+
11
+ Run the ACP (Agent Client Protocol) bridge that talks to a Milaidy Gateway.
12
+
13
+ This command speaks ACP over stdio for IDEs and forwards prompts to the Gateway
14
+ over WebSocket. It keeps ACP sessions mapped to Gateway session keys.
15
+
16
+ ## Usage
17
+
18
+ ```bash
19
+ milaidy acp
20
+
21
+ # Remote Gateway
22
+ milaidy acp --url wss://gateway-host:18789 --token <token>
23
+
24
+ # Attach to an existing session key
25
+ milaidy acp --session agent:main:main
26
+
27
+ # Attach by label (must already exist)
28
+ milaidy acp --session-label "support inbox"
29
+
30
+ # Reset the session key before the first prompt
31
+ milaidy acp --session agent:main:main --reset-session
32
+ ```
33
+
34
+ ## ACP client (debug)
35
+
36
+ Use the built-in ACP client to sanity-check the bridge without an IDE.
37
+ It spawns the ACP bridge and lets you type prompts interactively.
38
+
39
+ ```bash
40
+ milaidy acp client
41
+
42
+ # Point the spawned bridge at a remote Gateway
43
+ milaidy acp client --server-args --url wss://gateway-host:18789 --token <token>
44
+
45
+ # Override the server command (default: milaidy)
46
+ milaidy acp client --server "node" --server-args milaidy.mjs acp --url ws://127.0.0.1:19001
47
+ ```
48
+
49
+ ## How to use this
50
+
51
+ Use ACP when an IDE (or other client) speaks Agent Client Protocol and you want
52
+ it to drive a Milaidy Gateway session.
53
+
54
+ 1. Ensure the Gateway is running (local or remote).
55
+ 2. Configure the Gateway target (config or flags).
56
+ 3. Point your IDE to run `milaidy acp` over stdio.
57
+
58
+ Example config (persisted):
59
+
60
+ ```bash
61
+ milaidy config set gateway.remote.url wss://gateway-host:18789
62
+ milaidy config set gateway.remote.token <token>
63
+ ```
64
+
65
+ Example direct run (no config write):
66
+
67
+ ```bash
68
+ milaidy acp --url wss://gateway-host:18789 --token <token>
69
+ ```
70
+
71
+ ## Selecting agents
72
+
73
+ ACP does not pick agents directly. It routes by the Gateway session key.
74
+
75
+ Use agent-scoped session keys to target a specific agent:
76
+
77
+ ```bash
78
+ milaidy acp --session agent:main:main
79
+ milaidy acp --session agent:design:main
80
+ milaidy acp --session agent:qa:bug-123
81
+ ```
82
+
83
+ Each ACP session maps to a single Gateway session key. One agent can have many
84
+ sessions; ACP defaults to an isolated `acp:<uuid>` session unless you override
85
+ the key or label.
86
+
87
+ ## Zed editor setup
88
+
89
+ Add a custom ACP agent in `~/.config/zed/settings.json` (or use Zed’s Settings UI):
90
+
91
+ ```json
92
+ {
93
+ "agent_servers": {
94
+ "Milaidy ACP": {
95
+ "type": "custom",
96
+ "command": "milaidy",
97
+ "args": ["acp"],
98
+ "env": {}
99
+ }
100
+ }
101
+ }
102
+ ```
103
+
104
+ To target a specific Gateway or agent:
105
+
106
+ ```json
107
+ {
108
+ "agent_servers": {
109
+ "Milaidy ACP": {
110
+ "type": "custom",
111
+ "command": "milaidy",
112
+ "args": [
113
+ "acp",
114
+ "--url",
115
+ "wss://gateway-host:18789",
116
+ "--token",
117
+ "<token>",
118
+ "--session",
119
+ "agent:design:main"
120
+ ],
121
+ "env": {}
122
+ }
123
+ }
124
+ }
125
+ ```
126
+
127
+ In Zed, open the Agent panel and select “Milaidy ACP” to start a thread.
128
+
129
+ ## Session mapping
130
+
131
+ By default, ACP sessions get an isolated Gateway session key with an `acp:` prefix.
132
+ To reuse a known session, pass a session key or label:
133
+
134
+ - `--session <key>`: use a specific Gateway session key.
135
+ - `--session-label <label>`: resolve an existing session by label.
136
+ - `--reset-session`: mint a fresh session id for that key (same key, new transcript).
137
+
138
+ If your ACP client supports metadata, you can override per session:
139
+
140
+ ```json
141
+ {
142
+ "_meta": {
143
+ "sessionKey": "agent:main:main",
144
+ "sessionLabel": "support inbox",
145
+ "resetSession": true
146
+ }
147
+ }
148
+ ```
149
+
150
+ Learn more about session keys at [/concepts/session](/concepts/session).
151
+
152
+ ## Options
153
+
154
+ - `--url <url>`: Gateway WebSocket URL (defaults to gateway.remote.url when configured).
155
+ - `--token <token>`: Gateway auth token.
156
+ - `--password <password>`: Gateway auth password.
157
+ - `--session <key>`: default session key.
158
+ - `--session-label <label>`: default session label to resolve.
159
+ - `--require-existing`: fail if the session key/label does not exist.
160
+ - `--reset-session`: reset the session key before first use.
161
+ - `--no-prefix-cwd`: do not prefix prompts with the working directory.
162
+ - `--verbose, -v`: verbose logging to stderr.
163
+
164
+ ### `acp client` options
165
+
166
+ - `--cwd <dir>`: working directory for the ACP session.
167
+ - `--server <command>`: ACP server command (default: `milaidy`).
168
+ - `--server-args <args...>`: extra arguments passed to the ACP server.
169
+ - `--server-verbose`: enable verbose logging on the ACP server.
170
+ - `--verbose, -v`: verbose client logging.
@@ -0,0 +1,24 @@
1
+ ---
2
+ summary: "CLI reference for `milaidy agent` (send one agent turn via the Gateway)"
3
+ read_when:
4
+ - You want to run one agent turn from scripts (optionally deliver reply)
5
+ title: "agent"
6
+ ---
7
+
8
+ # `milaidy agent`
9
+
10
+ Run an agent turn via the Gateway (use `--local` for embedded).
11
+ Use `--agent <id>` to target a configured agent directly.
12
+
13
+ Related:
14
+
15
+ - Agent send tool: [Agent send](/tools/agent-send)
16
+
17
+ ## Examples
18
+
19
+ ```bash
20
+ milaidy agent --to +15555550123 --message "status update" --deliver
21
+ milaidy agent --agent ops --message "Summarize logs"
22
+ milaidy agent --session-id 1234 --message "Summarize inbox" --thinking medium
23
+ milaidy agent --agent ops --message "Generate report" --deliver --reply-channel slack --reply-to "#reports"
24
+ ```
@@ -0,0 +1,75 @@
1
+ ---
2
+ summary: "CLI reference for `milaidy agents` (list/add/delete/set identity)"
3
+ read_when:
4
+ - You want multiple isolated agents (workspaces + routing + auth)
5
+ title: "agents"
6
+ ---
7
+
8
+ # `milaidy agents`
9
+
10
+ Manage isolated agents (workspaces + auth + routing).
11
+
12
+ Related:
13
+
14
+ - Multi-agent routing: [Multi-Agent Routing](/concepts/multi-agent)
15
+ - Agent workspace: [Agent workspace](/concepts/agent-workspace)
16
+
17
+ ## Examples
18
+
19
+ ```bash
20
+ milaidy agents list
21
+ milaidy agents add work --workspace ~/.milaidy/workspace-work
22
+ milaidy agents set-identity --workspace ~/.milaidy/workspace --from-identity
23
+ milaidy agents set-identity --agent main --avatar avatars/milaidy.png
24
+ milaidy agents delete work
25
+ ```
26
+
27
+ ## Identity files
28
+
29
+ Each agent workspace can include an `IDENTITY.md` at the workspace root:
30
+
31
+ - Example path: `~/.milaidy/workspace/IDENTITY.md`
32
+ - `set-identity --from-identity` reads from the workspace root (or an explicit `--identity-file`)
33
+
34
+ Avatar paths resolve relative to the workspace root.
35
+
36
+ ## Set identity
37
+
38
+ `set-identity` writes fields into `agents.list[].identity`:
39
+
40
+ - `name`
41
+ - `theme`
42
+ - `emoji`
43
+ - `avatar` (workspace-relative path, http(s) URL, or data URI)
44
+
45
+ Load from `IDENTITY.md`:
46
+
47
+ ```bash
48
+ milaidy agents set-identity --workspace ~/.milaidy/workspace --from-identity
49
+ ```
50
+
51
+ Override fields explicitly:
52
+
53
+ ```bash
54
+ milaidy agents set-identity --agent main --name "Milaidy" --emoji "🌹" --avatar avatars/milaidy.png
55
+ ```
56
+
57
+ Config sample:
58
+
59
+ ```json5
60
+ {
61
+ agents: {
62
+ list: [
63
+ {
64
+ id: "main",
65
+ identity: {
66
+ name: "Milaidy",
67
+ theme: "assistant",
68
+ emoji: "🌹",
69
+ avatar: "avatars/milaidy.png",
70
+ },
71
+ },
72
+ ],
73
+ },
74
+ }
75
+ ```