Integrate Hermes Agent

Connect Hermes Agent to TokenCode through the Anthropic Messages protocol.

Install Hermes Agent

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

Windows users should install and run Hermes Agent in WSL2.

bash
npm install -g @tokencode/tokencode
tokencode

Select Hermes Agent in the wizard, or run:

bash
npx @tokencode/tokencode hm -k sk-your-api-key -m claude-sonnet-4-6

Manual configuration

bash
hermes config set model.provider custom
hermes config set model.base_url https://tokencode.dev
hermes config set model.api_mode anthropic_messages
hermes config set model.api_key sk-your-api-key
hermes config set model.default claude-sonnet-4-6

The equivalent ~/.hermes/config.yaml settings are:

yaml
model:
  default: claude-sonnet-4-6
  provider: custom
  base_url: https://tokencode.dev
  api_mode: anthropic_messages
  api_key: sk-your-api-key

Verify the setup

bash
hermes chat -q "Hello, confirm the connection in one sentence."
hermes chat -m gpt-5.5 -q "Explain the structure of this project."

If Hermes still connects to OpenRouter, set model.provider to custom again and check for an older value in ~/.hermes/config.yaml. In anthropic_messages mode, use https://tokencode.dev without /v1.