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,165 @@
1
+ ---
2
+ title: Deploy on Render
3
+ ---
4
+
5
+ Deploy Milaidy on Render using Infrastructure as Code. The included `render.yaml` Blueprint defines your entire stack declaratively, service, disk, environment variables, so you can deploy with a single click and version your infrastructure alongside your code.
6
+
7
+ ## Prerequisites
8
+
9
+ - A [Render account](https://render.com) (free tier available)
10
+ - An API key from your preferred [model provider](/providers)
11
+
12
+ ## Deploy with a Render Blueprint
13
+
14
+ <a
15
+ href="https://render.com/deploy?repo=https://github.com/milaidy/milaidy"
16
+ target="_blank"
17
+ rel="noreferrer"
18
+ >
19
+ Deploy to Render
20
+ </a>
21
+
22
+ Clicking this link will:
23
+
24
+ 1. Create a new Render service from the `render.yaml` Blueprint at the root of this repo.
25
+ 2. Prompt you to set `SETUP_PASSWORD`
26
+ 3. Build the Docker image and deploy
27
+
28
+ Once deployed, your service URL follows the pattern `https://<service-name>.onrender.com`.
29
+
30
+ ## Understanding the Blueprint
31
+
32
+ Render Blueprints are YAML files that define your infrastructure. The `render.yaml` in this
33
+ repository configures everything needed to run Milaidy:
34
+
35
+ ```yaml
36
+ services:
37
+ - type: web
38
+ name: milaidy
39
+ runtime: docker
40
+ plan: starter
41
+ healthCheckPath: /health
42
+ envVars:
43
+ - key: PORT
44
+ value: "8080"
45
+ - key: SETUP_PASSWORD
46
+ sync: false # prompts during deploy
47
+ - key: MILAIDY_STATE_DIR
48
+ value: /data/.milaidy
49
+ - key: MILAIDY_WORKSPACE_DIR
50
+ value: /data/workspace
51
+ - key: MILAIDY_GATEWAY_TOKEN
52
+ generateValue: true # auto-generates a secure token
53
+ disk:
54
+ name: milaidy-data
55
+ mountPath: /data
56
+ sizeGB: 1
57
+ ```
58
+
59
+ Key Blueprint features used:
60
+
61
+ | Feature | Purpose |
62
+ | --------------------- | ---------------------------------------------------------- |
63
+ | `runtime: docker` | Builds from the repo's Dockerfile |
64
+ | `healthCheckPath` | Render monitors `/health` and restarts unhealthy instances |
65
+ | `sync: false` | Prompts for value during deploy (secrets) |
66
+ | `generateValue: true` | Auto-generates a cryptographically secure value |
67
+ | `disk` | Persistent storage that survives redeploys |
68
+
69
+ ## Choosing a plan
70
+
71
+ | Plan | Spin-down | Disk | Best for |
72
+ | --------- | ----------------- | ------------- | ----------------------------- |
73
+ | Free | After 15 min idle | Not available | Testing, demos |
74
+ | Starter | Never | 1GB+ | Personal use, small teams |
75
+ | Standard+ | Never | 1GB+ | Production, multiple channels |
76
+
77
+ The Blueprint defaults to `starter`. To use free tier, change `plan: free` in your fork's
78
+ `render.yaml` (but note: no persistent disk means config resets on each deploy).
79
+
80
+ ## After deployment
81
+
82
+ ### Complete the setup wizard
83
+
84
+ 1. Navigate to `https://<your-service>.onrender.com/setup`
85
+ 2. Enter your `SETUP_PASSWORD`
86
+ 3. Select a model provider and paste your API key
87
+ 4. Optionally configure messaging channels (Telegram, Discord, Slack)
88
+ 5. Click **Run setup**
89
+
90
+ ### Access the Control UI
91
+
92
+ The web dashboard is available at `https://<your-service>.onrender.com/milaidy`.
93
+
94
+ ## Render Dashboard features
95
+
96
+ ### Logs
97
+
98
+ View real-time logs in **Dashboard → your service → Logs**. Filter by:
99
+
100
+ - Build logs (Docker image creation)
101
+ - Deploy logs (service startup)
102
+ - Runtime logs (application output)
103
+
104
+ ### Shell access
105
+
106
+ For debugging, open a shell session via **Dashboard → your service → Shell**. The persistent disk is mounted at `/data`.
107
+
108
+ ### Environment variables
109
+
110
+ Modify variables in **Dashboard → your service → Environment**. Changes trigger an automatic redeploy.
111
+
112
+ ### Auto-deploy
113
+
114
+ If you use the original Milaidy repository, Render will not auto-deploy your Milaidy. To update it, run a manual Blueprint sync from the dashboard.
115
+
116
+ ## Custom domain
117
+
118
+ 1. Go to **Dashboard → your service → Settings → Custom Domains**
119
+ 2. Add your domain
120
+ 3. Configure DNS as instructed (CNAME to `*.onrender.com`)
121
+ 4. Render provisions a TLS certificate automatically
122
+
123
+ ## Scaling
124
+
125
+ Render supports horizontal and vertical scaling:
126
+
127
+ - **Vertical**: Change the plan to get more CPU/RAM
128
+ - **Horizontal**: Increase instance count (Standard plan and above)
129
+
130
+ For Milaidy, vertical scaling is usually sufficient. Horizontal scaling requires sticky sessions or external state management.
131
+
132
+ ## Backups and migration
133
+
134
+ Export your configuration and workspace at any time:
135
+
136
+ ```
137
+ https://<your-service>.onrender.com/setup/export
138
+ ```
139
+
140
+ This downloads a portable backup you can restore on any Milaidy host.
141
+
142
+ ## Troubleshooting
143
+
144
+ ### Service won't start
145
+
146
+ Check the deploy logs in the Render Dashboard. Common issues:
147
+
148
+ - Missing `SETUP_PASSWORD` — the Blueprint prompts for this, but verify it's set
149
+ - Port mismatch — ensure `PORT=8080` matches the Dockerfile's exposed port
150
+
151
+ ### Slow cold starts (free tier)
152
+
153
+ Free tier services spin down after 15 minutes of inactivity. The first request after spin-down takes a few seconds while the container starts. Upgrade to Starter plan for always-on.
154
+
155
+ ### Data loss after redeploy
156
+
157
+ This happens on free tier (no persistent disk). Upgrade to a paid plan, or
158
+ regularly export your config via `/setup/export`.
159
+
160
+ ### Health check failures
161
+
162
+ Render expects a 200 response from `/health` within 30 seconds. If builds succeed but deploys fail, the service may be taking too long to start. Check:
163
+
164
+ - Build logs for errors
165
+ - Whether the container runs locally with `docker build && docker run`
@@ -0,0 +1,63 @@
1
+ ---
2
+ summary: "Curated links to the most used Milaidy docs."
3
+ read_when:
4
+ - You want quick access to key docs pages
5
+ title: "Docs directory"
6
+ ---
7
+
8
+ <Note>
9
+ For a complete map of the docs, see [Docs hubs](/start/hubs).
10
+ </Note>
11
+
12
+ ## Start here
13
+
14
+ - [Docs hubs (all pages linked)](/start/hubs)
15
+ - [Help](/help)
16
+ - [Configuration](/gateway/configuration)
17
+ - [Configuration examples](/gateway/configuration-examples)
18
+ - [Slash commands](/tools/slash-commands)
19
+ - [Multi-agent routing](/concepts/multi-agent)
20
+ - [Updating and rollback](/install/updating)
21
+ - [Pairing (DM and nodes)](/start/pairing)
22
+ - [Nix mode](/install/nix)
23
+ - [Milaidy assistant setup](/start/milaidy)
24
+ - [Skills](/tools/skills)
25
+ - [Skills config](/tools/skills-config)
26
+ - [Workspace templates](/reference/templates/AGENTS)
27
+ - [RPC adapters](/reference/rpc)
28
+ - [Gateway runbook](/gateway)
29
+ - [Nodes (iOS and Android)](/nodes)
30
+ - [Web surfaces (Control UI)](/web)
31
+ - [Discovery and transports](/gateway/discovery)
32
+ - [Remote access](/gateway/remote)
33
+
34
+ ## Providers and UX
35
+
36
+ - [WebChat](/web/webchat)
37
+ - [Control UI (browser)](/web/control-ui)
38
+ - [Telegram](/channels/telegram)
39
+ - [Discord](/channels/discord)
40
+ - [Mattermost (plugin)](/channels/mattermost)
41
+ - [BlueBubbles (iMessage)](/channels/bluebubbles)
42
+ - [iMessage (legacy)](/channels/imessage)
43
+ - [Groups](/concepts/groups)
44
+ - [WhatsApp group messages](/concepts/group-messages)
45
+ - [Media images](/nodes/images)
46
+ - [Media audio](/nodes/audio)
47
+
48
+ ## Companion apps
49
+
50
+ - [macOS app](/platforms/macos)
51
+ - [iOS app](/platforms/ios)
52
+ - [Android app](/platforms/android)
53
+ - [Windows (WSL2)](/platforms/windows)
54
+ - [Linux app](/platforms/linux)
55
+
56
+ ## Operations and safety
57
+
58
+ - [Sessions](/concepts/session)
59
+ - [Cron jobs](/automation/cron-jobs)
60
+ - [Webhooks](/automation/webhook)
61
+ - [Gmail hooks (Pub/Sub)](/automation/gmail-pubsub)
62
+ - [Security](/gateway/security)
63
+ - [Troubleshooting](/gateway/troubleshooting)
@@ -0,0 +1,212 @@
1
+ ---
2
+ summary: "Beginner guide: from zero to first message (wizard, auth, channels, pairing)"
3
+ read_when:
4
+ - First time setup from zero
5
+ - You want the fastest path from install → onboarding → first message
6
+ title: "Getting Started"
7
+ ---
8
+
9
+ # Getting Started
10
+
11
+ Goal: go from **zero** → **first working chat** (with sane defaults) as quickly as possible.
12
+
13
+ Fastest chat: open the Control UI (no channel setup needed). Run `milaidy dashboard`
14
+ and chat in the browser, or open `http://127.0.0.1:18789/` on the gateway host.
15
+ Docs: [Dashboard](/web/dashboard) and [Control UI](/web/control-ui).
16
+
17
+ Recommended path: use the **CLI onboarding wizard** (`milaidy onboard`). It sets up:
18
+
19
+ - model/auth (OAuth recommended)
20
+ - gateway settings
21
+ - channels (WhatsApp/Telegram/Discord/Mattermost (plugin)/...)
22
+ - pairing defaults (secure DMs)
23
+ - workspace bootstrap + skills
24
+ - optional background service
25
+
26
+ If you want the deeper reference pages, jump to: [Wizard](/start/wizard), [Setup](/start/setup), [Pairing](/start/pairing), [Security](/gateway/security).
27
+
28
+ Sandboxing note: `agents.defaults.sandbox.mode: "non-main"` uses `session.mainKey` (default `"main"`),
29
+ so group/channel sessions are sandboxed. If you want the main agent to always
30
+ run on host, set an explicit per-agent override in `agents.list`:
31
+
32
+ ```json
33
+ {
34
+ "agents": {
35
+ "defaults": {
36
+ "sandbox": { "mode": "non-main" }
37
+ },
38
+ "list": [
39
+ {
40
+ "id": "main",
41
+ "workspace": "~/.milaidy/workspace",
42
+ "sandbox": { "mode": "off" }
43
+ }
44
+ ]
45
+ }
46
+ }
47
+ ```
48
+
49
+ ## 0) Prereqs
50
+
51
+ - Node `>=22`
52
+ - `pnpm` (optional; recommended if you build from source)
53
+ - **Recommended:** Brave Search API key for web search. Easiest path:
54
+ `milaidy configure --section web` (stores `tools.web.search.apiKey`).
55
+ See [Web tools](/tools/web).
56
+
57
+ macOS: if you plan to build the apps, install Xcode / CLT. For the CLI + gateway only, Node is enough.
58
+ Windows: use **WSL2** (Ubuntu recommended). WSL2 is strongly recommended; native Windows is untested, more problematic, and has poorer tool compatibility. Install WSL2 first, then run the Linux steps inside WSL. See [Windows (WSL2)](/platforms/windows).
59
+
60
+ ## 1) Install the CLI (recommended)
61
+
62
+ ```bash
63
+ curl -fsSL https://milaidy.ai/install.sh | bash
64
+ ```
65
+
66
+ Installer options (install method, non-interactive, from GitHub): [Install](/install).
67
+
68
+ Windows (PowerShell):
69
+
70
+ ```powershell
71
+ iwr -useb https://milaidy.ai/install.ps1 | iex
72
+ ```
73
+
74
+ Alternative (global install):
75
+
76
+ ```bash
77
+ npm install -g milaidy@latest
78
+ ```
79
+
80
+ ```bash
81
+ pnpm add -g milaidy@latest
82
+ ```
83
+
84
+ ## 2) Run the onboarding wizard (and install the service)
85
+
86
+ ```bash
87
+ milaidy onboard --install-daemon
88
+ ```
89
+
90
+ What you’ll choose:
91
+
92
+ - **Local vs Remote** gateway
93
+ - **Auth**: Anthropic API key (recommended), OpenAI Codex OAuth, or other provider API keys. `claude setup-token` is also supported for Anthropic.
94
+ - **Providers**: WhatsApp QR login, Telegram/Discord bot tokens, Mattermost plugin tokens, etc.
95
+ - **Daemon**: background install (launchd/systemd; WSL2 uses systemd)
96
+ - **Runtime**: Node (recommended; required for WhatsApp/Telegram). Bun is **not recommended**.
97
+ - **Gateway token**: the wizard generates one by default (even on loopback) and stores it in `gateway.auth.token`.
98
+
99
+ Wizard doc: [Wizard](/start/wizard)
100
+
101
+ ### Auth: where it lives (important)
102
+
103
+ - **Recommended Anthropic path:** set an API key (wizard can store it for service use). `claude setup-token` is also supported if you want to reuse Claude Code credentials.
104
+
105
+ - OAuth credentials (legacy import): `~/.milaidy/credentials/oauth.json`
106
+ - Auth profiles (OAuth + API keys): `~/.milaidy/agents/<agentId>/agent/auth-profiles.json`
107
+
108
+ Headless/server tip: do OAuth on a normal machine first, then copy `oauth.json` to the gateway host.
109
+
110
+ ## 3) Start the Gateway
111
+
112
+ If you installed the service during onboarding, the Gateway should already be running:
113
+
114
+ ```bash
115
+ milaidy gateway status
116
+ ```
117
+
118
+ Manual run (foreground):
119
+
120
+ ```bash
121
+ milaidy gateway --port 18789 --verbose
122
+ ```
123
+
124
+ Dashboard (local loopback): `http://127.0.0.1:18789/`
125
+ If a token is configured, paste it into the Control UI settings (stored as `connect.params.auth.token`).
126
+
127
+ ⚠️ **Bun warning (WhatsApp + Telegram):** Bun has known issues with these
128
+ channels. If you use WhatsApp or Telegram, run the Gateway with **Node**.
129
+
130
+ ## 3.5) Quick verify (2 min)
131
+
132
+ ```bash
133
+ milaidy status
134
+ milaidy health
135
+ milaidy security audit --deep
136
+ ```
137
+
138
+ ## 4) Pair + connect your first chat surface
139
+
140
+ ### WhatsApp (QR login)
141
+
142
+ ```bash
143
+ milaidy channels login
144
+ ```
145
+
146
+ Scan via WhatsApp → Settings → Linked Devices.
147
+
148
+ WhatsApp doc: [WhatsApp](/channels/whatsapp)
149
+
150
+ ### Telegram / Discord / others
151
+
152
+ The wizard can write tokens/config for you. If you prefer manual config, start with:
153
+
154
+ - Telegram: [Telegram](/channels/telegram)
155
+ - Discord: [Discord](/channels/discord)
156
+ - Mattermost (plugin): [Mattermost](/channels/mattermost)
157
+
158
+ **Telegram DM tip:** your first DM returns a pairing code. Approve it (see next step) or the bot won’t respond.
159
+
160
+ ## 5) DM safety (pairing approvals)
161
+
162
+ Default posture: unknown DMs get a short code and messages are not processed until approved.
163
+ If your first DM gets no reply, approve the pairing:
164
+
165
+ ```bash
166
+ milaidy pairing list whatsapp
167
+ milaidy pairing approve whatsapp <code>
168
+ ```
169
+
170
+ Pairing doc: [Pairing](/start/pairing)
171
+
172
+ ## From source (development)
173
+
174
+ If you’re hacking on Milaidy itself, run from source:
175
+
176
+ ```bash
177
+ git clone https://github.com/milaidy/milaidy.git
178
+ cd milaidy
179
+ pnpm install
180
+ pnpm ui:build # auto-installs UI deps on first run
181
+ pnpm build
182
+ milaidy onboard --install-daemon
183
+ ```
184
+
185
+ If you don’t have a global install yet, run the onboarding step via `pnpm milaidy ...` from the repo.
186
+ `pnpm build` also bundles UI assets; if you need to build just the UI, use `pnpm ui:build`.
187
+
188
+ Gateway (from this repo):
189
+
190
+ ```bash
191
+ node milaidy.mjs gateway --port 18789 --verbose
192
+ ```
193
+
194
+ ## 6) Verify end-to-end
195
+
196
+ In a new terminal, send a test message:
197
+
198
+ ```bash
199
+ milaidy message send --target +15555550123 --message "Hello from Milaidy"
200
+ ```
201
+
202
+ If `milaidy health` shows “no auth configured”, go back to the wizard and set OAuth/key auth — the agent won’t be able to respond without it.
203
+
204
+ Tip: `milaidy status --all` is the best pasteable, read-only debug report.
205
+ Health probes: `milaidy health` (or `milaidy status --deep`) asks the running gateway for a health snapshot.
206
+
207
+ ## Next steps (optional, but great)
208
+
209
+ - macOS menu bar app + voice wake: [macOS app](/platforms/macos)
210
+ - iOS/Android nodes (Canvas/camera/voice): [Nodes](/nodes)
211
+ - Remote access (SSH tunnel / Tailscale Serve): [Remote access](/gateway/remote) and [Tailscale](/gateway/tailscale)
212
+ - Always-on / VPN setups: [Remote access](/gateway/remote), [exe.dev](/platforms/exe-dev), [Hetzner](/platforms/hetzner), [macOS remote](/platforms/mac/remote)
@@ -0,0 +1,247 @@
1
+ ---
2
+ summary: "End-to-end guide for running Milaidy as a personal assistant with safety cautions"
3
+ read_when:
4
+ - Onboarding a new assistant instance
5
+ - Reviewing safety/permission implications
6
+ title: "Personal Assistant Setup"
7
+ ---
8
+
9
+ # Building a personal assistant with Milaidy
10
+
11
+ Milaidy is a WhatsApp + Telegram + Discord + iMessage gateway for **ElizaOS** agents. Plugins add Mattermost, Slack, Signal, and more. This guide is the "personal assistant" setup: one dedicated WhatsApp number that behaves like your always-on agent.
12
+
13
+ ## ⚠️ Safety first
14
+
15
+ You’re putting an agent in a position to:
16
+
17
+ - run commands on your machine (depending on your tool setup)
18
+ - read/write files in your workspace
19
+ - send messages back out via WhatsApp/Telegram/Discord/Mattermost (plugin)
20
+
21
+ Start conservative:
22
+
23
+ - Always set `channels.whatsapp.allowFrom` (never run open-to-the-world on your personal Mac).
24
+ - Use a dedicated WhatsApp number for the assistant.
25
+ - Heartbeats now default to every 30 minutes. Disable until you trust the setup by setting `agents.defaults.heartbeat.every: "0m"`.
26
+
27
+ ## Prerequisites
28
+
29
+ - Node **22+**
30
+ - Milaidy available on PATH (recommended: global install)
31
+ - A second phone number (SIM/eSIM/prepaid) for the assistant
32
+
33
+ ```bash
34
+ npm install -g milaidy@latest
35
+ # or: pnpm add -g milaidy@latest
36
+ ```
37
+
38
+ From source (development):
39
+
40
+ ```bash
41
+ git clone https://github.com/milaidy/milaidy.git
42
+ cd milaidy
43
+ pnpm install
44
+ pnpm ui:build # auto-installs UI deps on first run
45
+ pnpm build
46
+ pnpm link --global
47
+ ```
48
+
49
+ ## The two-phone setup (recommended)
50
+
51
+ You want this:
52
+
53
+ ```
54
+ Your Phone (personal) Second Phone (assistant)
55
+ ┌─────────────────┐ ┌─────────────────┐
56
+ │ Your WhatsApp │ ──────▶ │ Assistant WA │
57
+ │ +1-555-YOU │ message │ +1-555-ASSIST │
58
+ └─────────────────┘ └────────┬────────┘
59
+ │ linked via QR
60
+
61
+ ┌─────────────────┐
62
+ │ Your Mac │
63
+ │ (milaidy) │
64
+ │ ElizaOS agent │
65
+ └─────────────────┘
66
+ ```
67
+
68
+ If you link your personal WhatsApp to Milaidy, every message to you becomes “agent input”. That’s rarely what you want.
69
+
70
+ ## 5-minute quick start
71
+
72
+ 1. Pair WhatsApp Web (shows QR; scan with the assistant phone):
73
+
74
+ ```bash
75
+ milaidy channels login
76
+ ```
77
+
78
+ 2. Start the Gateway (leave it running):
79
+
80
+ ```bash
81
+ milaidy gateway --port 18789
82
+ ```
83
+
84
+ 3. Put a minimal config in `~/.milaidy/milaidy.json`:
85
+
86
+ ```json5
87
+ {
88
+ channels: { whatsapp: { allowFrom: ["+15555550123"] } },
89
+ }
90
+ ```
91
+
92
+ Now message the assistant number from your allowlisted phone.
93
+
94
+ When onboarding finishes, we auto-open the dashboard with your gateway token and print the tokenized link. To reopen later: `milaidy dashboard`.
95
+
96
+ ## Give the agent a workspace (AGENTS)
97
+
98
+ Milaidy reads operating instructions and “memory” from its workspace directory.
99
+
100
+ By default, Milaidy uses `~/.milaidy/workspace` as the agent workspace, and will create it (plus starter `AGENTS.md`, `TOOLS.md`, `IDENTITY.md`, `USER.md`, `HEARTBEAT.md`, `MEMORY.md`) automatically on setup/first agent run. `BOOTSTRAP.md` is only created when the workspace is brand new (it should not come back after you delete it).
101
+
102
+ Tip: treat this folder like Milaidy’s “memory” and make it a git repo (ideally private) so your `AGENTS.md` + memory files are backed up. If git is installed, brand-new workspaces are auto-initialized.
103
+
104
+ ```bash
105
+ milaidy setup
106
+ ```
107
+
108
+ Full workspace layout + backup guide: [Agent workspace](/concepts/agent-workspace)
109
+ Memory workflow: [Memory](/concepts/memory)
110
+
111
+ Optional: choose a different workspace with `agents.defaults.workspace` (supports `~`).
112
+
113
+ ```json5
114
+ {
115
+ agents: {
116
+ defaults: {
117
+ workspace: "~/.milaidy/workspace",
118
+ },
119
+ },
120
+ }
121
+ ```
122
+
123
+ If you already ship your own workspace files from a repo, you can disable bootstrap file creation entirely:
124
+
125
+ ```json5
126
+ {
127
+ agents: {
128
+ defaults: {
129
+ skipBootstrap: true,
130
+ },
131
+ },
132
+ }
133
+ ```
134
+
135
+ ## The config that turns it into “an assistant”
136
+
137
+ Milaidy defaults to a good assistant setup, but you’ll usually want to tune:
138
+
139
+ - persona/instructions in the Eliza character file (`character.json`)
140
+ - thinking defaults (if desired)
141
+ - heartbeats (once you trust it)
142
+
143
+ Example:
144
+
145
+ ```json5
146
+ {
147
+ logging: { level: "info" },
148
+ agents: {
149
+ defaults: {
150
+ model: { primary: "anthropic/claude-opus-4-5" },
151
+ workspace: "~/.milaidy/workspace",
152
+ thinkingDefault: "high",
153
+ timeoutSeconds: 1800,
154
+ // Start with 0; enable later.
155
+ heartbeat: { every: "0m" },
156
+ groupChat: {
157
+ mentionPatterns: ["@milaidy", "milaidy"],
158
+ },
159
+ },
160
+ },
161
+ channels: {
162
+ whatsapp: {
163
+ allowFrom: ["+15555550123"],
164
+ groups: {
165
+ "*": { requireMention: true },
166
+ },
167
+ },
168
+ },
169
+ session: {
170
+ scope: "per-sender",
171
+ resetTriggers: ["/new", "/reset"],
172
+ reset: {
173
+ mode: "daily",
174
+ atHour: 4,
175
+ idleMinutes: 10080,
176
+ },
177
+ },
178
+ }
179
+ ```
180
+
181
+ ## Sessions and memory
182
+
183
+ - Session files: `~/.milaidy/agents/<agentId>/sessions/{{SessionId}}.jsonl`
184
+ - Session metadata (token usage, last route, etc): `~/.milaidy/agents/<agentId>/sessions/sessions.json` (legacy: `~/.milaidy/sessions/sessions.json`)
185
+ - `/new` or `/reset` starts a fresh session for that chat (configurable via `resetTriggers`). If sent alone, the agent replies with a short hello to confirm the reset.
186
+ - `/compact [instructions]` compacts the session context and reports the remaining context budget.
187
+
188
+ ## Heartbeats (proactive mode)
189
+
190
+ By default, Milaidy runs a heartbeat every 30 minutes with the prompt:
191
+ `Read HEARTBEAT.md if it exists (workspace context). Follow it strictly. Do not infer or repeat old tasks from prior chats. If nothing needs attention, reply HEARTBEAT_OK.`
192
+ Set `agents.defaults.heartbeat.every: "0m"` to disable.
193
+
194
+ - If `HEARTBEAT.md` exists but is effectively empty (only blank lines and markdown headers like `# Heading`), Milaidy skips the heartbeat run to save API calls.
195
+ - If the file is missing, the heartbeat still runs and the model decides what to do.
196
+ - If the agent replies with `HEARTBEAT_OK` (optionally with short padding; see `agents.defaults.heartbeat.ackMaxChars`), Milaidy suppresses outbound delivery for that heartbeat.
197
+ - Heartbeats run full agent turns — shorter intervals burn more tokens.
198
+
199
+ ```json5
200
+ {
201
+ agents: {
202
+ defaults: {
203
+ heartbeat: { every: "30m" },
204
+ },
205
+ },
206
+ }
207
+ ```
208
+
209
+ ## Media in and out
210
+
211
+ Inbound attachments (images/audio/docs) can be surfaced to your command via templates:
212
+
213
+ - `{{MediaPath}}` (local temp file path)
214
+ - `{{MediaUrl}}` (pseudo-URL)
215
+ - `{{Transcript}}` (if audio transcription is enabled)
216
+
217
+ Outbound attachments from the agent: include `MEDIA:<path-or-url>` on its own line (no spaces). Example:
218
+
219
+ ```
220
+ Here’s the screenshot.
221
+ MEDIA:https://example.com/screenshot.png
222
+ ```
223
+
224
+ Milaidy extracts these and sends them as media alongside the text.
225
+
226
+ ## Operations checklist
227
+
228
+ ```bash
229
+ milaidy status # local status (creds, sessions, queued events)
230
+ milaidy status --all # full diagnosis (read-only, pasteable)
231
+ milaidy status --deep # adds gateway health probes (Telegram + Discord)
232
+ milaidy health --json # gateway health snapshot (WS)
233
+ ```
234
+
235
+ Logs live under `/tmp/milaidy/` (default: `milaidy-YYYY-MM-DD.log`).
236
+
237
+ ## Next steps
238
+
239
+ - WebChat: [WebChat](/web/webchat)
240
+ - Gateway ops: [Gateway runbook](/gateway)
241
+ - Cron + wakeups: [Cron jobs](/automation/cron-jobs)
242
+ - macOS menu bar companion: [Milaidy macOS app](/platforms/macos)
243
+ - iOS node app: [iOS app](/platforms/ios)
244
+ - Android node app: [Android app](/platforms/android)
245
+ - Windows status: [Windows (WSL2)](/platforms/windows)
246
+ - Linux status: [Linux app](/platforms/linux)
247
+ - Security: [Security](/gateway/security)