Guides
Running as a service
Install, check, restart and remove the Wheems service under launchd on macOS, read its log, and know when to restart it.
On this page
The service is what makes Wheems answer in Slack. It runs in the background, starts at every login and restarts if it stops. This page covers installing it, checking on it, its log, and when to restart it.
What the service does
Link to “What the service does”- Holds the Slack connection and receives your messages.
- Starts an engine session in Herdr core for each conversation, and posts the answers.
- Files notes into the knowledge base, and runs the nightly tidy.
- Keeps every workspace’s search index up to date.
- Answers the
wheemscommand that agents run (reply,note,kb search,skill propose) over a private socket.
Nothing answers in Slack while it’s stopped, or while your Mac is asleep.
Commands
Link to “Commands”wheems service install # run it under launchd, now and at every loginwheems service status # is it running?wheems service logs # the end of its log (-n for more lines)wheems service restart # after changing configwheems service uninstall # stop it and remove it from launchdwheems service run # run it in the foreground, as launchd doeswheems setup → Service does the same as install, or a restart when it’s already running.
Installing
Link to “Installing”wheems service installInstalling /Users/you/Library/LaunchAgents/dev.wheems.service.plistNode.js: /opt/homebrew/Cellar/node/22.23.4/bin/nodeWheems: /opt/homebrew/lib/node_modules/wheems/dist/cli/main.jsThe service is running.- It runs as the launchd user agent
dev.wheems.service, from~/Library/LaunchAgents/dev.wheems.service.plist. - It uses the Node.js and the copy of Wheems you installed it with. After moving to a new Node.js, run
wheems service installagain with it. - It starts at login, and launchd restarts it if it stops, at most once every 30 seconds.
- Installing again replaces the running copy.
- It needs a supported Node.js (22.16 or later in the 22 line, or 24 or later), and a built copy of Wheems: installing from
npm run wheems(the TypeScript source) is refused.
If it hasn’t answered after installing, it says so and exits with 1:
The service has not answered yet. Check its log: wheems service logsChecking on it
Link to “Checking on it”wheems service statuslaunchd: running (pid 41230)control socket: answeringlaunchd: says |
Meaning |
|---|---|
running (pid …) |
launchd has it running. |
loaded, not running (last exit …) |
It stopped, perhaps on a config error, and launchd will try again. Read the log. |
not installed |
Run wheems service install. |
control socket: answering means the service is up and connected to Slack: it opens the socket only after every channel has connected. status exits with 1 when the socket isn’t answering. wheems doctor checks the same, under Service.
The log
Link to “The log”wheems service logs # the last 50 lineswheems service logs -n 200 # moreThe log is ~/wheems/.wheems/logs/service.log. A healthy start looks like this:
2026-11-13T09:00:01.118Z Workspace personal: chat on slack (direct messages)2026-11-13T09:00:01.402Z Workspace acme: chat on slack C0123ABCD2026-11-13T09:00:02.007Z Connected slack2026-11-13T09:00:02.031Z Wheems 0.0.3 is running from /Users/you/wheemsTo follow it live:
tail -f ~/wheems/.wheems/logs/service.logWhen to restart
Link to “When to restart”The service reads its config when it starts. Restart it after changing any of these:
install.yaml, such asallowed_usersorknowledge.embeddings;- any
workspace.yamlor agent file, or creating a workspace; - the Slack tokens;
- inviting the bot to a workspace’s channel.
wheems validatewheems service restartValidRestarted.Run wheems validate first: the service refuses to start when the config has errors, and the log says why:
Error: The install has config problems; run wheems doctor: workspaces/acme/workspace.yaml: …It also refuses to start when Herdr core isn’t ready (Herdr core is not ready: …). Restarting doesn’t lose conversations: threads resume where they left off.
Running in the foreground
Link to “Running in the foreground”To watch everything as it happens, stop the background copy and run it in your terminal:
wheems service uninstallwheems service runPress Ctrl+C to stop it. Then wheems service install to put it back under launchd. Don’t run both at once: two copies connected to the same Slack app share its messages between them.
How agents reach the service
Link to “How agents reach the service”Wheems puts its own wheems command first on each agent session’s PATH: a small script in ~/wheems/.wheems/bin/ pinned to the same Node.js and copy of Wheems as the service. It talks to the service over a Unix socket, ~/wheems/.wheems/wheems.sock, that only you can open. Each session also gets WHEEMS_CONVERSATION and WHEEMS_WORKSPACE, so its commands know which conversation and workspace they belong to.
Uninstalling
Link to “Uninstalling”wheems service uninstallThe service is stopped and removed.It removes the launchd agent and its plist. Your install folder, knowledge bases and tokens stay.
Linux
Link to “Linux”Until then, on Linux you can run wheems service run yourself in a terminal that stays alive, such as one in Herdr core. This isn’t supported.
One install per Mac user
Link to “One install per Mac user”The launchd agent has one fixed name, dev.wheems.service, so one install per Mac user can run as a service. --home and WHEEMS_HOME choose which install it serves.