Use RouterBrain as the model backend for autonomous AI coding in Hermes Agent.
Hermes Agent is Nous Research's open-source self-evolving agent framework with persistent memory, built-in tools, and multi-platform support (CLI, Telegram, Discord, and more).
Prerequisites
- An inference API key from the console (API keys)
- A catalog
idfrom List models - A machine with terminal access (macOS, Linux, or Windows WSL2)
Install Hermes Agent
Run the one-line installer:
curl -fsSL https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.sh | bash
Verify:
hermes doctor
See the Hermes Agent docs for more.
Configure RouterBrain
Hermes works with any OpenAI-compatible endpoint that implements POST /v1/chat/completions. Use interactive setup or edit ~/.hermes/config.yaml.
Note
Recent releases treat
config.yamlas the source of truth for model and endpoint settings. Avoid legacyLLM_MODELenv vars. For a custom gateway, usehermes modelor the YAML below.
Option A: Interactive setup (recommended)
hermes model
Then:
- Choose Custom endpoint (OpenAI-compatible / VLLM / etc.)
- API base URL →
https://51kik.com/v1(must include/v1) - API key → RouterBrain inference key
- Model name → catalog
id
Settings persist in ~/.hermes/config.yaml across restarts.
Option B: Edit config.yaml
Edit ~/.hermes/config.yaml and replace YOUR_ROUTERBRAIN_KEY / YOUR_MODEL_ID:
model:
default: YOUR_MODEL_ID
provider: custom
base_url: "https://51kik.com/v1"
api_key: YOUR_ROUTERBRAIN_KEY
Named custom providers for multiple endpoints:
custom_providers:
- name: routerbrain
base_url: "https://51kik.com/v1"
api_key: YOUR_ROUTERBRAIN_KEY
api_mode: chat_completions
model:
default: YOUR_MODEL_ID
provider: custom
In chat you may switch with /model custom:routerbrain:YOUR_MODEL_ID (check your Hermes version docs).
Option C: OpenAI API provider + Base URL override
For the built-in OpenAI API provider, set ~/.hermes/.env:
OPENAI_API_KEY=YOUR_ROUTERBRAIN_KEY
OPENAI_BASE_URL=https://51kik.com/v1
Set model.default to your catalog id in config.yaml. This path only applies to openai-api; Custom endpoint is clearer when mixing multiple keys.
Get started
hermes
Chat with Hermes backed by RouterBrain models. Persistent memory and skills carry project context across sessions.
Verify
hermes doctor
hermes -p "reply with ok only"
On failure, validate with curl first (First request), then confirm base_url includes /v1.
Reasoning mode
At runtime, /reasoning toggles extended thinking when supported (none off; levels like minimal / low / medium / high on).
Quick reference
| Field | Value |
|---|---|
| Protocol | OpenAI-compatible (chat_completions) |
| Base URL | https://51kik.com/v1 |
| API Key | Console inference key |
| Model | Catalog id |
| Config file | ~/.hermes/config.yaml |