Hermes

Use OpenModels as the upstream model provider for Hermes Agent. Hermes keeps its CLI, TUI, memory, skills, terminal backends, messaging gateway, cron jobs, and tools. OpenModels provides the OpenAI-compatible model endpoint, API key, model IDs, and credit-based billing.
This guide focuses on Hermes calling OpenModels. If you want another app to call Hermes through its API server, see “Use Hermes as an OpenAI-compatible endpoint” below.
When to use this
Use this setup when you want:
- Hermes Agent as a local or always-on autonomous agent.
- OpenModels as the model marketplace behind Hermes.
- One
ale-...OpenModels API key for Hermes model calls. - OpenAI-compatible chat completions through
https://api.getopenmodels.com/v1. - Hermes features such as memory, skills, messaging platforms, web tools, and terminal execution on top of OpenModels-backed models.
Prerequisites
- Hermes Agent installed on the machine that will run the CLI, TUI, or gateway.
- An OpenModels API key in the
ale-...format. - Available credits in your OpenModels account.
- A supported OpenModels chat model with at least 64K context. Hermes rejects smaller context windows because multi-step tool workflows need enough working memory.
Good starting models:
1. Install Hermes
On Linux, macOS, WSL2, or Android Termux:
On Windows PowerShell:
Verify the install:
2. Store your OpenModels key
Hermes stores secrets in ~/.hermes/.env. Put the OpenModels key there:
Do not commit real ale-... keys to an application repository.
3. Configure OpenModels as a named custom provider
Hermes supports custom OpenAI-compatible endpoints. Use a named custom provider so the model reference is explicit and easy to switch later.
Edit ~/.hermes/config.yaml:
Notes:
base_urlis the OpenModels base URL.key_envpoints Hermes toOM_API_KEYin~/.hermes/.env.api_mode: chat_completionskeeps Hermes on the OpenAI-compatible chat completions path.context_lengthshould match or conservatively fit the selected model. Use the OpenModels Models page as the current source.
If you already have custom_providers or model config, merge these keys into the existing YAML instead of adding duplicate top-level keys.
4. Start Hermes with OpenModels
Start the CLI or TUI:
The startup banner should show the selected provider and model. Send a simple prompt that is easy to verify:
If Hermes responds normally and can use tools, the OpenModels-backed setup is working.
5. Switch models during a session
Use Hermes’ /model command to switch to another OpenModels model:
Switch back to the configured default:
Hermes writes model choices to ~/.hermes/config.yaml for new sessions. Existing chat sessions can keep the model they started with, so use /model when you want to switch inside the active session.
6. Add gateway or automation only after chat works
Once a normal CLI or TUI chat works, add the next Hermes layer:
Use hermes gateway setup for Telegram, Discord, Slack, WhatsApp, Email, Home Assistant, Microsoft Teams, and other messaging platforms. Keep model setup simple until the base chat is stable.
Use Hermes as an OpenAI-compatible endpoint
This is the reverse direction: another app calls Hermes, and Hermes runs its configured agent.
Hermes has an API server feature for OpenAI-compatible frontends. In that mode:
- The external app talks to Hermes’ API server URL.
- Hermes uses its configured provider, which can be OpenModels.
- The OpenModels key stays inside
~/.hermes/.env, not in the frontend app.
Keep these endpoints separate:
Do not expose a Hermes API server publicly without authentication, network controls, and a clear tool-permission model. Hermes can run terminal commands, access files, and use configured tools.