# How can you run Hermes Agent locally without the cloud using Ollama or Unsloth?

When setting up Hermes Agent locally, you can choose between two different backends: Ollama and Unsloth Studio. Ollama is particularly well suited to a quick and straightforward setup, while Unsloth Studio gives you greater control over GGUF models, quantization and memory usage.

### Key Takeaways

The key points for running Hermes Agent locally:

- **Local means no cloud API:** the language model and inference run on your own hardware, your inputs stay on the device and there are no usage-based API costs — only electricity and hardware.
- **Ollama or Unsloth Studio:** Ollama is one of the quickest ways to get started, while Unsloth Studio gives you more control over GGUF models, quantization and memory.
- **Setup:** install Hermes Agent and Ollama, download a model that supports tool calls and connect the two through the local endpoint `http://localhost:11434/v1`.
- **Context length:** Hermes Agent needs at least 64,000 context tokens — set this in Ollama via `OLLAMA_CONTEXT_LENGTH` or a Modelfile, not in Hermes alone.
- **Hardware:** what matters is quantization, context length and whether the model fits into graphics memory; small 4-bit models (7B to 9B) need around 16 GB of RAM or 8 to 12 GB of VRAM, larger ones considerably more.
- **Troubleshooting:** the usual causes are a local server that is not running, an endpoint address without `/v1` and a context length that is too small.

## What does running Hermes Agent locally mean?

When running the Hermes Agent locally, the language model and [inference](https://www.ionos.ca/digitalguide/server/know-how/ai-inference/) run **entirely on your own hardware**. Hermes does not send requests to external [cloud](https://www.ionos.ca/digitalguide/server/know-how/what-is-the-cloud/)-APIs, but to a local backend. This keeps inputs on the device and avoids usage-based [API](https://www.ionos.ca/digitalguide/websites/web-development/what-is-an-api/) costs; however, electricity and hardware costs still apply.

Hermes Agent is not itself the [language model](https://www.ionos.ca/digitalguide/server/know-how/large-language-models/). Instead, the [open-source](https://www.ionos.ca/digitalguide/server/know-how/what-is-open-source/) framework handles tasks such as conversation management, tool access, memory and the execution of multi-step workflows. Ollama or Unsloth Studio, by contrast, provide the actual [LLM for Hermes Agent](https://www.ionos.ca/digitalguide/server/know-how/hermes-agent-llm/) and process the requests sent by Hermes.

For a truly cloud-independent local Hermes Agent setup, you must **not configure a cloud provider such as OpenRouter or Nous Portal as the model source**. Additional features such as web search, cloud browsing, image generation or messenger integrations may also connect to external services. If you want all data to be processed exclusively on your own computer, you should initially use Hermes through the local terminal and only with tools that can run locally.

## Ollama and Unsloth Studio compared

Ollama and Unsloth Studio perform the same basic task: both load a language model into system memory or graphics memory and make it available to other programs through a local interface. In a local Hermes Agent setup, both are configured as a “Custom Endpoint.” The main difference lies in how they are operated and how much control they provide over the model files being used.

<table>
  <thead>
    <tr>
      <th><strong>Criterion</strong></th>
      <th><strong>Ollama</strong></th>
      <th><strong>Unsloth Studio</strong></th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>API interface</td>
      <td>OpenAI-compatible endpoint at http://localhost:11434/v1; for local access, an API key is normally not required</td>
      <td>OpenAI-compatible endpoint, by default at http://localhost:8888/v1; access is secured using a locally generated API key</td>
    </tr>
    <tr>
      <td>Supported formats</td>
      <td>Models from the Ollama library as well as custom GGUF files imported via a Modelfile</td>
      <td>GGUF and Safetensors models from Hugging Face or local files</td>
    </tr>
    <tr>
      <td>Memory optimization</td>
      <td>Automatic GPU offloading and straightforward use of quantized models, with few settings required</td>
      <td>Direct selection of different GGUF quantizations and more extensive control over the model, context and inference</td>
    </tr>
    <tr>
      <td>Primary target group</td>
      <td>Beginners who want to get a local model running as quickly as possible</td>
      <td>Advanced users who want to use their own, customized or heavily quantized models</td>
    </tr>
  </tbody>
</table>

Ollama is generally the easier option for beginners. You can download a model with a single terminal command, and Hermes Agent detects the downloaded models once you have configured the local Ollama endpoint. Custom GGUF files can also be imported, although this requires an additional Modelfile.

Unsloth Studio is primarily suitable if you want to select, quantize, customize or train models yourself. It can run GGUF and Safetensors models locally and make the loaded model available through an API. Unsloth Studio works on Windows, Linux, WSL and macOS. According to the manufacturer, GGUF chats can also run using only the [CPU](https://www.ionos.ca/digitalguide/server/know-how/cpu/), although this is significantly slower than using a suitable GPU.

## How to install Hermes Agent and Ollama

For beginners, Ollama is **one of the easiest ways** to run Hermes Agent locally on your own machine. The following steps show you how to install Hermes and Ollama, download a suitable model and connect both applications through the local API endpoint.

Note If Ollama is already installed, you can set up Hermes Agent locally with a single command:

```bash
ollama launch hermes
```

Ollama checks whether the Hermes command-line application is available and, if necessary, offers to install it. You then select a model; Ollama automatically sets up the local endpoint as a model provider and starts Hermes. To run completely independently of the cloud, be sure to choose a locally available model and not a model with the suffix :cloud.

### 1. Installing Hermes Agent

For Windows and macOS, the native Hermes desktop app is the simplest installation method and is recommended by Nous Research. Linux users, as well as those who want to use Hermes Agent local exclusively in the terminal, can continue to install the command-line version.

#### Installation via the desktop app on Windows and macOS

Download the Hermes desktop installer from the official Nous Research website. The MSIX desktop package requires Windows 11 22H2 or later. On Windows 10, use the PowerShell installer described below. Installation packages are also available for supported macOS systems with Apple Silicon. Intel-based Macs are not supported by Hermes Desktop. Then run the downloaded file and follow the instructions in the installer.

The desktop packages include the graphical interface, the Hermes environment and the required dependencies. The desktop app and the command-line version use the same settings, sessions, models, skills and stored content. You can therefore switch between the graphical interface and the terminal at any time later on.

Models, providers and credentials can be configured in the app **through its settings**. To run Hermes entirely locally with Ollama, you still have to install Ollama separately and then select its local endpoint as the model provider.

The Hermes desktop app also includes a built-in **Local Models** feature under **Settings → Providers → Local Models**. It installs and manages a local llama.cpp runtime, downloads suitable models and automatically handles memory and context settings. This is the simplest option for desktop users who want to run Hermes locally without configuring Ollama or another external backend. The Ollama setup below is particularly useful for manual, CLI-based or individually configured installations.

#### Installation via the terminal

On Linux, macOS or [WSL](https://www.ionos.ca/digitalguide/server/know-how/windows-subsystem-for-linux-wsl/), first open a terminal and run the official installation command:

```bash
curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash
```

On Windows, open PowerShell and use the following command instead:

```powershell
iex (irm https://hermes-agent.nousresearch.com/install.ps1)
```

The installer automatically sets up the required Python environment, Node.js and other dependencies. On macOS and Linux, Git should already be installed. On Linux, curl and xz-utils are also required. Restart the terminal after installation:

```bash
source ~/.bashrc
```

When using the Z shell, which is common on newer macOS systems for example, the command is:

```bash
source ~/.zshrc
```

Then check the installation:

```bash
hermes doctor
```

The command checks, among other things, the installation, the configuration files and the configured model provider. If errors are found, Hermes usually displays **suitable suggestions for solutions**.

### 2. Install Ollama

Download Ollama from the provider’s official download page and select the appropriate version there. On macOS and Windows, then install the supplied installation package; for Linux, the page displays a terminal command for automatic installation. After installation, you can check in the terminal whether the command is available:

```bash
ollama --version
```

Ollama starts automatically in the background on desktop systems. The local API service is available by default on port 11434. For OpenAI-compatible programs such as Hermes Agent local, the full base address is:

```text
http://localhost:11434/v1
```

localhost means that Hermes Agent local only accesses the service on the same computer. Ollama usually does not require an API key for this local access.

### 3. Download a local model

For Hermes Agent local, it is advisable, for example, to download Gemma 4 and Qwen3.6. For reliable tool calls, the Hermes documentation recommends the `gemma4:31b` variant, which takes around 20 GB on disk and needs at least 24 GB of RAM. Qwen3.6 is around 23 GB in its default variant, so you should plan for roughly 24 GB as well.

Download Gemma 4 with the following command:

```bash
ollama pull gemma4:31b
```

Alternatively, you can download Qwen3.6:

```bash
ollama pull qwen3.6
```

The download may be several gigabytes in size, depending on the model. Then display the installed models:

```bash
ollama list
```

First, test the model directly in Ollama:

```bash
ollama run gemma4:31b
```

If you receive a response, local inference is working correctly. Use /bye to end the test.

### 4. Set the context length for Hermes Agent local

Hermes Agent local requires **at least 64,000 context tokens** for reliable tool use. Depending on the available VRAM, Ollama may use significantly smaller default values. With less than 24 GB of VRAM, Ollama normally starts with 4,096 [tokens](https://www.ionos.ca/digitalguide/websites/web-development/ai-tokens/), with 24 to 48 GB it uses 32,768 tokens, and only from 48 GB upwards does it use a larger default context. Stop the currently running Ollama service and restart it with the correct context length.

```bash
OLLAMA_CONTEXT_LENGTH=64000 ollama serve
```

On Windows PowerShell, use:

```powershell
$env:OLLAMA_CONTEXT_LENGTH="64000"
ollama serve
```

Leave this terminal open, as it is now running the local Ollama server.

Alternatively, you can permanently store the context length in your own Ollama model. To do this, create a file called `Modelfile` with the following content:

```text
FROM gemma4:31b
PARAMETER num_ctx 64000
```

Then create a new model from it:

```bash
ollama create gemma4-64k -f Modelfile
```

If you use this Modelfile method, select gemma4-64k as the model in Hermes in the next step.

Hermes Agent local cannot increase the context length via the OpenAI-compatible Ollama API. This setting therefore has to be configured directly in the Ollama server or in the Modelfile.

### 5. Connect Ollama with Hermes Agent local

In the next step, you need to link Ollama and Hermes Agent local. To do this, open a new terminal and start the model assistant:

```bash
hermes model
```

Select the following options one after the other:

- More providers
- Custom endpoint
- For the API base URL: `http://localhost:11434/v1`
- Leave the field for the API key empty.
- Also select the model detected by Hermes Agent local.
- Enter 64000 as the context length, or leave the field empty if Hermes Agent local automatically detects the correct value.

Hermes Agent local queries the `/v1/models` endpoint and can therefore detect Ollama models that have already been downloaded. The selection is permanently stored in the `~/.hermes/config.yaml` file.

Then start Hermes:

```bash
hermes
```

First, enter a simple query. Then you can test with a task to check whether the model also calls tools correctly.

## Advanced setup with Unsloth Studio

Unsloth Studio is a local web interface for running, training and exporting open [AI](https://www.ionos.ca/digitalguide/online-marketing/online-sales/what-is-artificial-intelligence/) models. For Hermes Agent local, the integrated OpenAI-compatible API endpoint is particularly relevant.

Install Unsloth Studio with:

```bash
curl -fsSL https://unsloth.ai/install.sh | sh
```

In Windows PowerShell, use:

```powershell
irm https://unsloth.ai/install.ps1 | iex
```

Then start the interface exclusively on the local address:

```bash
unsloth studio -H 127.0.0.1 -p 8888
```

Then open in your browser:

```text
http://localhost:8888
```

The first time you start it, set a password for the local Studio interface. You then connect it to Hermes Agent local in the following steps:

1. **Load model in Unsloth Studio:** Open the chat or model section and search for a suitable GGUF model. You can download models from Hugging Face or select an existing GGUF file. For limited memory, 4‑bit quantization such as Q4\_K\_M is a sensible starting point. Make sure the model supports tool calls. You usually **do not need to set the available context length manually** in Unsloth Studio, as llama.cpp’s smart auto context loads only the context a session actually needs. If you do want to pin a value, Unsloth Studio lets you set the context length yourself.
2. **Generate a local API key:** Open the `Settings > API` section in Unsloth Studio and create a new key. The key usually begins with `sk-unsloth-`. It is used solely to secure local API access and does not mean that requests are sent to any cloud. With the configuration used above, the OpenAI‑compatible base address is `http://localhost:8888/v1`.
3. **Configure Hermes Agent local:** Open the `~/.hermes/config.yaml` file in a text editor and enter the model name, endpoint and key:

```yaml
model:
  default: "EXACT-MODEL-NAME-FROM-UNSLOTH"
  provider: custom
  base_url: "http://localhost:8888/v1"
  api_key: "sk-unsloth-YOUR-LOCAL-KEY"
```

Replace EXACT-MODEL-NAME-FROM-UNSLOTH with the model ID shown in the API section of Unsloth Studio. Be careful with indentation in YAML files: under model: there are two spaces each time. Hermes Agent local uses ~/.hermes/config.yaml as the central source for model, provider and base URL.

As the file contains an access key, it should only be readable by your user account. On macOS and Linux, you can restrict the permissions with the following command:

```bash
chmod 600 ~/.hermes/config.yaml
```

Then check the setup again:

```bash
hermes doctor
```

Then start Hermes:

```bash
hermes
```

Unsloth Studio must remain open or running as a local server while in use. If Studio is closed, Hermes Agent local can no longer reach the API endpoint.

## Hardware requirements for local models

Hardware requirements depend on more than just the number of model parameters. **Quantization, context length, model architecture** and whether the model **fits entirely into graphics memory** also play an important role.

The following values provide a practical guide for quantized GGUF models:

<table>
  <thead>
    <tr>
      <th><strong>Model size</strong></th>
      <th><strong>Practical minimum spec</strong></th>
      <th><strong>Classification</strong></th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>7B to 9B, 4-bit</td>
      <td>Approx. 16 GB RAM or unified memory; with a dedicated GPU, ideally at least 8 to 12 GB VRAM</td>
      <td>Suitable for simple local tests; a context of 64,000 tokens can significantly increase memory requirements</td>
    </tr>
    <tr>
      <td>12B to 14B, 4-bit</td>
      <td>Approx. 24 GB RAM or unified memory, or 12 to 16 GB VRAM</td>
      <td>Offers better answer quality, but with noticeably higher hardware requirements</td>
    </tr>
    <tr>
      <td>27B to 35B, 4-bit</td>
      <td>At least 32 GB RAM or unified memory; for smooth GPU inference, often around 24 GB VRAM</td>
      <td>Suitable for current models such as Qwen3.6; long contexts require additional memory</td>
    </tr>
    <tr>
      <td>70B, 4-bit</td>
      <td>Generally at least 64 to 96 GB of available memory</td>
      <td>Better suited to powerful workstations or systems with multiple GPUs</td>
    </tr>
  </tbody>
</table>

Note RAM and VRAM are **not the same**. RAM is the computer’s main working memory, while VRAM is the memory of a dedicated graphics card. Macs with Apple Silicon instead use unified memory that can be accessed by both the processor and GPU.

These values are **not fixed limits**. A 27B model with 4-bit quantization may be around 17 GB as a file, but it requires additional memory during operation. This is particularly relevant for a local Hermes Agent setup, as agent tasks are designed to use a context window of at least 64,000 tokens. If a model does not fit entirely into VRAM, Ollama and Unsloth can move parts of it into regular system memory. This makes it possible to run the model **on less powerful hardware**, although performance may be slower.

## Troubleshooting the local installation

Many problems are caused by the local server not running, an incorrect endpoint address or an insufficient context length. The following checks can help you identify and resolve the most common issues quickly.

### Hermes command not found

If the message `hermes: command not found` appears, first reload the shell configuration:

```bash
source ~/.bashrc
```

On macOS or if you are using the Z shell, use instead:

```bash
source ~/.zshrc
```

Also check whether ~/.local/bin is included in the PATH environment variable. Then run the following diagnostic command:

```bash
hermes doctor
```

Hermes Agent local checks the installation and points out possible configuration errors.

### Hermes cannot reach Ollama

First check whether the local Ollama server is reachable:

```bash
curl http://localhost:11434/v1/models
```

If a list of models appears, the connection is working. If there is a connection error, restart Ollama:

```bash
OLLAMA_CONTEXT_LENGTH=64000 ollama serve
```

Also check the address entered in Hermes Agent local. It must be exactly http://localhost:11434/v1. If /v1 is missing, an HTTP 404 error may occur.

### Hermes Agent local is asking for an API key

Normally, no API key is required for the local Ollama endpoint. Therefore, leave the corresponding field in the setup wizard empty.

### Correcting context length and context drift with Ollama

Problems can arise if Hermes Agent local and Ollama use different context lengths. For example, Hermes Agent local might plan with 64,000 tokens, while Ollama actually runs the model with only 4,096 tokens. Longer conversations or tool calls may then be cut off or rejected.

Therefore, enter the desired context length in `~/.hermes/config.yaml`:

```yaml
model:
  default: "gemma4:31b"
  provider: custom
  base_url: "http://localhost:11434/v1"
  context_length: 64000
```

Then start Ollama with the same value:

```bash
OLLAMA_CONTEXT_LENGTH=64000 ollama serve
```

Check the context that has actually been loaded with:

```bash
ollama ps
```

In the CONTEXT column, the value should be at least 64000. Changing the Hermes Agent local configuration alone does not increase the model’s context window. However, do not choose a higher value than the model and your hardware support. Otherwise, memory errors, slow responses, or connection drops may occur.

### Tool calls only appear as text

Hermes Agent local requires a model that supports structured tool calls. If the model only describes an action in text instead of executing the corresponding tool, the model or its chat template is often unsuitable. Therefore, use an Ollama model that **explicitly supports tool calls** wherever possible. For GGUF files you import yourself, the appropriate chat template and tool support must also be preserved.

## Which local setup is best for Hermes Agent?

For your first fully local Hermes Agent setup, Ollama is the simplest option. Models can be loaded with just a few terminal commands, the local endpoint does not require an API key, and the connection can be configured directly using `hermes model`. The key requirement is to start Ollama with a context window of at least 64,000 tokens.

Unsloth Studio offers greater control. The setup involves a few additional steps, but it also provides Hermes Agent with an OpenAI-compatible local endpoint. In both cases, model inference can run without an external cloud API, provided you use only local models and do not enable any cloud-based Hermes Agent tools.


This is a markdown version of: [https://www.ionos.ca/digitalguide/server/configuration/run-hermes-agent-locally/](https://www.ionos.ca/digitalguide/server/configuration/run-hermes-agent-locally/) for AI/LLM consumption.