Home›Developer Center›Hermes Agent Linux

Hermes Agent Linux

API DocumentationOpenAI ChatGPT APIAnthropic (Claude) APIGoogle Gemini APIGoogle Search APIGoogle News APIOpenRouter APIAPI Pricing
CLI & Agent Guidescc-switch macOScc-switch Windowscc-switch LinuxOpenCode macOSOpenCode WindowsOpenCode LinuxOpenClaw macOSOpenClaw WindowsOpenClaw LinuxHermes Agent macOSHermes Agent WindowsHermes Agent LinuxClaude Code CLI macOSClaude Code CLI WindowsClaude Code CLI LinuxCodex CLI macOSCodex CLI WindowsCodex CLI Linux
MYAI168 API & MCPMYAI168 MCP CLIMYAI168 MCP Web & App
No matching questions on this page.Search the whole site
Installation Overview (Linux)

Hermes Agent Installation and MYAI168 Setup Guide — Linux

Goal of this guide: install Hermes Agent (a local AI agent from Nous Research) on a Linux desktop (Ubuntu / Debian as the example) and connect it to your own MYAI168 API, using Claude Opus 4.8.

On Linux, Hermes is installed with the official one-line script (it automatically installs uv, Python, etc.). The setup is almost identical to macOS (the config files live in ~/.hermes/ as well); the only difference is that your shell config file may be ~/.bashrc (bash) or ~/.zshrc (zsh).

Endpoints and Model

Anthropic native endpoint    https://www.myai168.com/en/api/anthropic   (without /v1)
OpenAI-compatible endpoint   https://www.myai168.com/en/api/openai/v1
Main model                   claude-opus-4-8 (via the Anthropic endpoint)

Important Security Notes

  • Hermes is an agent with real system permissions: it can read and write files, run commands, and control the browser. Do not install it on a primary machine holding lots of sensitive data; early token usage can be high, so set a usage cap in the MYAI168 dashboard.
  • Treat your API key like a password and never share it. If it leaks, revoke it in the MYAI168 dashboard and issue a new one.

Config File Locations (Linux)

  • Config: ~/.hermes/config.yaml
  • Keys: ~/.hermes/.env
0. Check Your Shell First (decides which config file to use)

First check which login shell you are using:

echo $SHELL
  • Ends with /bash → use ~/.bashrc
  • Ends with /zsh → use ~/.zshrc

Wherever this guide says "shell config file" below, substitute yours.

1. Install Hermes

Run the official one-line install script:

curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash

If the installer needs system packages (ripgrep / ffmpeg / build tools), agree to install them (they are installed via apt with sudo, which may ask for your password).

⚠ Same as macOS / Windows: if a Nous Portal login pops up during installation (a browser opens and the terminal shows a portal link with a user_code) — that is Nous's own subscription service, not MYAI168. Press Ctrl + C to skip, close the browser, and do not log in.

Make the command available (substitute your shell config file), then check the version:

source ~/.bashrc       # or: source ~/.zshrc
hermes --version

If hermes is not found: make sure ~/.local/bin is on your PATH. You can add:

echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
2. Connect to MYAI168 (manual setup)

Step 1: write the keys into .env (replace with your real key):

echo 'MYAI168_CLAUDE_API_KEY=your-key' >> ~/.hermes/.env
echo 'MYAI168_API_KEY=your-key' >> ~/.hermes/.env

Step 2: write config.yaml. On a fresh install (config.yaml has none of your personal settings yet), writing it in one go with a heredoc is the least error-prone way (paste the whole block, press Enter; the heredoc takes care of the formatting, so you never have to worry about indentation):

cat > ~/.hermes/config.yaml << 'EOF'
model:
  provider: custom:myai168_claude
  default: claude-opus-4-8
  context_length: 200000

custom_providers:
  - name: myai168_claude
    base_url: https://www.myai168.com/en/api/anthropic
    key_env: MYAI168_CLAUDE_API_KEY
    api_mode: anthropic_messages
  - name: myai168
    base_url: https://www.myai168.com/en/api/openai/v1
    key_env: MYAI168_API_KEY
    api_mode: chat_completions

providers: {}
EOF

Note: this overwrites the entire config.yaml — if the file already contains your custom model / toolsets / terminal / TTS / compression settings, they will be wiped and reset to defaults. If you have custom settings to keep, do NOT overwrite wholesale; use the editing approach in the next paragraph and change only the relevant blocks. The base_url must end with .../anthropic (without /v1).

(To keep the existing file and only change the model settings, edit it with hermes config edit — touch only the model: / custom_providers: / providers: blocks, leave the other blocks untouched, and make sure those three top-level keys are flush-left with no leading spaces.)

3. Verify and Launch (Linux)

Check the settings and start:

hermes doctor
hermes

(If doctor only reminds you to "Run hermes setup to configure missing API keys for full tool access", that refers to tools without keys and has nothing to do with the model — ignore it, and do NOT rerun hermes setup, or it may overwrite your settings.)

Once inside the interactive UI, just type and send. If the status bar at the bottom shows claude-opus-4-8, you are done. (If "Auxiliary title generation failed: HTTP 404" appears, that is a minor auxiliary-model feature failing; it does not affect the main conversation and can be ignored.)

4. Quick Troubleshooting
  • hermes command not found → run source ~/.bashrc (or source ~/.zshrc) or reopen the terminal; if still not found, make sure ~/.local/bin is on your PATH (see "1. Install Hermes"). (On Windows: open a new PowerShell window so PATH takes effect.)
  • Interactive chat reports unrecognized arguments (Chinese input) → the Chinese IME turned the quotes into full-width ones. Just type hermes to enter the interactive UI and type inside it.
  • Cannot paste into nano → write the file directly with commands (echo / cat >) — see "2. Connect to MYAI168".
  • Replies fail with 404 / not found → change the base_url of myai168_claude from .../anthropic to .../anthropic/v1 and try again.
  • Replies fail with 401 / unauthorized → MYAI168_CLAUDE_API_KEY in .env is missing or wrong.
  • No inference provider configured (even though you configured it) → the model block in config.yaml is still the default values and was not changed to custom:myai168_claude.
  • Auxiliary title generation failed: HTTP 404 → a minor auxiliary-model feature failing; it does not affect the main conversation and can be ignored.
  • Switch models → use /model inside a conversation; to add a provider, exit the session and run hermes model.
5. Maintenance

Update to the latest version:

hermes update

Rotate the API Key (after a leak, or periodically)

  1. Revoke the old key in the MYAI168 dashboard and issue a new one.
  2. Update MYAI168_CLAUDE_API_KEY / MYAI168_API_KEY in ~/.hermes/.env (same as macOS; on Windows: %LOCALAPPDATA%\hermes\.env).
  3. Restart Hermes.

Official docs: https://hermes-agent.nousresearch.com/docs

‹ Previous page: Hermes Agent WindowsNext page: Claude Code CLI macOS ›
↑
Question link copied.

Other FAQ pages

API Documentation

  • OpenAI ChatGPT API
  • Anthropic (Claude) API
  • Google Gemini API
  • Google Search API
  • Google News API
  • OpenRouter API
  • API Pricing

CLI & Agent Guides

  • cc-switch macOS
  • cc-switch Windows
  • cc-switch Linux
  • OpenCode macOS
  • OpenCode Windows
  • OpenCode Linux
  • OpenClaw macOS
  • OpenClaw Windows
  • OpenClaw Linux
  • Hermes Agent macOS
  • Hermes Agent Windows
  • Claude Code CLI macOS
  • Claude Code CLI Windows
  • Claude Code CLI Linux
  • Codex CLI macOS
  • Codex CLI Windows
  • Codex CLI Linux

MYAI168 API & MCP

  • MYAI168 MCP CLI
  • MYAI168 MCP Web & App