Kali Linux 2026 里安装 Hermes Agent(NousResearch/hermes-agent) 的完整步骤,含国内加速、依赖处理、初始化与常见坑。


1. 准备环境(Kali 2026)

Kali 基于 Debian,先更新并安装基础工具:

bash

运行

sudo apt update
sudo apt upgrade -y
sudo apt install -y git curl wget

检查依赖

Hermes 会自动装 Python 3.11、Node.js 22、ripgrep、ffmpeg 等,你只需保证 git 可用

bash

运行

git --version

2. 一键安装(国内推荐加速镜像)

官方脚本(国外,可能慢 / 超时):

bash

运行

curl -fsSL https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.sh | bash

国内加速(推荐,速度快、成功率高):

bash

运行

curl -fsSL https://res1.hermesagent.org.cn/install.sh | bash
  • 脚本会自动:
    • 安装 Python 3.11(用 uv,不冲突系统 Python)
    • 安装 Node.js 22
    • 克隆代码、创建虚拟环境
    • 注册全局 hermes 命令
  • 全程等待,约 3–5 分钟。

3. 生效环境变量并验证

bash

运行

source ~/.bashrc
hermes --version

输出版本号(如 v0.13.0)即成功。


4. 初始化配置(必做)

bash

运行

hermes init

交互式向导:

  1. 选择模型提供商(推荐 OpenRouterDeepSeek
  2. 输入对应 API Key
  3. 选默认模型
  4. 确认权限→完成

配置文件路径:~/.hermes/config.yaml~/.hermes/.env


5. 启动 Hermes

bash

运行

hermes start

看到 Hermes Agent is running 即正常运行。


6. 常用命令

bash

运行

hermes init          # 重新配置
hermes start         # 启动服务
hermes stop          # 停止服务
hermes restart       # 重启
hermes gateway setup # 配置微信/QQ 通道

7. 常见问题(Kali 特有)

问题 1:curl: (7) Failed to connect

  • 换国内加速脚本(见上文)
  • 或配置代理:export ALL_PROXY=socks5://127.0.0.1:端口

问题 2:Node.js 安装失败

bash

运行

sudo apt install -y ca-certificates
sudo update-ca-certificates

问题 3:端口 8080 被占

bash

运行

sudo lsof -i:8080
# 杀掉占用进程或改 Hermes 端口:
hermes config set server.port 8081

问题 4:权限 / 路径错误

bash

运行

chmod -R 755 ~/.hermes

8. 手动安装(备选,适合排错)

bash

运行

git clone --recurse-submodules https://github.com/NousResearch/hermes-agent.git
cd hermes-agent
# 后续按提示装依赖、建虚拟环境、链接命令

--------------------------------------------------- WEB  UI-------------------------------------------------------

一、Hermes 各组件默认端口

  1. Gateway API(核心接口)

    • 默认端口:8642
    • 控制文件:~/.hermes/.env
    API_SERVER_ENABLED=true
    API_SERVER_PORT=8642
    
  2. 内置 Web UI(聊天界面)

    • 默认端口:3000
    • 控制文件:~/.hermes/config.yaml
    web:
      enabled: true
      port: 3000
      host: 127.0.0.1
    
  3. 内置 Dashboard(管理面板)

    • 默认端口:9119
    • 启动命令:
    hermes dashboard
    
  4. 社区版 WebUI(如 hermes-webui)

    • 默认端口:8648

二、默认会不会启动 Web

  • 纯净安装后:Web UI(3000)默认关闭,需要你在 config.yaml 里把 web.enabled 设为 true 才会监听 3000。
  • Gateway API(8642)默认关闭,需要在 .envAPI_SERVER_ENABLED=true 才会启动。
  • Dashboard(9119)默认不启动,必须手动执行 hermes dashboard

三、查看当前是否监听这些端口

bash

运行

# 看 3000/8642/9119
lsof -i :3000
lsof -i :8642
lsof -i :9119
# 或
ss -tuln | grep -E '3000|8642|9119'

----------------------------------------完整安装过程代码-----------------------------------------------------------

┌──(root㉿Kali2026)-[~]
└─# git --version
git version 2.53.0
                                                                             
┌──(root㉿Kali2026)-[~]
└─# curl -fsSL https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.sh | bash


┌─────────────────────────────────────────────────────────┐
│             ⚕ Hermes Agent Installer                    │
├─────────────────────────────────────────────────────────┤
│  An open source AI agent by Nous Research.              │
└─────────────────────────────────────────────────────────┘

✓ Detected: linux (kali)
→ Root install on Linux — using FHS layout
→   Code:    /usr/local/lib/hermes-agent
→   Command: /usr/local/bin/hermes
→   Data:    /root/.hermes (unchanged)
→ Checking for uv package manager...
→ Installing uv (fast Python package manager)...
✓ uv installed (uv 0.11.16 (x86_64-unknown-linux-gnu))
→ Checking Python 3.11...
→ Python 3.11 not found, installing via uv...
Installed Python 3.11.15 in 11.63s
 + cpython-3.11.15-linux-x86_64-gnu (python3.11)
warning: `/root/.local/bin` is not on your PATH. To use installed Python executables, run `export PATH="/root/.local/bin:$PATH"` or `uv python update-shell`.                                                                          
✓ Python installed: Python 3.11.15
→ Checking Git...
✓ Git 2.53.0 found
→ Checking Node.js (for browser tools)...
✓ Node.js v22.22.2 found
→ Checking internet connectivity for package install and web tools...
✓ Internet connectivity looks good
→ Checking ripgrep (fast file search)...
→ Checking ffmpeg (TTS voice messages)...
⚠ ripgrep not installed (file search will use grep fallback)
→ To install ripgrep manually:
→   Use your package manager or visit the project homepage
⚠ ffmpeg not installed (TTS voice messages will be limited)
→ To install ffmpeg manually:
→   Use your package manager or visit the project homepage
→ Installing to /usr/local/lib/hermes-agent...
→ Trying SSH clone...
→ SSH failed, trying HTTPS...
Cloning into '/usr/local/lib/hermes-agent'...
remote: Enumerating objects: 91210, done.
remote: Counting objects: 100% (78/78), done.
remote: Compressing objects: 100% (53/53), done.
remote: Total 91210 (delta 38), reused 25 (delta 25), pack-reused 91132 (from 2)
Receiving objects: 100% (91210/91210), 228.41 MiB | 298.00 KiB/s, done.
Resolving deltas: 100% (63147/63147), done.
✓ Cloned via HTTPS
✓ Repository ready
→ Creating virtual environment with Python 3.11...
Using CPython 3.11.15
Creating virtual environment at: venv
Activate with: source venv/bin/activate
✓ Virtual environment ready (Python 3.11)
→ Installing dependencies...
→ Trying tier: hash-verified (uv.lock) ...
→ (this resolves + downloads the curated [all] set — first run on a
→  fresh venv can take 1-5 minutes; uv prints progress below)
Resolved 215 packages in 2ms
      Built hermes-agent @ file:///usr/local/lib/hermes-agent
Prepared 100 packages in 3m 52s
Installed 100 packages in 73ms
 + agent-client-protocol==0.9.0
 + aiohappyeyeballs==2.6.1
 + aiohttp==3.13.3
 + aiosignal==1.4.0
 + annotated-doc==0.0.4
 + annotated-types==0.7.0
 + anyio==4.12.1
 + attrs==25.4.0
 + certifi==2026.2.25
 + cffi==2.0.0
 + charset-normalizer==3.4.4
 + click==8.3.1
 + croniter==6.0.0
 + cryptography==46.0.7
 + debugpy==1.8.20
 + defusedxml==0.7.1
 + distro==1.9.0
 + fastapi==0.133.1
 + fire==0.7.1
 + frozenlist==1.8.0
 + google-api-core==2.30.3
 + google-api-python-client==2.194.0
 + google-auth==2.49.2
 + google-auth-httplib2==0.3.1
 + google-auth-oauthlib==1.3.1
 + googleapis-common-protos==1.73.0
 + h11==0.16.0
 + hermes-agent==0.14.0 (from file:///usr/local/lib/hermes-agent)
 + httpcore==1.0.9
 + httplib2==0.31.2
 + httptools==0.7.1
 + httpx==0.28.1
 + httpx-sse==0.4.3
 + idna==3.15
 + iniconfig==2.3.0
 + jinja2==3.1.6
 + jiter==0.13.0
 + jsonschema==4.26.0
 + jsonschema-specifications==2025.9.1
 + markdown-it-py==4.0.0
 + markupsafe==3.0.3
 + mcp==1.26.0
 + mdurl==0.1.2
 + multidict==6.7.1
 + oauthlib==3.3.1
 + openai==2.24.0
 + packaging==26.0
 + pluggy==1.6.0
 + prompt-toolkit==3.0.52
 + propcache==0.4.1
 + proto-plus==1.27.2
 + protobuf==6.33.5
 + psutil==7.2.2
 + ptyprocess==0.7.0
 + pyasn1==0.6.3
 + pyasn1-modules==0.4.2
 + pycparser==3.0
 + pydantic==2.13.4
 + pydantic-core==2.46.4
 + pydantic-settings==2.13.1
 + pygments==2.19.2
 + pyjwt==2.12.1
 + pyparsing==3.3.2
 + pytest==9.0.2
 + pytest-asyncio==1.3.0
 + pytest-timeout==2.4.0
 + python-dateutil==2.9.0.post0
 + python-dotenv==1.2.2
 + python-multipart==0.0.27
 + pytz==2025.2
 + pyyaml==6.0.3
 + referencing==0.37.0
 + requests==2.33.0
 + requests-oauthlib==2.0.0
 + rich==14.3.3
 + rpds-py==0.30.0
 + ruamel-yaml==0.18.17
 + ruamel-yaml-clib==0.2.15
 + ruff==0.15.10
 + simple-term-menu==1.6.6
 + six==1.17.0
 + sniffio==1.3.1
 + socksio==1.0.0
 + sse-starlette==3.3.2
 + starlette==0.52.1
 + tenacity==9.1.4
 + termcolor==3.3.0
 + tqdm==4.67.3
 + ty==0.0.21
 + typing-extensions==4.15.0
 + typing-inspection==0.4.2
 + uritemplate==4.2.0
 + urllib3==2.6.3
 + uvicorn==0.41.0
 + uvloop==0.22.1
 + watchfiles==1.1.1
 + wcwidth==0.6.0
 + websockets==15.0.1
 + yarl==1.22.0
 + youtube-transcript-api==1.2.4
✓ Main package installed (hash-verified via uv.lock)
✓ All dependencies installed
→ Installing Node.js dependencies (browser tools)...
✅ Browser tools ready. Run: python run_agent.py --help
✓ Node.js dependencies installed
→ Installing browser engine (Playwright Chromium)...
✓ Found system Chrome/Chromium at /usr/bin/chromium
→ Skipping Playwright browser download; Hermes will use the system browser.
✓ Browser engine setup complete
→ Installing TUI dependencies...

  ⠏⠉                                                         ⠉⢹

    ██╗   ██╗███╗   ██╗██╗ ██████╗ ██████╗ ██████╗ ███████╗
    ██║   ██║████╗  ██║██║██╔════╝██╔═══██╗██╔══██╗██╔════╝
    ██║   ██║██╔██╗ ██║██║██║     ██║   ██║██║  ██║█████╗  
    ██║   ██║██║╚██╗██║██║██║     ██║   ██║██║  ██║██╔══╝  
    ╚██████╔╝██║ ╚████║██║╚██████╗╚██████╔╝██████╔╝███████╗
     ╚═════╝ ╚═╝  ╚═══╝╚═╝ ╚═════╝ ╚═════╝ ╚═════╝ ╚══════╝
    BRAILLE ANIMATIONS

    ⠧⠀ braille        ⠀⠀⢸⡇ scan           ⠂⠌⡠⠐ rain         
    ⣀⠀ orbit          ⢾⣉⡷⠀ pulse          ⠊⡰⡡⡘ sparkle      
    ⡑⠀ breathe        ⠀⢀⡴⠋ cascade        ⠙⠢⣄⣠ waverows     
    ⠀⠛ snake          ⣿⡇⠀⠀ columns        ⣉⡱⣉⡱ helix        
    ⣿⣿ fillsweep      ⠓⠓⠓⠀ scanline       ⠠⠐⠈⠁ braillewave  
    ⣿⡿ diagswipe      ⡪⡪⡪⠀ checkerboard   ⠉⠙⠚⠒ dna          

    npx unicode-animations                  demo all spinners
    npx unicode-animations --list           list all spinners
    npx unicode-animations --web              open in browser

  ⣇⣀                                                         ⣀⣸

✓ TUI dependencies installed
→ Setting up hermes command...
✓ Installed hermes launcher → /usr/local/bin/hermes
→ /usr/local/bin is already on PATH for all shells
✓ hermes command ready
→ Setting up configuration files...
✓ Created ~/.hermes/.env from template
✓ Configured browser tools to use /usr/bin/chromium
✓ Created ~/.hermes/config.yaml from template
✓ Created ~/.hermes/SOUL.md (edit to customize personality)
✓ Configuration directory ready: ~/.hermes/
→ Syncing bundled skills to ~/.hermes/skills/ ...
Syncing bundled skills into ~/.hermes/skills/ ...
  + plan
  + systematic-debugging
  + test-driven-development
  + requesting-code-review
  + spike
  + subagent-driven-development
  + writing-plans
  + python-debugpy
  + hermes-agent-skill-authoring
  + node-inspect-debugger
  + debugging-hermes-tui-commands
  + obsidian
  + github-code-review
  + github-pr-workflow
  + github-issues
  + github-repo-management
  + github-auth
  + codebase-inspection
  + hermes-agent
  + opencode
  + kanban-codex-lane
  + codex
  + claude-code
  + llm-wiki
  + arxiv
  + polymarket
  + research-paper-writing
  + blogwatcher
  + xurl
  + ascii-art
  + touchdesigner-mcp
  + manim-video
  + baoyu-article-illustrator
  + songwriting-and-ai-music
  + humanizer
  + architecture-diagram
  + excalidraw
  + ascii-video
  + comfyui
  + p5js
  + claude-design
  + popular-web-designs
  + baoyu-infographic
  + sketch
  + pretext
  + design-md
  + pixel-art
  + baoyu-comic
  + ideation
  + gif-search
  + heartmula
  + songsee
  + youtube-content
  + spotify
  + dogfood
  + kanban-worker
  + webhook-subscriptions
  + kanban-orchestrator
  + teams-meeting-pipeline
  + maps
  + airtable
  + google-workspace
  + ocr-and-documents
  + notion
  + nano-pdf
  + powerpoint
  + linear
  + jupyter-live-kernel
  + himalaya
  + openhue
  + godmode
  + native-mcp
  + yuanbao
  + apple-reminders
  + macos-computer-use
  + apple-notes
  + findmy
  + imessage
  + obliteratus
  + serving-llms-vllm
  + llama-cpp
  + dspy
  + huggingface-hub
  + weights-and-biases
  + evaluating-llms-harness
  + segment-anything-model
  + audiocraft-audio-generation
  + pokemon-player
  + minecraft-modpack-server

Done: 89 new, 0 updated, 0 unchanged. 89 total bundled.
✓ Skills synced to ~/.hermes/skills/

→ Starting setup wizard...


┌─────────────────────────────────────────────────────────┐
│             ⚕ Hermes Agent Setup Wizard                │
├─────────────────────────────────────────────────────────┤
│  Let's configure your Hermes Agent installation.       │
│  Press Ctrl+C at any time to exit.                     │
└─────────────────────────────────────────────────────────┘

    Skipped (keeping current)


◆ Inference Provider
  Choose how to connect to your main chat model.
     Guide: https://hermes-agent.nousresearch.com/docs/integrations/providers

Warning: No inference provider configured. Run 'hermes model' to choose a provider and model, or set an API key (OPENROUTER_API_KEY, OPENAI_API_KEY, etc.) in ~/.hermes/.env. Falling back to auto provider detection.

  Current model:    anthropic/claude-opus-4.6
  Active provider:  none


Custom OpenAI-compatible endpoint configuration:

API base URL [e.g. https://api.example.com/v1]: https://api.lkeap.cloud.tencent.com/plan/v3
API key [optional]: 
Warning: could not verify this endpoint via https://api.lkeap.cloud.tencent.com/plan/v3/models. Hermes will still save it.
  If this server expects /v1 in the path, try base URL: https://api.lkeap.cloud.tencent.com/plan/v3/v1

Select API compatibility mode:
  1. Auto-detect [current]
     Use Hermes URL heuristics; best for standard OpenAI-compatible endpoints.
  2. Chat Completions
     Use /chat/completions for standard OpenAI-compatible servers.
  3. Responses / Codex
     Use /responses for Codex-compatible tool-calling backends.
  4. Anthropic Messages
     Use /v1/messages for Anthropic-compatible endpoints.
Choice [1-4, Enter to keep current/detected]: 2
  API mode: chat_completions
Model name (e.g. gpt-4, llama-3-70b): GLM-5.1
Context length in tokens [leave blank for auto-detect]: 128000
Display name [Api.lkeap.cloud.tencent.com]: 
Default model set to: GLM-5.1 (via https://api.lkeap.cloud.tencent.com/plan/v3)
  💾 Saved to custom providers as "Api.lkeap.cloud.tencent.com" (edit in config.yaml)

◆ Terminal Backend
  Choose where Hermes runs shell commands and code.
  This affects tool execution, file access, and isolation.
     Guide: https://hermes-agent.nousresearch.com/docs/developer-guide/environments

    Skipped (keeping current)

  Keeping current backend: local
✓ Applied recommended defaults:
    Max iterations: 90
    Tool progress: all
    Compression threshold: 0.50
    Session reset: inactivity (1440 min) + daily (4:00)
    Run `hermes setup agent` later to customize.

✓ Setup complete! You're ready to go.

    Configure all settings:    hermes setup
    Connect Telegram/Discord:  hermes setup gateway

◆ Tool Availability Summary
  6/10 tool categories available:

   ✓ Vision (image analysis)
   ✗ Mixture of Agents (missing OPENROUTER_API_KEY)
   ✗ Web Search & Extract (missing EXA_API_KEY, PARALLEL_API_KEY, FIRECRAWL_API_KEY/FIRECRAWL_API_URL, TAVILY_API_KEY, or SEARXNG_URL)
   ✓ Browser Automation (Local browser)
   ✗ Image Generation (missing FAL_KEY or OPENAI_API_KEY)
   ✓ Text-to-Speech (Edge TTS)
   ✗ Skills Hub (GitHub) (missing GITHUB_TOKEN)
   ✓ Terminal/Commands
   ✓ Task Planning (todo)
   ✓ Skills (view, create, edit)

⚠ Some tools are disabled. Run 'hermes setup tools' to configure them,
⚠ or edit ~/.hermes/.env directly to add the missing API keys.


┌─────────────────────────────────────────────────────────┐
│              ✓ Setup Complete!                          │
└─────────────────────────────────────────────────────────┘

📁 All your files are in ~/.hermes/:

   Settings:  /root/.hermes/config.yaml
   API Keys:  /root/.hermes/.env
   Data:      /root/.hermes/cron/, sessions/, logs/

────────────────────────────────────────────────────────────

📝 To edit your configuration:

   hermes setup          Re-run the full wizard
   hermes setup model    Change model/provider
   hermes setup terminal Change terminal backend
   hermes setup gateway  Configure messaging
   hermes setup tools    Configure tool providers

   hermes config         View current settings
   hermes config edit    Open config in your editor
   hermes config set <key> <value>
                          Set a specific value

   Or edit the files directly:
   nano /root/.hermes/config.yaml
   nano /root/.hermes/.env

────────────────────────────────────────────────────────────

🚀 Ready to go!

   hermes              Start chatting
   hermes gateway      Start messaging gateway
   hermes doctor       Check for issues

┌─────────────────────────────────────────────────────────┐                  
│              ✓ Installation Complete!                   │                  
└─────────────────────────────────────────────────────────┘                  
                                                                             

📁 Your files:

   Config:    /root/.hermes/config.yaml
   API Keys:  /root/.hermes/.env
   Data:      /root/.hermes/cron/, sessions/, logs/
   Code:      /usr/local/lib/hermes-agent

─────────────────────────────────────────────────────────

🚀 Commands:

   hermes              Start chatting
   hermes setup        Configure API keys & settings
   hermes config       View/edit configuration
   hermes config edit  Open config in editor
   hermes gateway install Install gateway service (messaging + cron)
   hermes update       Update to latest version

─────────────────────────────────────────────────────────

⚡ 'hermes' was linked into /usr/local/bin and is ready to use — no shell reload needed.                                                                  


Note: ripgrep (rg) was not found. File search will use                       
grep as a fallback. For faster search in large codebases,                    
install ripgrep: sudo apt install ripgrep (or brew install ripgrep)          
                                                                     

Logo

openEuler 是由开放原子开源基金会孵化的全场景开源操作系统项目,面向数字基础设施四大核心场景(服务器、云计算、边缘计算、嵌入式),全面支持 ARM、x86、RISC-V、loongArch、PowerPC、SW-64 等多样性计算架构

更多推荐