Hermes Agent Integration
Point Hermes Agent (Nous Research) at QCode.cc through custom providers in config.yaml: the three transport values, keys in .env, and switching models mid-session
On This Page
Last verified: 2026-09-18 · 📄 Per official docs (Hermes Agent v0.21.3 / tag v2026.9.14, released 2026-09-14)
At a glance¶
| Item | Details |
|---|---|
| Models you can use | Claude ✅ (Anthropic protocol) · GPT ✅ · Chinese models ✅ · Gemini ❌ (no Gemini adapter in the official transport enum) |
| Protocol & Base URL | Anthropic: https://api.qcode.cc/api · OpenAI: https://api.qcode.cc/openai/v1 |
| Where to configure | ~/.hermes/config.yaml (keys live in ~/.hermes/.env); native Windows installs under %LOCALAPPDATA%\hermes |
| Official docs | Providers |
Hermes Agent is a general-purpose AI agent built by Nous Research (it learns skills from experience): a terminal TUI plus a multi-channel gateway for Telegram / Discord / Slack / CLI. It is not a code editor — though it can act as an ACP server behind ACP-compatible editors (see ACP Overview). All model endpoints live in its own config.yaml, independent of any host editor.
Prerequisites¶
- Hermes Agent installed (follow the official README; this page does not duplicate install commands).
- A QCode.cc
cr_key (dashboard). No Nous Portal or model-vendor account is needed. - Know the division of labour: secrets go to
~/.hermes/.env, behaviour settings toconfig.yaml.config.yamlis the single source of truth for model and endpoint — the legacyLLM_MODELenv var has been removed upstream.
Setup¶
Route A: named providers (recommended; Claude and GPT/Chinese side by side)¶
In ~/.hermes/config.yaml:
# ~/.hermes/config.yaml
model:
provider: custom:qcode_claude
default: claude-sonnet-5
providers:
qcode_claude:
api: https://api.qcode.cc/api
key_env: QCODE_API_KEY
transport: anthropic_messages
default_model: claude-sonnet-5
discover_models: false
qcode_openai:
api: https://api.qcode.cc/openai/v1
key_env: QCODE_API_KEY
transport: chat_completions
default_model: glm-5.3
Then put the key in ~/.hermes/.env:
# ~/.hermes/.env
QCODE_API_KEY=cr_your-QCode-key
Key points (all from the official providers doc):
transporthas exactly three canonical values:chat_completions/anthropic_messages/codex_responses(lowercase, underscores). Claude models on QCode must useanthropic_messages.- The URL key in each provider entry is
apiin official examples (base_url/urlare accepted aliases); the protocol key istransport(api_modeis the alias). key_envnames an environment variable (no$); its value lives in.env.- Hermes auto-detects the transport only when a provider URL ends in
/anthropic;api.qcode.cc/apidoes not trigger detection, sotransportmust be written explicitly.
Route B: single endpoint (OpenAI-compatible leg only)¶
To get GPT / Chinese models running first, use the flat official form (provider: custom = any OpenAI-compatible endpoint):
model:
provider: custom
base_url: https://api.qcode.cc/openai/v1
api_key: cr_your-QCode-key
default: gpt-5.6
Switching models mid-session¶
/model custom:qcode_claude:<model-id>
/model custom:qcode_openai:<model-id>
<model-id> is any model ID you declared for that provider (Claude leg e.g. claude-sonnet-5, OpenAI leg e.g. glm-5.3).
Official division of duties: /model only switches between providers and models you have already configured; adding a provider requires exiting the session and running the hermes model wizard.
Verify it works¶
Start hermes and ask anything. If it fails, check in order:
- Does the path and key arrive (OpenAI leg):
curl -s -o /dev/null -w '%{http_code}\n' -X POST https://api.qcode.cc/openai/v1/chat/completions \
-H "Authorization: Bearer $QCODE_API_KEY"
# → 401 = key invalid; 400 = path fine (missing body is expected)
- YAML indentation of the
providers:entries (two spaces, siblings). key_envnames match.envexactly.- Every request is logged at probe.qcode.cc; still stuck? Use the troubleshooting guide.
Known limitations¶
- Anthropic leg not live-tested: every official
anthropic_messagesexample uses a host+prefix URL without/v1(e.g.https://proxy.example.com/anthropic), so this page useshttps://api.qcode.cc/api; how Hermes builds the final path has not been verified by us. If requests return 404, setapito the full pathhttps://api.qcode.cc/api/v1/messagesinstead. discover_models: false: Hermes probes<base>/modelson custom endpoints. That path exists on the QCode OpenAI leg, but/api/modelsdoes not (404, tested) — disable discovery on the Claude entry as shown and name models viadefault_model/models.- Do not route Chinese models through
codex_responses— the QCode Responses leg serves GPT models only (matrix: Endpoints and API paths). - No Gemini support: the official transport enum has no Gemini adapter, so
gemini-*models are unavailable. OPENAI_BASE_URLwill not point QCode anywhere: the docs state it is honoured only for theopenai-apiprovider. Useconfig.yaml.- Output-token caps are not configurable: upstream stopped reading
model.max_tokensand friends, so old tutorials are stale.