Hermes Agent 安装 - Windows 11
Hermes Agent 安装 - Windows 11
前置条件
确保windows系统已经安装了wsl框假,以及安装相应的Linux发行版。
1. 检查wsl框架
PSC:\WINDOWS\system32> wsl--version WSL 版本: 2.7.3.0 内核版本: 6.6.114.1-1 WSLg 版本: 1.0.73 MSRDC 版本: 1.2.6676 Direct3D 版本: 1.611.1-81528511 DXCore 版本: 10.0.26100.1-240331-1435.ge-release Windows: 10.0.26200.8524PSC:\WINDOWS\system32>wsl--install#若显示错误,需要安装wsl框架。2. 安装Ubuntu发行版
建议选择 Ubuntu-22.04,成熟稳定的系统才是最佳选择。并且运行Hermes所需要的其他依赖,比如Node.js, Git, Python, Linux Shell, 对 Ubuntu-22.04 更兼容,这些基本都是基于 Ubuntu-20.04 / 22.04 开发调试的。
提供了两种方法,一是 PowerShell 运行安装命令(最便捷),另一种是导入rootfs(仅提供给无法科学上网,而且打不开Ubuntu官网,以及微软应用商店无法访问的朋友),两种方法都需要在wsl框架上运行。
2.1 PowerShell 运行安装命令
wsl.exe--list--online#查看发行版信息,这一步可能需要用到科学上网,可选择国内镜像地址。wsl.exe--install Ubuntu-22.04#安装所需的环境系统,建议选择Ubuntu-22.04。2.2 导入 rootfs
1- 下载rootfs(Ubuntu镜像),下载.tar.gz
https://cloud-images.ubuntu.com/wsl/2- 导入到WSL
wsl--import Ubuntu D:\WSL\Ubuntu.\ubuntu.tar.gz2.3 确认Ubuntu已安装
PowerShell运行后,会直接进入Ubuntu,并且第一次进入需要设置账号密码。
导入rootfs后,需要执行:
#查看版本以及运行状态PSC:\WINDOWS\system32> wsl-l-v NAME STATE VERSION*Ubuntu-22.04 Running 2#进入UbuntuPSC:\WINDOWS\system32> wsl-d Ubuntu-22.04 shuoshawn@DESKTOP-IM3L3RM:/mnt/c/WINDOWS/system32$3. 安装开发环境(安装Hermes的必须条件)
sudo apt update sudo apt install-y git curl build-essential之前提到,安装Hermes还需要Node.js,Git等依赖,这条命令可以一键安装所有的依赖包。
curl-fsSL https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.sh|bash参考:
验证:
shuoshawn@DESKTOP-IM3L3RM:/mnt/c/WINDOWS/system32$ node-v v22.22.3 shuoshawn@DESKTOP-IM3L3RM:/mnt/c/WINDOWS/system32$ npm-v 10.9.8记得关注一下有哪些安装包报错,有的报错会在Shell面板重新安装,有的则需要手动安装。
sudo apt install-y <安装失败的工具名>#examplesudo apt install-y ripgrep4. 配置Hermes
4.1 选择Quick setup
刚搭建,不需要调优,先运行成功再去更换新的模型或调用其他的API。后期可以在wsl中运行hermes config,修改provider, model, endpoint 或自定义 API。
4.2 选择provider,服务提供商
按照提示信息,选择需要的模型,没有显示的话,点击custom (direct API)。如果是自己搭建的内部训练模型,或者是自定义的API(不兼容OpenAI),自己写了后端,选择Custom endpoint (enter URL manually)。
4.3 选择 custom (direct API)
以DeepSeek为例。
API base URL[e.g. https://api.example.com/v1]: https://api.deepseek.com API key[optional]: sk-xxxxxxxxxxxxxxxxx#你的API Key,这是临时方案,旨在先成功调用API,当前配置填写在config.yaml中,从安全性角度讲,这个文件中的内容仅写非私密变量。Select API compatibility mode:1. Auto-detect[current]Use Hermes URL heuristics;bestforstandard OpenAI-compatible endpoints.2. Chat Completions Use /chat/completionsforstandard OpenAI-compatible servers.3. Responses / Codex Use /responsesforCodex-compatible tool-calling backends.4. Anthropic Messages Use /v1/messagesforAnthropic-compatible endpoints. Choice[1-4, Enter to keep current/detected]:1#选择1,自动调用API模式API mode: auto-detect Model name(e.g. gpt-4, llama-3-70b): deepseek-v4-flash#定义模型名称Context lengthintokens[leave blankforauto-detect]:#让模型自动识别上下文长度Display name[Api.deepseek.com]: deepseekv4flash#定义配置文件名称Default modelsetto: deepseek-chat(via https://api.deepseek.com)💾 Saved to custom providers as"deepseek-chat"(editinconfig.yaml)选择Local,Keep Current。
Skip,跳过聊天工具的确认,暂时没必要,后面会单独列出教程。
运行source ~/.bashrc,否则调用hermes会出现hermes: command not found。
shuoshawn@DESKTOP-IM3L3RM:/mnt/c/WINDOWS/system32$ source ~/.bashrc shuoshawn@DESKTOP-IM3L3RM:/mnt/c/WINDOWS/system32$ hermes