mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-25 00:51:20 +00:00
feat: API server model name derived from profile name (#6857)
* feat: API server model name derived from profile name For multi-user setups (e.g. OpenWebUI), each profile's API server now advertises a distinct model name on /v1/models: - Profile 'lucas' -> model ID 'lucas' - Profile 'admin' -> model ID 'admin' - Default profile -> 'hermes-agent' (unchanged) Explicit override via API_SERVER_MODEL_NAME env var or platforms.api_server.model_name config for custom names. Resolves friction where OpenWebUI couldn't distinguish multiple hermes-agent connections all advertising the same model name. * docs: multi-user setup with profiles for API server + Open WebUI - api-server.md: added Multi-User Setup section, API_SERVER_MODEL_NAME to config table, updated /v1/models description - open-webui.md: added Multi-User Setup with Profiles section with step-by-step guide, updated model name references - environment-variables.md: added API_SERVER_MODEL_NAME entry
This commit is contained in:
parent
2d0d05a337
commit
9634e20e15
7 changed files with 152 additions and 9 deletions
|
|
@ -60,7 +60,7 @@ docker run -d -p 3000:8080 \
|
|||
|
||||
### 4. Open the UI
|
||||
|
||||
Go to **http://localhost:3000**. Create your admin account (the first user becomes admin). You should see **hermes-agent** in the model dropdown. Start chatting!
|
||||
Go to **http://localhost:3000**. Create your admin account (the first user becomes admin). You should see your agent in the model dropdown (named after your profile, or **hermes-agent** for the default profile). Start chatting!
|
||||
|
||||
## Docker Compose Setup
|
||||
|
||||
|
|
@ -106,7 +106,7 @@ If you prefer to configure the connection through the UI instead of environment
|
|||
7. Click the **checkmark** to verify the connection
|
||||
8. **Save**
|
||||
|
||||
The **hermes-agent** model should now appear in the model dropdown.
|
||||
Your agent model should now appear in the model dropdown (named after your profile, or **hermes-agent** for the default profile).
|
||||
|
||||
:::warning
|
||||
Environment variables only take effect on Open WebUI's **first launch**. After that, connection settings are stored in its internal database. To change them later, use the Admin UI or delete the Docker volume and start fresh.
|
||||
|
|
@ -196,6 +196,49 @@ Hermes Agent may be executing multiple tool calls (reading files, running comman
|
|||
|
||||
Make sure your `OPENAI_API_KEY` in Open WebUI matches the `API_SERVER_KEY` in Hermes Agent.
|
||||
|
||||
## Multi-User Setup with Profiles
|
||||
|
||||
To run separate Hermes instances per user — each with their own config, memory, and skills — use [profiles](/docs/user-guide/features/profiles). Each profile runs its own API server on a different port and automatically advertises the profile name as the model in Open WebUI.
|
||||
|
||||
### 1. Create profiles and configure API servers
|
||||
|
||||
```bash
|
||||
hermes profile create alice
|
||||
hermes -p alice config set API_SERVER_ENABLED true
|
||||
hermes -p alice config set API_SERVER_PORT 8643
|
||||
hermes -p alice config set API_SERVER_KEY alice-secret
|
||||
|
||||
hermes profile create bob
|
||||
hermes -p bob config set API_SERVER_ENABLED true
|
||||
hermes -p bob config set API_SERVER_PORT 8644
|
||||
hermes -p bob config set API_SERVER_KEY bob-secret
|
||||
```
|
||||
|
||||
### 2. Start each gateway
|
||||
|
||||
```bash
|
||||
hermes -p alice gateway &
|
||||
hermes -p bob gateway &
|
||||
```
|
||||
|
||||
### 3. Add connections in Open WebUI
|
||||
|
||||
In **Admin Settings** → **Connections** → **OpenAI API** → **Manage**, add one connection per profile:
|
||||
|
||||
| Connection | URL | API Key |
|
||||
|-----------|-----|---------|
|
||||
| Alice | `http://host.docker.internal:8643/v1` | `alice-secret` |
|
||||
| Bob | `http://host.docker.internal:8644/v1` | `bob-secret` |
|
||||
|
||||
The model dropdown will show `alice` and `bob` as distinct models. You can assign models to Open WebUI users via the admin panel, giving each user their own isolated Hermes agent.
|
||||
|
||||
:::tip Custom Model Names
|
||||
The model name defaults to the profile name. To override it, set `API_SERVER_MODEL_NAME` in the profile's `.env`:
|
||||
```bash
|
||||
hermes -p alice config set API_SERVER_MODEL_NAME "Alice's Agent"
|
||||
```
|
||||
:::
|
||||
|
||||
## Linux Docker (no Docker Desktop)
|
||||
|
||||
On Linux without Docker Desktop, `host.docker.internal` doesn't resolve by default. Options:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue