One-click setup to connect Hermes Agent with Crazyrouter — access 627+ AI models through a single API key.
- Configures Hermes Agent to use Crazyrouter as the AI provider
- Sets
https://cn.crazyrouter.com/v1as the default base URL - Lets you pick a default model (Claude, GPT, DeepSeek, Gemini, etc.)
- Optionally tests the connection
- Includes
setup-full.shfor fresh machines: checks system environment, installs missing dependencies, installs Hermes Agent, then writes Crazyrouter config
这个仓库用于一键把 Hermes Agent 配置为使用 Crazyrouter。默认接入地址已经改为国内入口:
https://cn.crazyrouter.com/v1
脚本会写入 ~/.hermes/.env 和 ~/.hermes/config.yaml,并在覆盖旧配置前生成 .bak 备份。
详细中文教程见:README_ZH.md
If Hermes Agent is already installed, run the lightweight configurator:
curl -fsSL https://raw.githubusercontent.com/xujfcn/crazyrouter-hermes/main/setup.sh | bashFor a fresh server or clean system, run the full installer. It checks the OS/package manager, installs basic dependencies, installs Hermes Agent, configures Crazyrouter, and optionally tests the API connection:
curl -fsSL https://raw.githubusercontent.com/xujfcn/crazyrouter-hermes/main/setup-full.sh | bashNon-interactive mode:
CRAZYROUTER_API_KEY=sk-your-key \
bash <(curl -fsSL https://raw.githubusercontent.com/xujfcn/crazyrouter-hermes/main/setup-full.sh) \
--yes --model claude-opus-4-8irm https://raw.githubusercontent.com/xujfcn/crazyrouter-hermes/main/setup.ps1 | iexDownload and run setup.bat:
curl -o setup.bat https://raw.githubusercontent.com/xujfcn/crazyrouter-hermes/main/setup.bat
setup.bat- Hermes Agent installed
- A Crazyrouter API key — get one at crazyrouter.com
After setup, switch models anytime inside Hermes:
/model claude-opus-4-8
/model gpt-5.5
/model claude-opus-4-7
/model gpt-5.4
/model claude-sonnet-4-6
/model gemini-3.1-pro
/model deepseek-v4-flash
/model gpt-4o
627+ models available. Full list at crazyrouter.com.
If you prefer to configure manually:
~/.hermes/.env
CRAZYROUTER_API_KEY=sk-your-crazyrouter-key
For Claude, use native Anthropic Messages:
model:
provider: "custom"
default: "claude-opus-4-8"
base_url: "https://cn.crazyrouter.com"
api_mode: "anthropic_messages"For non-Claude models, use OpenAI-compatible chat completions:
model:
provider: "custom"
default: "gpt-5.5"
base_url: "https://cn.crazyrouter.com/v1"
api_mode: "chat_completions"Claude models must not use codex_responses or /v1/responses. Rerun the setup script when switching between Claude and non-Claude model families so Hermes updates both the base URL and API mode.
Crazyrouter is an AI API gateway that gives you access to 627+ models (OpenAI, Anthropic, Google, DeepSeek, Gemini, and more) through a single API key, using Anthropic Messages for Claude and OpenAI-compatible chat for other models. Pay-as-you-go, no subscriptions.
- 🌐 Website: cn.crazyrouter.com
- 📖 Docs: docs.crazyrouter.com
- 💬 Telegram: t.me/crzrouter
MIT