Hermes
直接透過命令列完成設定的個人代理。
https://api.bf16.ai/v1openai-completions適用對象
希望在 Hermes 中完整啟用 1M 上下文視窗的使用者。
架構原理與接入優勢
Hermes Agent (by Nous Research) combines persistent local skills, long-term memory, and Agent Client Protocol (ACP) integration so the same agent works in your terminal and inside desktop hosts like OpenBot.
By default, Hermes caps custom OpenAI-compatible endpoints at a conservative context window unless model.context_length is explicitly raised. Setting model.context_length to 1048576 unlocks the full 1M-token window across bf16.ai’s uncensored GLM, DeepSeek, and Kimi models.
指令預設顯示 $BF16_API_KEY。登入並建立金鑰後會自動填入你的真實金鑰。
One-Command Hermes Agent Configuration
Installs Hermes if absent, writes BF16_API_KEY into ~/.hermes/.env (chmod 600), sets provider/base_url/model/1M context_length via hermes config set, and prints the active config.
export BF16_API_KEY="sk-bf16-v1-..."
command -v hermes >/dev/null 2>&1 || (curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash)
mkdir -p ~/.hermes && umask 077 && touch ~/.hermes/.env
grep -v '^OPENAI_API_KEY=' ~/.hermes/.env > ~/.hermes/.env.tmp && mv ~/.hermes/.env.tmp ~/.hermes/.env
printf 'OPENAI_API_KEY=%s\n' "$BF16_API_KEY" >> ~/.hermes/.env
hermes config set model.provider custom
hermes config set model.base_url https://api.bf16.ai/v1
hermes config set model.default zai-org/glm-5.3-uncensored
hermes config set model.context_length 1048576
hermes config show- 1
匯出你的 API 金鑰
Hermes 會讀取環境變數 BF16_API_KEY。
export BF16_API_KEY=sk-bf16-v1-... - 2
將端點指向 bf16
hermes config set model.provider custom hermes config set model.base_url https://api.bf16.ai/v1 hermes config set model.key_env BF16_API_KEY hermes config set model.default zai-org/glm-5.3-uncensored hermes config set model.context_length 1048576
關鍵參數核對清單
customhttps://api.bf16.ai/v1zai-org/glm-5.3-uncensored1048576Required to prevent early truncation below 1M tokens.
推薦模型分層配置
架構規劃使用旗艦模型,高頻子任務與螢幕截圖使用 Flash 模型以節省開銷。
| 工作流角色 | 模型 ID | 選型說明 | USD / 1M Tokens |
|---|---|---|---|
| Primary Reasoning & Engineering Agent | zai-org/glm-5.3-uncensored | Deep tool execution and multi-file reasoning across 1M-token workspaces. | $1.35 in / $0.25 cached / $4.20 out |
| Fast Multimodal & Sub-Tasks | deepseek/deepseek-v4.1-flash-uncensored | Native vision + high-speed tool loops for web research and screenshot tasks. | $0.26 in / $0.045 cached / $1.00 out |
如何確認設定成功
- 執行 hermes config show 可看到 bf16 基礎網址。
- curl https://api.bf16.ai/v1/models -H "Authorization: Bearer $BF16_API_KEY"
生產環境護欄與預算隔離
- Restrict skills.trusted_project_dirs in ~/.hermes/config.yaml to repositories you own.
- Keep ~/.hermes/.env mode 0600 so local keys stay readable only by your OS user.