> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tensormesh.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Hermes Agent on Tensormesh

> Drive open-weight models with stock Hermes Agent against Tensormesh — install, answer the first-launch wizard once, and chat.

Get stock [Hermes Agent](https://github.com/NousResearch/hermes-agent) — Nous Research's open-source (MIT) personal agent, and the #1 app on OpenRouter — driving open-weight models against Tensormesh in about 5 minutes. Hermes treats custom OpenAI-compatible endpoints as first-class providers — and that's exactly what Tensormesh serves at `https://serverless.tensormesh.ai/v1`. No proxy, no code changes — install, answer the setup wizard once, and chat. Every model in the [supported models](#supported-models) table passes the full Hermes flow (chat + tool use); `deepseek-ai/DeepSeek-V4-Flash` is the recommended default.

## Quick Links

<CardGroup cols={3}>
  <Card title="Sign up / Log in" icon="user-plus" href="https://app.tensormesh.ai/login">
    Create your Tensormesh account with Google or GitHub.
  </Card>

  <Card title="Get an API key" icon="key" href="https://app.tensormesh.ai/profile?tab=api">
    Generate an `ak-...` key under **Profile → API keys**.
  </Card>

  <Card title="Install Hermes Agent" icon="download" href="https://hermes-agent.nousresearch.com/docs/getting-started/installation">
    `curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash`
  </Card>

  <Card title="Supported models" icon="list" href="#supported-models">
    Matrix of Hermes-ready models on Tensormesh serverless.
  </Card>

  <Card title="Get support" icon="envelope" href="mailto:saas-support@tensormesh.ai">
    Email [saas-support@tensormesh.ai](mailto:saas-support@tensormesh.ai) for help.
  </Card>
</CardGroup>

## TL;DR

Two commands — the first-launch wizard does the rest:

```bash theme={null}
# Step 1 — install Hermes Agent (macOS/Linux; see Prerequisites for Windows)
curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash

# Step 2 — run it; the wizard opens on first launch
hermes
```

Answer the wizard like this (full walkthrough in [Setup](#setup)):

1. *How would you like to set up Hermes?* → **Full setup** (not *Quick Setup*, which wires you to Nous Portal)
2. *Select provider* → **Custom endpoint (enter URL manually)**
3. *API base URL* → `https://serverless.tensormesh.ai/v1`
4. *API key* → your `ak-...` key
5. *API compatibility mode* → **Chat Completions**
6. *Select model* → `deepseek-ai/DeepSeek-V4-Flash` (the wizard lists every model live from the endpoint)
7. *Context length* → leave blank (auto-detected from the endpoint)
8. *Display name* → `Tensormesh`
9. Everything else (terminal backend, tools, messaging, browser/image/TTS/search providers) → keep defaults / **Skip**

The wizard drops you into a chat session running on Tensormesh. That's the whole setup.

## Prerequisites

* **Hermes Agent** installed via the install script above (macOS/Linux), `iex (irm https://hermes-agent.nousresearch.com/install.ps1)` (Windows PowerShell), or the [git-clone path](https://github.com/NousResearch/hermes-agent) (`./setup-hermes.sh` installs uv, creates the venv, and symlinks `~/.local/bin/hermes`). Verified against Hermes Agent `v0.16.0`.
* **A Tensormesh account** with an API key (`ak-...`). [Sign up](https://app.tensormesh.ai/login), then visit [Profile → API keys](https://app.tensormesh.ai/profile?tab=api).
* **A model with ≥ 64K context.** Hermes requires at least 64,000 tokens of context and rejects smaller windows when the agent initializes (the first turn on that model). Every model in the [supported models](#supported-models) table clears this bar; a few Tensormesh models don't (see the note below the table).

<Note>
  You do **not** need a Nous Portal subscription, an OpenRouter key, or any OAuth login. Hermes's custom-endpoint provider reads the base URL and API key you give it; the Portal/OAuth flows are for Nous-hosted and first-class cloud providers only.
</Note>

<Note>
  You do **not** need to run any local infrastructure. Tensormesh serves the OpenAI-compatible `/v1/chat/completions` wire server-side, so stock `hermes` pointed at `serverless.tensormesh.ai/v1` is the complete setup.
</Note>

## Supported models

Hermes drives 40+ tools through OpenAI-style tool calling. Every model below passes the full Hermes flow — chat + multi-step tool use — against Tensormesh serverless, verified with Hermes Agent v0.16.0 on the chat-completions wire.

| Model                                     | Hermes status     | Notes                                                      |
| ----------------------------------------- | ----------------- | ---------------------------------------------------------- |
| `deepseek-ai/DeepSeek-V4-Flash`           | ✓ chat + tool use | **Recommended default**; reasoning + tools, **1M context** |
| `openai/gpt-oss-120b`                     | ✓ chat + tool use | Reasoning + tools, 128K context                            |
| `openai/gpt-oss-20b`                      | ✓ chat + tool use | Reasoning + tools, 128K context                            |
| `Qwen/Qwen3-Coder-480B-A35B-Instruct-FP8` | ✓ chat + tool use | Coding-tuned, 256K context                                 |
| `Qwen/Qwen3.5-397B-A17B-FP8`              | ✓ chat + tool use | Reasoning + tools, 256K context                            |
| `Qwen/Qwen3.6-27B-FP8`                    | ✓ chat + tool use | Reasoning + tools, 256K context                            |
| `lukealonso/GLM-5.1-NVFP4-MTP`            | ✓ chat + tool use | Reasoning + tools, 198K context                            |
| `MiniMaxAI/MiniMax-M2.5`                  | ✓ chat + tool use | Reasoning + tools, 192K context                            |

**Choosing a default:** `deepseek-ai/DeepSeek-V4-Flash` combines the largest context window in the catalog (1M tokens) with reasoning support at a very low price — the best model to start with, and the one that keeps long agentic sessions farthest from compaction. `openai/gpt-oss-20b` is the cheapest model in the catalog; for heavier reasoning, `lukealonso/GLM-5.1-NVFP4-MTP` and `MiniMaxAI/MiniMax-M2.5` are the strongest options; for coding-centric sessions, reach for `Qwen/Qwen3-Coder-480B-A35B-Instruct-FP8` (256K).

**Below Hermes's 64K minimum** (served by Tensormesh, but rejected by Hermes): `moonshotai/Kimi-K2.6` (32K), `google/gemma-4-31B-it` (32K). Hermes lets you *select* these, then fails on the next turn with `Failed to initialize agent: ... below the minimum 64,000 required by Hermes Agent`. The error suggests a `model.context_length` override, but overstating a model's real window just trades the startup error for mid-session context overruns — not recommended.

## Setup

The wizard path from the TL;DR, with detail on each prompt.

<Steps>
  <Step title="Install Hermes Agent">
    ```bash theme={null}
    curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash
    ```

    This installs the `hermes` command (symlinked into `~/.local/bin`). Verify with `hermes doctor`.
  </Step>

  <Step title="Run hermes and complete the first-launch wizard">
    ```bash theme={null}
    hermes
    ```

    The first launch opens the setup wizard. Choose **Full setup** — *Quick Setup* runs the Nous Portal OAuth flow and wires Hermes to Nous-hosted models, not Tensormesh. Then:

    * **Select provider**: **Custom endpoint (enter URL manually)** — near the bottom of the list, not "custom (direct API)".
    * **API base URL**: `https://serverless.tensormesh.ai/v1`. The wizard probes the endpoint with your key and confirms with `Verified endpoint ... (N model(s) visible)`. If that line errors instead, fix the key before continuing.
    * **API key**: your `ak-...` key. Don't have one? [Generate it in your profile](https://app.tensormesh.ai/profile?tab=api).
    * **API compatibility mode**: **Chat Completions**.
    * **Select model**: the wizard lists every model live from the endpoint — pick `deepseek-ai/DeepSeek-V4-Flash`, or type any slug from the [table](#supported-models).
    * **Context length in tokens**: leave blank. Auto-detect works against Tensormesh — the endpoint publishes `context_length` in `/v1/models` and Hermes resolves it correctly.
    * **Display name**: `Tensormesh` (cosmetic — shown in the `/model` picker and session footers).
    * **Remaining sections** (terminal backend, tools, messaging platforms, browser/image/TTS/search providers): keep defaults or **Skip**. The *Local* terminal backend runs commands on your machine with per-command approval prompts; pick *Docker* instead if you want container isolation. Hermes's multimodal tools (vision, image generation, TTS) route to separate *auxiliary* providers, not your main model — Tensormesh serves text-only models, so those tools have no backend unless you configure auxiliaries; they fail only if invoked.

    The wizard persists everything — endpoint, API key, model, and wire mode — to the `model:` section of `~/.hermes/config.yaml`, then drops you into a chat session. Re-run just the provider part anytime with `hermes model`.
  </Step>
</Steps>

### Manual configuration (alternative)

Use this to script a setup or change an existing install. On a fresh machine, the first `hermes` launch opens the wizard regardless, so the wizard path above is usually the one you want.

<Tabs>
  <Tab title="Manual config.yaml">
    Edit the `model:` section of `~/.hermes/config.yaml` — this is exactly the shape the wizard writes (merge if the section already exists; YAML keys must be unique):

    ```yaml theme={null}
    model:
      default: deepseek-ai/DeepSeek-V4-Flash
      provider: custom
      base_url: https://serverless.tensormesh.ai/v1
      api_key: ak-...
      api_mode: chat_completions
    ```

    `context_length` is optional — Hermes resolves each model's window from the endpoint automatically; set it only to override. The wizard also writes a `custom_providers:` entry (next tab); add one if you want the endpoint listed by name in the `/model` picker.
  </Tab>

  <Tab title="Named provider (custom_providers)">
    The wizard also registers the endpoint as a named custom provider — `name` comes from the display name you chose:

    ```yaml theme={null}
    custom_providers:
      - name: Tensormesh
        base_url: https://serverless.tensormesh.ai/v1
        api_key: ak-...
        model: deepseek-ai/DeepSeek-V4-Flash
        api_mode: chat_completions
    ```

    This is what makes the endpoint appear by name in the `/model` picker. If you manage multiple custom endpoints (a local vLLM, a corp proxy), add more entries — and you can replace `api_key` with `key_env: TENSORMESH_INFERENCE_API_KEY` to keep the key in your environment instead of the config file.
  </Tab>
</Tabs>

## Usage

```bash theme={null}
hermes              # Interactive TUI — start a conversation
hermes model        # Provider/model setup wizard (add or change endpoints)
hermes tools        # Configure which of the 40+ tools are enabled
hermes doctor       # Diagnose installation and configuration issues
hermes update       # Update to the latest version
```

### Switching models

Two different surfaces, easy to confuse:

* **`hermes model`** (terminal, outside a session) — the full wizard. Use it to add providers, enter keys, and configure custom endpoints.
* **`/model`** (inside a chat session) — switches between models you've already configured. Bare `/model` opens an interactive picker — the Tensormesh endpoint appears under its display name with all models live-fetched from `/v1/models`. Or pass the slug directly:

```
/model Qwen/Qwen3-Coder-480B-A35B-Instruct-FP8  # coding-tuned, 256K
/model lukealonso/GLM-5.1-NVFP4-MTP             # GLM 5.1, 198K
/model                                           # interactive picker
```

Mid-session switches are **session-only** — append `--global` to persist the new default to `config.yaml` (Hermes prints a reminder either way). Hermes re-resolves the model's context window from the endpoint on each switch, and conversation history, memory, and skills carry over. (The `custom:`-prefixed forms in Hermes's own docs also work; Hermes auto-corrects them to the bare slug.)

### Command approval

Hermes prompts before executing shell commands by default, with an allowlist for patterns you approve permanently. Keep the default prompting behavior for unfamiliar tasks; manage the allowlist via Hermes's security settings rather than disabling approval globally.

## Hermes Desktop

[Hermes Desktop](https://hermes-agent.nousresearch.com/docs/user-guide/desktop) (macOS, Windows, Linux) is a native app built around the same agent as the CLI — same `~/.hermes/config.yaml`, same API keys, sessions, and skills. If you've completed the [Setup](#setup) above, Tensormesh is already configured when you install the app — nothing extra to do. Verified against Desktop v0.16.0.

* Switch models from the selector at the **bottom-right of the chat window**, or manage the endpoint under **Settings → Providers** — the app surfaces the same Tensormesh models the CLI sees.
* Installing Desktop first, without the CLI setup? Configure Tensormesh per [Setup](#setup) — Desktop reads and writes the same config file, so either surface works.

## Troubleshooting

| Symptom                                                                                                                                 | Likely cause                                                                              | Fix                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| --------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `command not found: hermes`                                                                                                             | `~/.local/bin` not on `PATH`, or install incomplete                                       | Re-run the install script; ensure `export PATH="$HOME/.local/bin:$PATH"` is in your shell rc.                                                                                                                                                                                                                                                                                                                                                                         |
| `Failed to initialize agent: Model <slug> has a context window of N tokens, which is below the minimum 64,000 required by Hermes Agent` | Model window below Hermes's 64K floor (enforced on the first turn, not at selection time) | Pick a ≥ 64K model from the [table](#supported-models). The suggested `model.context_length` override works but invites mid-session context overruns.                                                                                                                                                                                                                                                                                                                 |
| HTTP 500 from the endpoint on every request                                                                                             | Most often an **invalid API key** — Tensormesh surfaces auth failures as 5xx              | Probe with a request that exercises auth (`/v1/models` is public, so it can't validate a key): `curl -sS -X POST -H "Authorization: Bearer <your ak-... key>" -H "Content-Type: application/json" -d '{"model":"deepseek-ai/DeepSeek-V4-Flash","max_tokens":5,"messages":[{"role":"user","content":"hi"}]}' https://serverless.tensormesh.ai/v1/chat/completions` — HTTP 500 means the key is bad; [generate a fresh one](https://app.tensormesh.ai/profile?tab=api). |
| `Model not found`                                                                                                                       | Wrong model slug                                                                          | Check spelling against the [table](#supported-models) — slugs are case-sensitive.                                                                                                                                                                                                                                                                                                                                                                                     |
| Tool calls loop or come back malformed                                                                                                  | Model-specific tool-calling quality                                                       | Switch to `openai/gpt-oss-120b` (a known-good baseline); if it persists there, report it to us.                                                                                                                                                                                                                                                                                                                                                                       |

Still stuck? Run `hermes doctor`, then email [saas-support@tensormesh.ai](mailto:saas-support@tensormesh.ai) with the doctor output and the failing model slug.

## Rollback / uninstall

To remove Tensormesh from your Hermes setup:

1. Run `hermes model` and select a different provider, **or** delete the Tensormesh `model:` block from `~/.hermes/config.yaml`.
2. Delete the `custom_providers:` entry named `Tensormesh` as well — your API key is stored in both places. (If you swapped in `key_env`, also unset `TENSORMESH_INFERENCE_API_KEY`.)

Hermes itself is untouched — it falls back to whatever provider you select next.
