This tutorial walks you through connecting Hermes Agent to third-party AI models on OpenAI Hub from scratch — with zero coding required. Just follow along, copy, and paste the commands, and you’re good to go.
Prerequisites
You’ll need two things:
- A computer (macOS, Linux, or Windows)
- An OpenAI Hub API Key — register at openai-hub.com and get your key from the dashboard
OpenAI Hub is an AI model aggregation platform. With a single Key, you can access almost all mainstream models (Claude, GPT, Gemini, DeepSeek, etc.) without having to register multiple accounts.
Step 1: Install Hermes Agent
Open your computer’s terminal (called “Terminal” on macOS, search “PowerShell” on Windows).
For macOS / Linux users, paste and run:
curl -fsSL https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.sh | bash
For Windows users, open PowerShell (right-click and run as Administrator), then paste:
irm https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.ps1 | iex
The script automatically installs Python, Node.js, and all dependencies; just wait for it to finish.
After installation on macOS / Linux, run an extra command to activate:
source ~/.zshrc
Note: If a security prompt appears during Windows installation, simply click “Allow.” The installation takes roughly 3–5 minutes depending on your network speed.
Step 2: Configure OpenAI Hub as the model provider
This is the most important step. The design of Hermes Agent is smart—it can connect to any API compatible with the OpenAI format. OpenAI Hub matches this perfectly.
In your terminal, enter:
hermes config
After entering the configuration wizard, go to AI Provider options and fill in the following:
| Setting | Value |
|---|---|
| Provider type | Choose OpenAI or OpenAI Compatible |
| API Key | sk-your-api-key (replace with your own OpenAI Hub key) |
| Base URL | https://api.openai-hub.com/v1 |
Common mistake: Don’t omit the
/v1at the end of the Base URL — missing this often causes request errors. Also, make sure there are no extra spaces before or after the API Key.
If the wizard doesn’t provide a field for Base URL, you can manually edit the config file. The config file locations are:
- macOS / Linux:
~/.hermes/config.yaml - Windows:
%USERPROFILE%\.hermes\config.yaml
Open it with any text editor and make sure it looks like this:
provider:
type: openai
api_key: sk-your-api-key
base_url: https://api.openai-hub.com/v1
model: gpt-4o
The model field specifies which model you want to use. OpenAI Hub supports many models, such as:
gpt-4o— OpenAI’s newest multimodal modelclaude-sonnet-4-20250514— Anthropic Claudedeepseek-chat— DeepSeekgemini-2.5-pro-preview-05-06— Google Gemini
You can check the full list of supported models in your OpenAI Hub dashboard.
Step 3: Choose a model and start chatting
Once configured, run the following in your terminal:
hermes model
This command lets you confirm or switch the currently used model. Once the model name shows correctly, start chatting:
hermes
Seeing the chat interface means everything is working — you’ve successfully connected Hermes Agent to a third-party model via OpenAI Hub.
Note: If the model name shows incorrectly or not at all after booting, type
/modelin the chat interface to manually set the model name. This is a known minor issue; manual selection fixes it.
Step 4 (Optional): Connect to a chat platform
Hermes Agent isn’t limited to the terminal — you can also connect it to Feishu, Telegram, and more to create your personal AI assistant.
For Feishu, open a new terminal window and run:
hermes gateway setup
Select Feishu, then enter the App ID and App Secret of the bot app you created in the Feishu Open Platform.
Potential issue (Windows users): If you get a
lark-oapimissing error when starting the gateway, you need to install the dependency inside Hermes’s built‑in virtual environment, not your system Python. Locate the Hermes venv path and run:<hermes-venv-path>/bin/pip install lark-oapi
Quick Troubleshooting
Q: Error 401 Unauthorized
Check whether your API Key is correct, ensure there are no extra spaces, and confirm your OpenAI Hub account still has balance.
Q: Error 404 Not Found
Most likely the Base URL is incorrect. Make sure it’s https://api.openai-hub.com/v1, including https and /v1 at the end.
Q: Error model not found
The model name you entered doesn’t exist on OpenAI Hub. Verify the exact model name in your dashboard, paying attention to capitalization.
Q: How can I switch models?
You can type /model in chat, rerun hermes model, or just edit the model field in the config file. Since you’re using OpenAI Hub, switching models doesn’t require a new Key — just change the name.
Next, try using the /skill command to create custom skills so the Agent can automatically handle repetitive tasks. Or experiment with switching different models in the OpenAI Hub dashboard to compare performance — one Key handles them all, so test a few and find the one that fits you best.
