Hermes Agent

Hermes works with any endpoint that implements /v1/chat/completions. Register Foglare as a custom endpoint with the hermes model wizard or directly in config.yaml.

Prerequisites

  • Hermes Agent installed (hermes on your PATH).
  • Optional: a Foglare API key (sk-fog-…) from the dashboard for per-key usage stats. Without one, leave the key empty or use a placeholder; calls run anonymously.
  • A model id: auto:fast to start, or any id from GET /v1/models.

Configuration

Run the wizard from your terminal, outside any chat session. It saves the endpoint to ~/.hermes/config.yaml:

Interactive setup

hermes model
# Select "Custom endpoint (self-hosted / VLLM / etc.)"
# API base URL: https://api.foglare.com/v1
# API key: your sk-fog-... key from the dashboard (required)
# Model name: auto:fast

Or write the same thing by hand. The base URL includes /v1; Hermes appends /chat/completions.

~/.hermes/config.yaml

# ~/.hermes/config.yaml
model:
  default: auto:fast
  provider: custom
  base_url: https://api.foglare.com/v1
  api_key: sk-fog-YOUR_KEY
  # key_env: FOGLARE_API_KEY   # read the key from an env var instead
Key Value Why
model.providercustomSelects the custom endpoint path.
model.base_urlhttps://api.foglare.com/v1Versioned root.
model.defaultauto:fastFoglare model id, sent verbatim.
model.api_keysk-fog-YOUR_KEYYour Foglare key; key_env names an env var instead. Required for inference.

Inside a session, /model switches between configured models:

In-session switch

/model custom:auto:L

Config format verified against the Hermes Agent provider documentation. OPENAI_BASE_URL in ~/.hermes/.env only applies to the built-in openai-api provider, not to custom endpoints; use config.yaml as above.

Verify

Check the endpoint from your shell first: chunk lines ending in data: [DONE]. Then start a Hermes session and send a message.

curl the chat endpoint

curl -N https://api.foglare.com/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer sk-fog-YOUR_KEY" \
  -d '{"model":"auto:fast","stream":true,"messages":[{"role":"user","content":"Hello"}]}'

Expected stream (trimmed)

data: {"id":"fglr_...","object":"chat.completion.chunk","created":1795312786,"model":"auto:fast","choices":[{"index":0,"delta":{"content":"Hello"},"finish_reason":null}]}

data: {"id":"fglr_...","object":"chat.completion.chunk","created":1795312786,"model":"auto:fast","choices":[{"index":0,"delta":{"content":"! How can I help?"},"finish_reason":null}]}

data: {"id":"fglr_...","object":"chat.completion.chunk","created":1795312786,"model":"auto:fast","choices":[{"index":0,"delta":{"content":" Today?"},"finish_reason":null}]}

data: {"id":"fglr_...","object":"chat.completion.chunk","created":1795312786,"model":"auto:fast","choices":[{"index":0,"delta":{"content":""},"finish_reason":"stop"}]}

data: [DONE]

List accepted model ids (trimmed response)

curl https://api.foglare.com/v1/models

{
  "object": "list",
  "data": [
    { "id": "deepseek-v4.1-flash", "object": "model", "created": 1763769600, "owned_by": "foglare" },
    { "id": "qwen4-max", "object": "model", "created": 1763769600, "owned_by": "foglare" },
    { "id": "auto:fast", "object": "model", "created": 1763769600, "owned_by": "foglare" }
  ]
}

Troubleshooting

Symptom Fix
404, model not found The model id is not in the catalog. List accepted ids with GET /v1/models. Tier ids are auto:fast, auto:S, auto:M, auto:L, auto:XL; direct ids carry no suffix.
404 on the endpoint path The base URL is wrong for this tool. Check whether it expects the root (https://api.foglare.com) or the versioned root (https://api.foglare.com/v1); the configuration table above says which.
503, capacity exhausted All upstream routes are busy or rate-limited. The error message says when to retry. Retry after that window, or switch to a routing tier so the gateway picks healthy capacity.
Output arrives all at once, or the stream hangs Something between you and the gateway is buffering SSE. Use curl -N, disable proxy buffering (nginx: proxy_buffering off), and read the response as a stream instead of waiting for the full body.
Endpoint settings ignored config.yaml is the source of truth. Legacy .env entries such as LLM_MODEL are removed on migration, and OPENAI_BASE_URL only affects the openai-api provider. Set model.base_url in config.yaml.
/model cannot add Foglare /model only switches between configured providers. Exit the session and run hermes model in the terminal to add the custom endpoint first.
Auxiliary tasks fail Vision, compression and titles default to your main chat model, so they follow the custom endpoint too. If you overrode auxiliary.*.provider, point those at Foglare or back to auto.