Coding tools
Hermes Agent
Add Deference to Hermes Agent as a named provider in config.yaml.
Hermes Agent, from Nous Research, talks to custom endpoints in three formats: Chat Completions, Anthropic Messages and Responses. This guide uses Chat Completions with the base URL https://deference.si/v1.
Set up
- Create a key in API keys.
- Add the key to
~/.hermes/.env. Hermes reads secrets from this file, not fromconfig.yaml.
DEFERENCE_API_KEY=sk-df-...- Add the provider and make it the default model in
~/.hermes/config.yaml.
providers:
deference:
api: https://deference.si/v1
key_env: DEFERENCE_API_KEY
transport: chat_completions
models:
"anthropic/claude-sonnet-5.5":
context_length: 200000
model:
default: anthropic/claude-sonnet-5.5
provider: custom:deferenceRun hermes config path and hermes config env-path to print where Hermes keeps these two files on your system.
To set it up by prompts instead, run hermes model and choose Custom endpoint. It asks for the base URL, the key and the model, and for the API format.
Verify
- Run
hermes doctor. It exits cleanly when nothing needs fixing. - Run
hermes status. It shows the model and provider, and that credentials are present, without printing the key. - Start
hermesand send a short message. - Open Activity. The request is the top row, with the model you chose.
Pick a model
- Hermes needs a context window of at least 64K tokens and refuses smaller ones at startup. List only models that meet it, and set
context_lengthfor each, because Hermes does not read it fromGET /v1/models. - Switch models in a session with
/model custom:deference:anthropic/claude-sonnet-5.5. Add--globalto keep the choice. transportcan also beanthropic_messagesorcodex_responses. Foranthropic_messages, the base URL ishttps://deference.si, without/v1. Settransportexplicitly: Hermes otherwise guesses it from the URL.
Troubleshooting
| You see | Cause | Fix |
|---|---|---|
401 invalid_api_key | The key is not in ~/.hermes/.env, or the name differs from key_env | Match the names, then run /reload or restart Hermes |
| 401 with a placeholder key | The setting is spelled api_key_env, and Hermes expects key_env | Rename it to key_env |
| "context window below minimum 64,000" | context_length is missing or under 64K | Set it, and use a model with at least 64K |
OPENAI_BASE_URL has no effect | Hermes honors it only for the openai-api provider | Use the providers block above |
404 model_not_found | The id differs from the catalog | Copy the id from the Models page |
402 insufficient_credit | No available credit | Add credit |