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.

Base URL (OpenAI-compatible)
https://api.legit2compute.com/nodes/llm/v1
API key
l2ck_… from /developers
Recommended model
qwen3.8:27b
Context window
131,072 tokens
Sign in and the snippets on this page fill in your own key.
What Hermes needs from a model: native tool calling and at least 64K tokens of context. 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:

shell
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:

shell
hermes model
  1. 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.
  2. API base URL: https://api.legit2compute.com/nodes/llm/v1 (the whole address: Hermes looks for the model list at it plus /models).
  3. API key: your l2ck_ key. Hermes checks the endpoint and lists every model your key can call.
  4. API compatibility mode: press Enter to keep auto-detect.
  5. Select model: type qwen3.8:27b, or its number in the list.
  6. Context length: press Enter. Hermes reads it from our catalog (128K).
  7. 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:

shell
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:

shell
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:

shell
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:

shell
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:

shell
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.

  1. 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.
  2. 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).
  3. Run the wizard, pick Discord, and paste the token. It checks the intents, prints the invite link and offers to allowlist you:
shell
hermes gateway setup

Or set it by hand in ~/.hermes/.env, then start the gateway:

~/.hermes/.env
DISCORD_BOT_TOKEN=your-bot-token
DISCORD_ALLOWED_USERS=your-discord-user-id
shell
hermes gateway

In server channels the bot answers when @mentioned; in DMs it answers everything. Each person gets their own conversation.

Only allowlist people you trust. Everyone in 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.
What it costs. Measured on our own Hermes Discord bot on 7 October 2026: 118 replies in six hours, prompts averaging 43K tokens with 85% of them served from the prompt cache, $0.31 in total, about a quarter of a cent per reply on 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.

  1. Run a homeserver (Synapse, Conduit or Dendrite; Hermes works with any), or start on matrix.org while you try it.
  2. 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.
  3. Run the gateway wizard, pick Matrix, and give it the homeserver URL, the bot's token and your own Matrix ID:
shell
hermes gateway setup

Or set it by hand in ~/.hermes/.env, then start the gateway and send the bot a direct message:

~/.hermes/.env
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
shell
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.

Set the allowlists. 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 IDContextTakes images$ / 1M in · out · cachedNow
llama3.1
Llama 3.1 8B
128K— $0.016 · $0.032 · $0.008 resident
ornith-1.5:9b
Ornith 1.5 9B (vision, 256K)
256Kyes $0.050 · $0.080 · $0.020 resident
ornith-1.5:35b
Ornith 1.5 35B (vision, 256K)
256Kyes $0.18 · $0.30 · $0.050 on demand
qwen3.8:27b
Qwen3.8 27B (vision + text)
128Kyes $0.12 · $1.50 · $0.030 resident
llama3.1:70b
Llama 3.1 70B
128K— $0.32 · $0.32 · $0.10 on demand
deepseek-ocr:3b
DeepSeek-OCR 3B
128Kyes $0.040 · $0.060 · $0.020 on demand
granite4.1:3b
Granite 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 as x-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-27b for qwen3.8:27b). hermes model lists the exact IDs.
  • The base URL ends in /v1, with nothing after it. Hermes adds /chat/completions itself.
  • "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.