Skip to Content
ModelWorks logoModelWorks
AdaptorsOpenAI SSE Adaptor

Connect Hermes

Route the NousResearch Hermes agent to any ModelWorks circuit as a model provider via the OpenAI SSE adaptor.

Connect Hermes to ModelWorks

Hermes is a function-calling AI agent by Nous Research with 266K+ GitHub stars. This guide shows you how to connect Hermes to any circuit on ModelWorks as a model provider.

Prerequisites

Step 1: Get your adaptor URL

Every circuit with an OpenAI SSE adaptor exposes a URL like:

Text
https://modelworks.ai/api/circuit-adaptors/ca-xxxxxxxxxxxxxxxxx/query

Find it on the circuit page under Adaptors → OpenAI SSE.

Step 2: Configure Hermes

Hermes uses environment variables or a config.yaml to connect to model providers. Point it at your ModelWorks OpenAI SSE adaptor:

Environment variables

Bash
export MODELWORKS_ADAPTOR_URL="https://modelworks.ai/api/circuit-adaptors/ca-xxxxxxxxx/query"
export MODELWORKS_API_KEY="mw_YOUR_API_KEY"

Config file

Add to your Hermes config.yaml:

YAML
model:
  provider: modelworks
  base_url: https://modelworks.ai/api/circuit-adaptors/ca-xxxxxxxxx/query
  api_key: mw_YOUR_API_KEY
  model: glm-53-abliterated

Direct OpenAI-compatible connection

Hermes can also connect through the OpenAI-compatible interface by setting the base URL and API key:

Python
from hermes import Hermes

agent = Hermes(
    base_url="https://modelworks.ai/api/circuit-adaptors/ca-xxxxxxxxx/query",
    api_key="mw_YOUR_API_KEY",
    model="glm-53-abliterated"
)

Step 3: Run your first circuit

Start Hermes and send a prompt:

Bash
hermes chat

The circuit runs on ModelWorks and the response streams back to your Hermes agent.

Troubleshooting

IssueFix
401 UnauthorizedYour API key expired. Generate a new one from Settings → Security Tokens.
402 Payment RequiredYour wallet needs credits. Fund it at modelworks.ai/settings/wallet.
Connection refusedVerify the adaptor URL — it must be the full https://...query path.
Empty responseCheck that the circuit version is RUNNING (not STAGING).
On this page

On this page

© 2026 ModelWorks. All rights reserved.