Hermes Agent
Connect Hermes Agent through a custom endpoint.
Hermes Agent is an open-source command-line assistant from Nous Research. Connect it to this site as a custom endpoint.
- Protocol: OpenAI-compatible (Chat Completions)
- Base URL:
https://tokenfunc.com/v1 - Models: models with 64K+ context, for example
claude-sonnet-4-5
Install Hermes
macOS / Linux
curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bashWindows
iex (irm https://hermes-agent.nousresearch.com/install.ps1)Run the setup wizard
hermes modelChoose Custom endpoint and answer the prompts:
Prompt Value Base URL https://tokenfunc.com/v1API key sk-xxxxxxxxxxxxxxxxModel claude-sonnet-4-5API mode chat_completionsContext length The model's context length, for example 200000Hermes requires at least 64K of context. This site does not report context length, so enter it yourself.
Screenshot pendingThe Custom endpoint screen of the hermes model wizardtools/hermes-wizard.png
Verify
hermes chat -q "reply ok" --oneshotA reply means you are connected.
hermes doctoralso checks the configuration.
Configuring with a file
Instead of the wizard you can edit the config file and keep the key in a .env file next to it:
macOS / Linux
~/.hermes/config.yaml
model:
default: claude-sonnet-4-5
provider: custom
base_url: https://tokenfunc.com/v1
key_env: TOKENFUNC_API_KEY~/.hermes/.env
TOKENFUNC_API_KEY=sk-xxxxxxxxxxxxxxxxWindows
%LOCALAPPDATA%\hermes\config.yaml
model:
default: claude-sonnet-4-5
provider: custom
base_url: https://tokenfunc.com/v1
key_env: TOKENFUNC_API_KEY%LOCALAPPDATA%\hermes.env
TOKENFUNC_API_KEY=sk-xxxxxxxxxxxxxxxxSwitching models
In a session type /model custom:<model name>, for example /model custom:claude-sonnet-4-5. To add another endpoint, leave the session and run hermes model again.
Troubleshooting
| Symptom | Cause and fix |
|---|---|
OPENAI_BASE_URL is set but ignored | It now only applies to the official OpenAI provider. Use the wizard or config.yaml |
| Not enough context at startup | The model has less than 64K context. Pick a longer-context model or enter the right length in the wizard |
| Connects but replies are garbled or fail | Wrong address or model name. Make sure the address ends with /v1 and the name matches the Model Square |
| 401 | Wrong key or no quota left. Check it on API Keys |