安装hermes
powershell
add-type @"
using System.Net;
using System.Security.Cryptography.X509Certificates;
public class TrustAllCertsPolicy : ICertificatePolicy {
public bool CheckValidationResult(
ServicePoint srvPoint, X509Certificate certificate,
WebRequest request, int certificateProblem) {
return true;
}
}
"@
[System.Net.ServicePointManager]::CertificatePolicy = New-Object TrustAllCertsPolicy
irm https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.ps1 | iex
前面部分是在配置忽略校验,其实真正的安装命令是 irm https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.ps1 | iex
配置glm
修改配置文件.env
C:\Users\${userName}\AppData\Local\hermes\.env
找到这段注释,分别配置上
env
# =============================================================================
# LLM PROVIDER (z.ai / GLM)
# =============================================================================
# z.ai provides access to ZhipuAI GLM models (GLM-4-Plus, etc.)
# Get your key at: https://z.ai or https://open.bigmodel.cn
GLM_API_KEY=你的APIKey
GLM_BASE_URL=https://open.bigmodel.cn/api/anthropic
配置 GLM_API_KEY为你的API key, 配置GLM_BASE_URL为https://open.bigmodel.cn/api/anthropic
修改配置文件 config.yaml
C:\Users\${userName}\AppData\Local\hermes\config.yaml
修改开头的模型配置
yaml
model:
default: anthropic/claude-opus-4.6
provider: auto
base_url: https://openrouter.ai/api/v1
为
yaml
model:
default: glm-4.7
provider: zhipu
base_url: https://open.bigmodel.cn/api/anthropic