Editor & Tool Configuration

Hermes

Set up Hermes Agent, the open-source self-learning AI agent, with AnyRouter: install it and configure a custom endpoint, base_url and API key via hermes model.

Hermes Agent (Hermes): AnyRouter API Setup Guide

1. Introduction

Hermes Agent is an open-source autonomous AI agent framework developed by Nous Research, with "closed-loop self-learning" capabilities. Unlike other AI tools that forget everything after a single conversation, Hermes's core strengths are persistent cross-session memory and an automatic skill distillation system (Skills System).

After completing a complex task on its own or via tools, it evaluates the outcome and automatically packages it as a "skill card". The next time it encounters a similar task, it can retrieve and invoke that skill directly — getting smarter the more you use it. Hermes uses a decoupled design that is not tied to any single model vendor, and it can seamlessly connect to all kinds of third-party LLM APIs via native configuration or the command line.


2. Download and Install on Different Platforms

Hermes Agent supports macOS, Linux, and Windows (WSL2) environments.

1. Prerequisites

Make sure your system has the following installed:

  • Python 3.10+
  • Node.js 18+

2. Linux, macOS, WSL2, Termux installation

Open a terminal and run the official one-line install script:

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

After installation, verify that it succeeded:

hermes --version

3. Windows

Since Hermes relies on low-level terminal tooling, we recommend running it in Windows's WSL2 (Ubuntu 22.04+) subsystem.

Run this in PowerShell:

iex (irm https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.ps1)

3. Changing the Configuration to Connect a Third-Party API

Hermes provides minimal model management commands, and it also supports manually connecting to OpenAI-compatible third-party API endpoints by editing its environment configuration file.

Hermes supports interactive configuration. Just type the following command in the terminal:

hermes model

An interactive menu pops up, listing mainstream third-party providers (such as OpenRouter, OpenAI, Anthropic, DeepSeek, MiniMax, etc.). Select a provider and enter your API Key to complete the configuration automatically.

Tip (migrating from OpenClaw): If you were previously an OpenClaw user, you can import all your configuration and API keys in one go with the migration command: hermes claw migrate

In the interactive menu, use the up/down arrow keys to move between options and press Enter to confirm

  1. Select Custom endpoint
  1. Enter the AnyRouter URL https://anyrouter.win/v1
  1. At the API compatibility option, just type 1 to go to the next step
  1. Enter the model name
  1. For the model's context length, just leave it blank and press Enter
  1. Enter your display name AnyRouter
  1. Once setup is complete, type hermes in the terminal to start a conversation and check that everything works

You can run hermes setup at any time later to change the settings

On this page