Use TokenRex with Hermes Agent
Connect Nous Research's Hermes Agent to TokenRex through a custom OpenAI-compatible endpoint.
Custom-provider setup is documented in the linked official sources. A live TokenRex connection from this tool has not been tested. Screenshots illustrate the publisher's interface, not a verified TokenRex session.
Before you start
- Hermes Agent installed on Linux, macOS or Windows with WSL2
- A TokenRex API key
- An enabled chat model with tool calling and enough context for agent tasks
Setup methods
Hermes Agent — terminal setup
- 1
Install Hermes Agent using the official installation guide for your operating system. Review installer commands before running them.
- 2
Create a TokenRex API key and copy an exact enabled chat model ID from Models & Pricing. Replace the example ID with your selected model. Use verified context/output limits and a streaming, tool-capable model for agent tasks.
- 3
Outside an active conversation, run hermes model. Choose Custom endpoint (self-hosted / VLLM / etc.). The in-chat /model command switches configured models; it does not add credentials or a new endpoint.
- 4
Enter https://tokenrex.ai/api/public/v1 as the API base, your private key and the exact model ID. Select Chat Completions when the API-mode selector is available. Do not append /chat/completions to the base.
- 5
Start hermes in an authorized project folder and send a short read-only question.
- 6
Send a short read-only question and confirm the exact model in TokenRex usage. Test streaming and tool calls separately before allowing file, terminal or connected-account actions.
Hermes Agent — private configuration
- 1
Set TOKENREX_API_KEY privately in the environment that launches the app. Never share keys in screenshots, project files or exported configuration.
- 2
Merge the model block below into ~/.hermes/config.yaml, preserving existing tool, memory and gateway settings. key_env points to the private environment variable instead of embedding a key.
- 3
Restart Hermes, check the selected endpoint/model and test a short conversation. OPENAI_BASE_URL belongs to the built-in openai-api provider; use model.base_url for a custom endpoint.
# Merge into ~/.hermes/config.yaml
model:
provider: custom
default: gpt-6-astra
base_url: https://tokenrex.ai/api/public/v1
key_env: TOKENREX_API_KEY
# Set TOKENREX_API_KEY in ~/.hermes/.env (private) or the launch environment.Hermes Agent Web UI — switch an already configured model
This is Hermes Agent's Web UI, not Hermes Desktop. Configure your custom endpoint with the terminal or private configuration method first.
- 1
Open the Hermes Agent Web UI following its official dashboard instructions. Open Models and find Main Model.

Official Hermes Agent Web UI Models page, not Hermes Desktop provider settings. Official source - 1Open Models in the sidebar.
- 2Choose Change beside Main Model.
- 2
Choose Change, then select the provider and exact model you already configured. Save the selection and start a new session; the pictured provider/model list is the publisher's example, not TokenRex's catalog.

Official picker for already configured providers. This does not illustrate adding a custom endpoint or entering credentials. Official source - 1Select your configured provider and exact model.
- 2Use Switch and start a new session.
- 3
Send a short read-only question and confirm the exact model in TokenRex usage. Test streaming and tool calls separately before allowing file, terminal or connected-account actions.
Troubleshooting
- The in-chat model picker cannot add my endpoint
- Exit the conversation and run hermes model for full provider setup. /model only switches providers and models already configured.
- Hermes uses an old endpoint
- Check the active profile and model.base_url in its config.yaml. Remove conflicting stale settings only after checking which provider they belong to.
- Authentication fails
- Check that the saved TokenRex key is active and belongs in the tool's API-key field, not its subscription sign-in. Remove accidental spaces, check your wallet balance, and never share the key in screenshots or exported settings.
- The model is missing or the request URL returns 404
- Copy an exact enabled model ID from Models & Pricing. Follow this method's URL field: some tools expect the versioned base, others the root or full completion address. Check the documented API protocol before changing the path.
- Chat works but streaming or tools fail
- Test a short plain-text conversation first. Confirm the selected model and installed tool version support the required protocol and capabilities. Enable agent actions only after separately checking streaming and tool calls.
Further references
Verify the connection
Send a short message with the selected model, read its response, then confirm the exact model appears in your TokenRex usage. Test streaming and tool use separately before larger agent tasks.