Integration guide
Hermes Agent
Hermes Agent from Nous Research runs in your terminal and in your messaging apps, learns skills as it works, and takes any OpenAI-compatible endpoint as its model. This guide makes legit2compute that endpoint with Hermes' own setup wizard, gives Hermes our media skill so it can render images, music, voice and video on the network, and lets you chat with it in Discord, or privately on your own Matrix server.
qwen3.8:27b has both (128K context). Any model in the table below works.1. Install Hermes
Follow the install for your platform in the Hermes README. On Linux, macOS or WSL2 it is one line:
curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash
2. Get a key
Sign in at legit2compute.com/developers and copy your l2ck_ key. Signing in with Discord includes trial credit.
3. Point Hermes at legit2compute
Hermes' model wizard does this in a minute. It is the same model step the first-run hermes setup walks you through; on its own it is:
hermes model
- Choose Custom endpoint (enter URL manually). It is near the bottom of the list, and the list wraps, so press ↑ a few times from the top.
- API base URL:
https://api.legit2compute.com/nodes/llm/v1(the whole address: Hermes looks for the model list at it plus/models). - API key: your
l2ck_key. Hermes checks the endpoint and lists every model your key can call. - API compatibility mode: press Enter to keep auto-detect.
- Select model: type
qwen3.8:27b, or its number in the list. - Context length: press Enter. Hermes reads it from our catalog (128K).
- Display name:
legit2compute. Then pick a reasoning effort; Enter keeps the default.
Hermes saves the key to ~/.hermes/.env and the endpoint to config.yaml. Check it end to end, then start a session with hermes:
hermes chat --oneshot -q "Reply with exactly one word: hello"
Setting it up from a script instead
The same settings without prompts, for a provisioning script or a container:
hermes config set model.provider custom hermes config set model.default "qwen3.8:27b" hermes config set model.base_url "https://api.legit2compute.com/nodes/llm/v1" hermes config set model.api_key "l2ck_..." hermes config set model.context_length 131072
Editing config.yaml by hand? Change the keys inside the model: section it already has. A second model: block pasted at the end would replace the first.
4. Give Hermes the media skill
Hermes reads skills that follow the Agent Skills standard from ~/.hermes/skills. Ours is one download:
mkdir -p ~/.hermes/skills/media curl -fsSL -o /tmp/legit2cloud-skill.zip https://legit2compute.com/developers/skill.zip unzip -o /tmp/legit2cloud-skill.zip -d ~/.hermes/skills/media/ echo 'L2C_API_KEY=l2ck_...' >> ~/.hermes/.env
The skill runs a small Python CLI through Hermes' terminal tool, which strips secrets from its environment unless you pass them through:
hermes config set terminal.env_passthrough '["L2C_API_KEY"]' hermes config set terminal.timeout 600
The second line gives the terminal tool ten minutes instead of three: a render waits on a GPU and can take a few minutes, and the skill waits for the finished file.
Check that Hermes sees it (hermes skills list shows legit2cloud under media), then ask:
hermes chat --oneshot -q "Use the legit2cloud skill to list the models my key can call"
Or ask for something real: "make a 30-second lo-fi intro for my podcast and a square cover image for it". Hermes loads the skill, submits both jobs, waits, and saves the files. Each render is billed to the same key.
5. Put it in your Discord
Hermes' messaging gateway turns the same agent into a Discord bot: DM it, or @mention it in your server, and it answers with everything above, including the media it makes. This is how we run our own.
- In the Discord Developer Portal, create an application, open Bot, and turn on the Message Content and Server Members privileged intents. Without Message Content, Discord refuses the connection.
- Reset and copy the bot token (it is shown once). Copy your own Discord user ID too (Settings → Advanced → Developer Mode, then right-click your name).
- Run the wizard, pick Discord, and paste the token. It checks the intents, prints the invite link and offers to allowlist you:
hermes gateway setup
Or set it by hand in ~/.hermes/.env, then start the gateway:
DISCORD_BOT_TOKEN=your-bot-token DISCORD_ALLOWED_USERS=your-discord-user-id
hermes gateway
In server channels the bot answers when @mentioned; in DMs it answers everything. Each person gets their own conversation.
DISCORD_ALLOWED_USERS (or DISCORD_ALLOWED_ROLES) gets the agent's full abilities, including running commands on the machine Hermes runs on, and spends your credit. Keep DISCORD_ALLOW_ALL_USERS off outside a private server.qwen3.8:27b. The $1 trial credit that comes with a Discord sign-up covers roughly 350 replies at that rate.6. Or keep it private: your own Matrix server
Discord is the quickest way to try a chat bot. For a private assistant you keep, talk to Hermes on Matrix instead: run your own homeserver, and the conversation is end-to-end encrypted between your phone or laptop and the machine Hermes runs on. Nothing passes through a chat company. The only thing that leaves your machines is the model request, and we keep only its metadata (model, tokens, timing), never the prompt or the reply.
- Run a homeserver (Synapse, Conduit or Dendrite; Hermes works with any), or start on matrix.org while you try it.
- Create a Matrix user for the bot, such as
@hermes:your-server.org(on Synapse:register_new_matrix_user), and get its access token: sign in to Element as the bot, then Settings → Help & About → Advanced. - Run the gateway wizard, pick Matrix, and give it the homeserver URL, the bot's token and your own Matrix ID:
hermes gateway setup
Or set it by hand in ~/.hermes/.env, then start the gateway and send the bot a direct message:
MATRIX_HOMESERVER=https://matrix.your-server.org MATRIX_ACCESS_TOKEN=the-bot-access-token MATRIX_ALLOWED_USERS=@you:your-server.org MATRIX_E2EE_MODE=required
hermes gateway
In a direct message Hermes answers everything; in a room it answers when @mentioned. MATRIX_E2EE_MODE=required makes Hermes refuse to start rather than fall back to unencrypted messages. Encryption needs libolm on the Hermes machine (sudo apt install libolm-dev on Debian and Ubuntu) and runs on Linux; Hermes' Matrix guide covers the rest, including cross-signing so Element trusts the bot, and running it from macOS or Windows.
MATRIX_ALLOWED_USERS decides who can drive the agent; add MATRIX_ALLOWED_ROOMS if the bot sits in shared rooms. Without them, anyone who can reach the bot can run commands on its machine and spend your credit.Models that suit Hermes
| Model ID | Context | Takes images | $ / 1M in · out · cached | Now |
|---|---|---|---|---|
llama3.1Llama 3.1 8B |
128K | — | $0.016 · $0.032 · $0.008 | resident |
ornith-1.5:9bOrnith 1.5 9B (vision, 256K) |
256K | yes | $0.050 · $0.080 · $0.020 | resident |
ornith-1.5:35bOrnith 1.5 35B (vision, 256K) |
256K | yes | $0.18 · $0.30 · $0.050 | on demand |
qwen3.8:27bQwen3.8 27B (vision + text) |
128K | yes | $0.12 · $1.50 · $0.030 | resident |
llama3.1:70bLlama 3.1 70B |
128K | — | $0.32 · $0.32 · $0.10 | on demand |
deepseek-ocr:3bDeepSeek-OCR 3B |
128K | yes | $0.040 · $0.060 · $0.020 | on demand |
granite4.1:3bGranite 4.1 3B (text) |
128K | — | $0.040 · $0.060 · $0.020 | on demand |
Tool calling and at least 64K context, from the live catalog. A model that is not resident answers 503 with "warming": true for a minute or two while it starts; the resident ones answer straight away.
Troubleshooting
- 401: the key is missing or wrong. Hermes sends it as
Authorization: Bearer, which we accept, as well asx-api-key. - 503 with
"warming": true: the model is being loaded. Wait a minute and retry, or pick a model marked resident above. - 402: out of credit. Top up at /developers.
- 404
model_not_found: the model ID is not one we offer, usually a typo (qwen3.8-27bforqwen3.8:27b).hermes modellists the exact IDs. - The base URL ends in
/v1, with nothing after it. Hermes adds/chat/completionsitself. - "Could not verify this endpoint" in the wizard: the base URL is incomplete. Use the whole address,
https://api.legit2compute.com/nodes/llm/v1, not just the hostname. - Per-request spend and tokens are on your activity page.