Install and run the Hermes self-improving AI agent on DGX Spark.
Before installing Hermes, confirm that your DGX Spark is running DGX OS, has network access, and exposes the basic command-line tools used during install.
uname -a
curl --version
git --version
What to look for: DGX Spark ships with DGX OS, which is a specialized Ubuntu-based Linux image. The uname -a line will not always contain the literal string “DGX OS”. A healthy Spark typically shows Linux, Ubuntu, and nvidia (kernel or platform identifiers) in that output. Confirm that curl --version and git --version print version lines without errors.
The Hermes Telegram gateway talks to Telegram’s cloud API over HTTPS. On some corporate or lab networks, outbound HTTPS to api.telegram.org is blocked, which produces a working local install but a bot that never responds. Before you invest time in gateway setup, run this quick check from the same network you will use for the Spark:
curl -sS --connect-timeout 10 -o /dev/null -w "HTTP %{http_code}\n" https://api.telegram.org/
You should see an HTTP status line such as HTTP 404, HTTP 200, or HTTP 302 (Telegram’s edge often answers bare GET requests with a short JSON or redirect). The important part is that the request completes over TLS without hanging. Timeouts, “Could not resolve host”, or connection refused mean the gateway will not reach Telegram from this network—try a path that allows that traffic (for example a personal hotspot) or ask your network administrator to allow HTTPS to api.telegram.org.
Hermes will be configured against a local Ollama endpoint, so Ollama must be installed and serving at least one model before you run the Hermes installer. If you have already completed the Ollama on Spark playbook, you can skip this step.
Install Ollama:
curl -fsSL https://ollama.com/install.sh | sh
NOTE
During install.sh you might see a message that systemd is not running or that a service could not be enabled. On a normal DGX Spark appliance with systemd this is uncommon. If you are on a minimal container, chroot, or unusual environment, Ollama may still run via the ollama CLI once the binary is installed; on a standard Spark, prefer fixing the service (systemctl status ollama) if the installer warns. If Ollama otherwise starts and answers on port 11434, you can treat a one-off installer warning as informational.
Verify the Ollama daemon is running and the HTTP API on 11434 responds. The command below asks Ollama for the list of pulled models (GET /api/tags). A healthy daemon returns JSON with a top-level "models" array (it may be empty until you pull a model):
curl -sS http://localhost:11434/api/tags
Optional: confirm the daemon build string:
curl -sS http://localhost:11434/api/version
Pull the model you intend to use with Hermes (this playbook uses qwen3.6:27b as the example):
ollama pull qwen3.6:27b
Run the installer from an interactive terminal on the Spark. If you are connected over SSH, use a normal SSH session where you can answer prompts and enter your sudo password when requested. If you run the installer from a non-interactive automation shell, Hermes can install but the setup wizard and optional system-package prompts may be skipped; use the Non-interactive SSH fallback below in that case.
curl -fsSL https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.sh | bash
The installer will walk you through an interactive setup. Respond to each prompt in the order they appear:
IMPORTANT
OpenClaw on the same machine (out of scope for this playbook): If another tool such as OpenClaw was installed previously, the Hermes installer may ask whether you want to import or migrate from it. For the steps in this playbook, answer n (no) so Hermes does not pull in OpenClaw configuration. Mixing migrations can leave Telegram or gateway state inconsistent; if you already migrated by mistake, prefer a clean reinstall (see Start over from scratch in the Troubleshooting tab) before continuing.
"Install ripgrep for faster file search ffmpeg for TTS voice messages? [Y/n]" — Press Enter to accept the default and install both helpers. If sudo asks for your password, enter your Linux user password. If you skip this step or run without a terminal, Hermes still works, but file search falls back to slower tools and TTS voice-message support is limited. You can install the helpers later with sudo apt install -y ripgrep ffmpeg.
"How would you like to set up Hermes?" — Choose Quick setup to proceed with the recommended defaults.
"Select Provider" — Choose Custom endpoint (enter URL manually) so Hermes can be pointed at the model endpoint running on your DGX Spark.
"API base URL [e.g. https://api.example.com/v1]:" — If this prompt appears, enter the URL of your local model server. For a local Ollama endpoint, use http://localhost:11434/v1. (Depending on installer version or prior config, this question is sometimes skipped when the endpoint is already inferred—continue with the prompts you do see.)
"API key [optional]" — Leave blank and press Enter; no key is required for a local model.
Model selection — The installer lists the models available from your local Ollama instance. Select one to use with Hermes (for example, qwen3.6:27b).
"Context length in tokens [leave blank for auto-detect]:" — Press Enter to let Hermes auto-detect the context length from the selected model.
"Display name [Local (localhost:11434)]" — Press Enter to accept the suggested label, or type a custom name to identify this endpoint in the Hermes UI.
"Connect a messaging platform? (Telegram, Discord, etc.)" — Choose Set up messaging now (recommended) to configure a gateway during installation.
"Select platforms to configure:" — Choose Telegram. The remaining steps in this playbook use Telegram as the example; the same flow applies to the other supported gateways.
TIP
If Telegram questions are skipped: Some users see “Setup complete” or “Messaging Platforms (Gateway) configuration complete!” immediately after choosing Telegram, without token or user-ID prompts. That usually means the installer thinks Telegram is already configured, or a prior partial state exists. Exit any TUI, reload your shell (source ~/.bashrc), then run hermes gateway setup and select Telegram there to supply the bot token and allowed user IDs. (If the CLI suggests hermes setup gateway but that flow still skips prompts, use hermes gateway setup—that is the command most users report as working for a full Telegram reconfiguration.) Follow the printed sudo lines to register the gateway service (see Sudo and hermes PATH below).
"Telegram bot token:" — Open Telegram and start a chat with @BotFather, follow its guided flow to create a new bot, then paste the token BotFather returns into this prompt. Tip: Installing Telegram Desktop on the same machine as your SSH session lets you copy the token from Telegram and paste into the terminal without retyping it from your phone. The terminal will not echo any characters as the token is pasted — this is expected. Press Enter to submit; the installer should respond with Telegram token saved.
"Allowed user IDs (comma-separated, leave empty for open access):" — To restrict the bot to specific Telegram accounts, follow the on-screen instructions to look up your numeric Telegram user ID, then enter one or more IDs separated by commas. Leaving this field blank allows anyone who can reach the bot to use it, which is generally not recommended.
"Use your user ID (<your-id>) as the home channel? [Y/n]:" — Press Enter to accept. This designates your own Telegram account as the default channel Hermes will use for proactive messages and scheduled deliveries.
"Install the gateway as a systemd service? (runs in background, starts on boot) [Y/n]:" — Press Enter to accept. The gateway will run as a background service.
"Choose how the gateway should run in the background:" — Choose System service if you want Hermes to start at boot without requiring an interactive login. The service will still run under your user account so it can read your Hermes configuration; only installation requires sudo. If you install the gateway after setup instead of through the wizard, use the system-service form shown in Sudo and hermes PATH below.
"Launch hermes chat now? [Y/n]:" — Press Enter to launch the Hermes TUI immediately and verify the installation end-to-end. Once the TUI is open, type hello and press Enter; the agent should respond, confirming that the model endpoint and Hermes are wired up correctly. When you're done, type /exit to leave the chat and return to your shell. On exit, Hermes prints the exact command needed to resume this conversation later — hermes --resume <sessionId>. Save it if you want to pick up where you left off.
"Would you like to install the gateway as a background service? [Y/n]:" — Press Enter to accept. This finalizes the gateway as a background service so it stays available for messaging-platform traffic outside of an interactive Hermes session.
Reload your shell to make the hermes command available, then verify the command resolves:
source ~/.bashrc
export PATH="$HOME/.local/bin:$PATH"
which hermes
If the installer prints "Setup wizard skipped (no terminal available)", or if you are validating the playbook through non-interactive SSH, configure the local Ollama endpoint with Hermes' config command:
export PATH="$HOME/.local/bin:$PATH"
hermes config set model.provider custom
hermes config set model.base_url http://localhost:11434/v1
hermes config set model.default qwen3.6:27b
hermes -z "Reply exactly HERMES_OK"
The last command should return HERMES_OK, confirming that Hermes can call the local Ollama model without opening the TUI.
hermes PATHsudo runs with a minimal environment and often does not inherit your user PATH, so sudo hermes … can fail with hermes: command not found even though hermes works without sudo. Use the real binary path, for example:
export PATH="$HOME/.local/bin:$PATH"
HERMES_BIN="$(command -v hermes || printf '%s\n' "$HOME/.local/bin/hermes")"
sudo "$HERMES_BIN" uninstall
Or paste the absolute path printed by which hermes in place of hermes in any sudo command the installer prints. For a boot-time Linux system service, the current Hermes CLI supports:
sudo "$HERMES_BIN" gateway install --system --run-as-user "$USER"
After configuration, confirm the gateway unit is active and recent logs look healthy (replace <hermes-gateway-unit> with the exact *.service name the installer printed—often something containing hermes and gateway):
systemctl list-units --type=service --all | grep -i hermes
systemctl --user list-units --type=service --all | grep -i hermes
sudo systemctl status <hermes-gateway-unit>
sudo journalctl -u <hermes-gateway-unit> -e --no-pager -n 50
If systemctl status or systemctl --user status shows active (running) and logs are not repeating connection errors to Telegram, the service side is in good shape. If logs show TLS timeouts or “connection refused” to Telegram hosts, re-run the outbound HTTPS check at the top of this page.
You configured an initial model during the Hermes install. To switch to a different one later, pull the new model with Ollama and then re-point Hermes at the same local endpoint.
Pull the new model with Ollama (replace <model-name> with the model you want):
ollama pull <model-name>
Launch the Hermes model picker:
hermes model
At the "Select Provider" prompt, choose Custom endpoint (enter URL manually).
If you see the “API base URL” prompt, enter the same local Ollama endpoint as before:
http://localhost:11434/v1
When the installer lists the models served by Ollama, choose the one you just pulled. Hermes will use it for subsequent sessions.
If you are in a non-interactive SSH session, switch models with config commands instead:
hermes config set model.provider custom
hermes config set model.base_url http://localhost:11434/v1
hermes config set model.default <model-name>
hermes -z "Reply exactly MODEL_OK"
To pick up a past conversation, launch Hermes with the --resume flag and the session ID printed when you exited that chat:
hermes --resume <sessionId>
The TUI will reopen with the prior conversation history restored, ready for follow-up prompts.
The Telegram gateway you configured during install is already running as a background service, so you can reach Hermes from any Telegram client without a terminal session.
Open Telegram (mobile or desktop) and search for your bot by the username you assigned through @BotFather.
Open the chat with the bot and tap Start (or send /start) on first contact.
Send the message hello. Hermes will reply through the bot, confirming the gateway is wired to your DGX Spark and the underlying model.
NOTE
After /start, Telegram may show a generic “Unknown command”-style message from the bot. That can be normal for bots that only implement free-form chat. Ignore that message and send hello anyway—Hermes should respond to normal text once the gateway and model are healthy.
From here you can send any prompt you would normally type in the TUI — Hermes will run on your DGX Spark and stream the response back to Telegram.
To upgrade an existing Hermes installation to the latest release, run:
hermes update
The command pulls the latest Hermes version, applies any required dependency changes, and restarts the gateway service so the new version takes effect.
WARNING
This removes the Hermes installation and the gateway service. By default, ~/.hermes/ (configuration, conversation history, and skills) is preserved unless you opt into a full uninstall at the on-screen prompt.
Run cleanup from an interactive terminal. The uninstaller may refuse non-interactive subprocesses and still asks you to choose whether to keep data or perform a full uninstall. For a full wipe, choose Full uninstall and type yes at the confirmation prompt.
Because the gateway was installed as a System service in Step 15, run the uninstall with sudo so it has permission to remove the system-scope systemd unit. If sudo hermes uninstall fails with command not found, use the same full-path pattern as in Sudo and hermes PATH above:
export PATH="$HOME/.local/bin:$PATH"
HERMES_BIN="$(command -v hermes || printf '%s\n' "$HOME/.local/bin/hermes")"
sudo "$HERMES_BIN" uninstall
Follow the on-screen prompts to confirm removal. The uninstaller typically:
hermes wrapper script and the PATH entries added to your shell profile.Data directory: The ~/.hermes directory (configuration, sessions, skills) is not always removed by uninstall, depending on the options you choose at prompts. After uninstall, check whether it still exists:
ls -la ~/.hermes
If you intend a full removal, delete it manually (this is irreversible):
rm -rf ~/.hermes
/reasoning show to surface the model's intermediate reasoning alongside its responses. This is especially useful for following the agent's progress on multi-step or complex problems and for debugging unexpected answers.