Skip to content

The agent that grows with you

docs(desktop): first local use installs a persistent per-profile gateway

teknium1200e33b1fc0f
diff --git a/website/docs/user-guide/desktop.md b/website/docs/user-guide/desktop.md
index 2e37a1f2736..1cabeb2b9b1 100644
--- a/website/docs/user-guide/desktop.md
+++ b/website/docs/user-guide/desktop.md
@@ -341,7 +341,7 @@ A missing entry is still created; the flag only stops `hermes desktop` from rewr
## How it works
-The packaged app ships the Electron shell and a native React chat surface. On first launch it can install the Hermes Agent runtime into `HERMES_HOME` (`~/.hermes`, or `%LOCALAPPDATA%\hermes` on Windows) — **the same layout a CLI install uses**, which is why the two are interchangeable. Backend resolution first honours `HERMES_DESKTOP_HERMES_ROOT`, then a completed managed install, then a probed `hermes` on `PATH` (unless `--ignore-existing` / `HERMES_DESKTOP_IGNORE_EXISTING=1` is set), and finally an explicit `HERMES_DESKTOP_HERMES` command override for packagers such as Nix. The React renderer talks to a headless backend the app launches for you — a `hermes serve` process that serves the `tui_gateway` JSON-RPC/WebSocket API — and reuses the agent runtime rather than embedding `hermes --tui`. The desktop app is **self-contained**: it runs its own `hermes serve` backend and never opens or requires the [web dashboard](./features/web-dashboard.md). (Runtimes older than the `serve` command fall back to a headless `dashboard --no-open` automatically, so an app update never outruns its backend.) Install, backend-resolution, and self-update logic live in the Electron main process.
+The packaged app ships the Electron shell and a native React chat surface. On first launch it can install the Hermes Agent runtime into `HERMES_HOME` (`~/.hermes`, or `%LOCALAPPDATA%\hermes` on Windows) — **the same layout a CLI install uses**, which is why the two are interchangeable. Backend resolution first honours `HERMES_DESKTOP_HERMES_ROOT`, then a completed managed install, then a probed `hermes` on `PATH` (unless `--ignore-existing` / `HERMES_DESKTOP_IGNORE_EXISTING=1` is set), and finally an explicit `HERMES_DESKTOP_HERMES` command override for packagers such as Nix. The React renderer talks to the profile's **gateway**: on first use of a local profile the app runs `hermes gateway ensure`, which attaches to that profile's running gateway or, when there is none, installs and starts a persistent per-profile gateway (a systemd/launchd service where one exists, otherwise a detached daemon) — the same process `hermes chat`, the TUI and messaging channels use. That gateway is not tied to the app's lifetime: it keeps running after you quit and has no idle shutdown; stop it with `hermes gateway stop` (or the gateway controls in Settings). The desktop app is **self-contained**: it needs no separate `hermes serve` process and never opens or requires the [web dashboard](./features/web-dashboard.md). Install, backend-resolution, and self-update logic live in the Electron main process.
## Connecting to a remote backend
diff --git a/website/docs/user-guide/multi-connection-desktop.md b/website/docs/user-guide/multi-connection-desktop.md
index 3cdff0dbf7d..3374949a4c2 100644
--- a/website/docs/user-guide/multi-connection-desktop.md
+++ b/website/docs/user-guide/multi-connection-desktop.md
@@ -179,8 +179,13 @@ The union roster is what multi-gateway surfaces (and the built-in
Each `(connection, profile)` pair gets its own socket, and Desktop caches the
gateway descriptor it dialed so the next open joins the same connection —
-background agents keep streaming while you look at another gateway. Nothing is
-spawned or reaped on your behalf: each gateway owns its own lifetime.
+background agents keep streaming while you look at another gateway. Desktop
+never spawns or reaps a *remote* gateway; each one owns its own lifetime. For a
+**local** profile, the first open runs `hermes gateway ensure`, which attaches
+to that profile's running gateway or, when there is none, installs and starts a
+persistent per-profile gateway (a systemd/launchd service where one exists,
+otherwise a detached daemon). That gateway keeps running after you close the
+app — it has no idle shutdown — until you stop it with `hermes gateway stop`.
Approval buttons route back to the session's owning backend, not whichever
profile is currently selected. For a local secondary profile, Desktop can use