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

# Connect Hermes Agent

> Set up Hermes Agent with the Fortytwo API: install the desktop app, add Fortytwo as a custom endpoint and chat with qwen/qwen3.8-27b. Terminal setup included.

[Hermes Agent ](https://hermes-agent.nousresearch.com/) by Nous Research is a personal AI agent. It runs as a desktop app and in the terminal; both use the same settings, so set it up once.

> [!NOTE]
>
> **Before you start:** create a Fortytwo API key and buy credits — see [Quickstart, step 1](https://docs.fortytwo.network/docs/quickstart.md#1-create-an-api-key). Give each agent its own key with a **Spend limit**.
>
> | Setting | Value |
> | - | - |
> | Base URL | `https://api.fortytwo.network/v1` |
> | Model ID | `qwen/qwen3.8-27b` |

**Desktop app**

**1. Install Hermes**

Download the installer from [hermes-agent.nousresearch.com/desktop ](https://hermes-agent.nousresearch.com/desktop). **Install** it.

*On Linux, install Hermes in the terminal (see the **Terminal** tab).*

**2. Hermes onboarding: skip the provider choice**

Open Hermes. On the first screen, **Let's get you setup with Hermes Agent**, choose **I'll choose a provider later**.

**3. Add Fortytwo as a custom endpoint**

1. Open **Settings** (**Cmd+,** on macOS, **Ctrl+,** on Windows).
2. Open **Providers** → **Custom Endpoints**.
3. Fill in the endpoint form:

| Field | Enter |
| - | - |
| **Name** | `Fortytwo` |
| **Provider ID** | `fortytwo` |
| **Endpoint URL** | `https://api.fortytwo.network/v1` |
| **Default Model** | `qwen/qwen3.8-27b` |
| **Context** | `262144` |
| **API Key** | Your Fortytwo API key |

Keep **Use for new chats** on.

4. Press **Test**. Hermes shows **Endpoint is reachable. Found N models.** *Test before you save: after **Save**, **Test** reports that the endpoint rejected the API key, though the saved endpoint works.*

   ![Hermes Desktop: endpoint form filled in for Fortytwo, Test reports that the endpoint is reachable](https://mintcdn.com/fortytwo-f43ac997/HbC5gKcbcuN88RH4/resources/illustrations/agents/hermes-desktop-2.png?fit=max\&auto=format\&n=HbC5gKcbcuN88RH4\&q=85\&s=31d392cad63a2b49ede5acaecd9f6110)

5. Press **Save**. Hermes shows **Custom endpoint saved** and lists **Fortytwo** under **Custom Endpoints** as **Active**.

   ![Hermes Desktop: Fortytwo saved under Custom Endpoints as Active](https://mintcdn.com/fortytwo-f43ac997/HbC5gKcbcuN88RH4/resources/illustrations/agents/hermes-desktop-3.png?fit=max\&auto=format\&n=HbC5gKcbcuN88RH4\&q=85\&s=dcffe126710c2aee3e0da091736d6b02)

**4. Start a chat**

Press **Cmd+N** (**Ctrl+N** on Windows). In the model picker next to the message box, check that **Qwen3.8 27b** is selected under **Fortytwo**, then send a message. The same picker turns **Thinking** on or off.

![Hermes Desktop: Qwen3.8 27b selected under Fortytwo](https://mintcdn.com/fortytwo-f43ac997/HbC5gKcbcuN88RH4/resources/illustrations/agents/hermes-desktop-4.png?fit=max\&auto=format\&n=HbC5gKcbcuN88RH4\&q=85\&s=99b2d4b58950668d9c256e9377e7f93d)

![Hermes Desktop: chat with qwen/qwen3.8-27b](https://mintcdn.com/fortytwo-f43ac997/HbC5gKcbcuN88RH4/resources/illustrations/agents/hermes-desktop-5.png?fit=max\&auto=format\&n=HbC5gKcbcuN88RH4\&q=85\&s=d644d2c8e31d44721166be54a8f084d7)

**Terminal**

**1. Install Hermes**

On macOS, Linux or WSL2:

```bash theme={null}
curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash
```

On Windows, in PowerShell:

```powershell theme={null}
iex (irm https://hermes-agent.nousresearch.com/install.ps1)
```

Open a new terminal window when the installer finishes.

**2. Choose a custom endpoint**

Run:

```bash theme={null}
hermes model
```

In **Select provider**, scroll to the end of the list and choose **Custom endpoint (enter URL manually)**.

![Hermes Agent: Custom endpoint in the provider list](https://mintcdn.com/fortytwo-f43ac997/HbC5gKcbcuN88RH4/resources/illustrations/agents/hermes-cli-1.png?fit=max\&auto=format\&n=HbC5gKcbcuN88RH4\&q=85\&s=d1d876f234e0a5a9f4fb358a9538daac)

**3. Answer the prompts**

| Prompt | Answer |
| - | - |
| `API base URL` | `https://api.fortytwo.network/v1` |
| `API key` | Your Fortytwo API key |
| `Select API compatibility mode` | `2` (Chat Completions) |
| `Use this model?` (`qwen/qwen3.8-27b`) | `y` |
| `Context length in tokens` | `262144` |
| `Display name` | `Fortytwo` |
| `Select reasoning effort` | Press **Enter** to keep **medium** |

Hermes saves the key in `~/.hermes/.env` and sets `qwen/qwen3.8-27b` as the default model.

![Hermes Agent: Fortytwo endpoint configured](https://mintcdn.com/fortytwo-f43ac997/HbC5gKcbcuN88RH4/resources/illustrations/agents/hermes-cli-2.png?fit=max\&auto=format\&n=HbC5gKcbcuN88RH4\&q=85\&s=b33f683335e27ea654408bef325c8d49)

**4. Start a chat**

```bash theme={null}
hermes
```

On the first start, Hermes asks **Help improve Hermes?** *The answer only decides whether Hermes sends usage metrics to Nous Research, the maker of Hermes, **not to Fortytwo**. The default, **No thanks**, sends nothing; change it later with `hermes setup telemetry`.*

The status line at the bottom of the screen shows `qwen3.8-27b`.

![Hermes Agent: chat in the terminal](https://mintcdn.com/fortytwo-f43ac997/HbC5gKcbcuN88RH4/resources/illustrations/agents/hermes-cli-3.png?fit=max\&auto=format\&n=HbC5gKcbcuN88RH4\&q=85\&s=3d2a55e5138c1a4616d50f3d6c4af2b6)

Hermes needs a context window of at least 64,000 tokens; `qwen/qwen3.8-27b` has 262,144. More settings: [Hermes custom providers ](https://hermes-agent.nousresearch.com/docs/integrations/providers#custom--self-hosted-llm-providers).

***

Something not working with your agent, or using one we have not listed? Tell us in the platform: [Feedback](https://docs.fortytwo.network/docs/support.md#ideas-feedback-and-small-bugs) for ideas and small bugs, [Contact support](https://docs.fortytwo.network/docs/support.md#support-account-api-billing-credits-errors) if it blocks your work, or [Report a security issue](https://docs.fortytwo.network/docs/support.md#security-issue).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.