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 id from 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.yaml as the source of truth for model and endpoint settings. Avoid legacy LLM_MODEL env vars. For a custom gateway, use hermes model or the YAML below.

Option A: Interactive setup (recommended)

hermes model

Then:

  1. Choose Custom endpoint (OpenAI-compatible / VLLM / etc.)
  2. API base URLhttps://51kik.com/v1 (must include /v1)
  3. API key → RouterBrain inference key
  4. 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

FieldValue
ProtocolOpenAI-compatible (chat_completions)
Base URLhttps://51kik.com/v1
API KeyConsole inference key
ModelCatalog id
Config file~/.hermes/config.yaml

Related