~/.hermes/config.yaml. Hermes then sends its requests to the NagaAI Responses API and uses any NagaAI chat model by its catalog id. The setup follows the Hermes custom provider docs for Hermes Agent v0.22.5.
Before you start
You need a NagaAI API key and Hermes Agent installed. On Linux, macOS or WSL2, the official installer sets it up:Connect Hermes Agent
1
Save the key
Hermes reads secrets from the environment and from
~/.hermes/.env. Add the key there, so every Hermes session finds it:2
Add the provider
Add a
nagaai entry under providers in ~/.hermes/config.yaml, and make it the default model:transport: codex_responses is Hermes’s name for the Responses API, so Hermes calls POST /v1/responses. key_env names the variable that holds the key, so the key itself stays out of the config file.3
Set the context windows
Give each model you use a
context_length, taken from limits.context_window of the model’s chat operation in /v1/models. Hermes decides when to compress the conversation from this number. Without it, Hermes guesses the window from public model data.4
Check the connection
Send one question and exit:The answer comes from
claude-sonnet-5 on NagaAI. Inside a session, /model custom:nagaai:deepseek-v4.1-flash switches to another model from the list.Troubleshooting
401 invalid_api_key
Hermes found no key or a wrong one. Check that~/.hermes/.env holds NAGA_API_KEY with an API key, not a provisioning key, and start a new session.
400 model_not_found
The model id inmodel.default or in /model isn’t in the catalog. Copy the id from naga.ac/models.
Hermes compresses the conversation too early
The model has nocontext_length under providers.nagaai.models, and Hermes guessed a smaller window than the model has. Add the model’s window from /v1/models.