> For the complete documentation index, see [llms.txt](https://unsloth.ai/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://unsloth.ai/docs/jp/lian-xie/hermes-agent.md).

# Hermes Agent でローカル AI モデルを実行する方法

ローカルで Hermes Agent とオープン LLM を使うためのガイド。

このガイドでは、ローカルでオープンLLMを実行できます **Hermes Agent** 経由 [**Unsloth**](https://github.com/unslothai/unsloth)。Nous Research の Hermes Agent は **オープンソースの** 自律型AIエージェントで、モデルのエンドポイントに接続し、タスクを実行し、メモリと学習したスキルを通じて時間とともに改善します。

{% columns %}
{% column width="58.333333333333336%" %}
Hermes は任意の **ローカルモデル** に対して動作します。これは Unsloth の **OpenAI互換API**経由で公開されているもので、たとえば DeepSeek、Qwen、Gemma などがあります。Hermes はエージェントクライアントとして動作し、Unsloth は [ローカルAPI](/docs/jp/ji-ben/api.md) を通じてモデルを完全にオフラインで読み込み、提供します。

セットアップ後は、Hermes 経由で送信されるすべてのプロンプトが、デバイス上のローカルモデルを使って実行されます。
{% endcolumn %}

{% column width="41.666666666666664%" %}

<figure><img src="https://735611837-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2FYhiTzkyz0fVPMxIfWg6D%2FScreenshot_20260718_122219.png?alt=media&amp;token=a8063d58-0d49-467a-aa2a-35b30c448390" alt=""><figcaption><p>Unsloth 経由で Hermes 上でローカル実行される Qwen3.5。</p></figcaption></figure>
{% endcolumn %}
{% endcolumns %}

<a href="https://unsloth.ai/docs/integrations/hermes-agent#setup-hermes-agent" class="button primary" data-icon="caduceus">Hermes をセットアップ</a><a href="https://unsloth.ai/docs/integrations/hermes-agent#integrate-hermes-with-unsloth-api" class="button primary">🦥 ローカルモデルを接続</a>

{% hint style="info" %}
このチュートリアルでは、Hermes をインストールし、以下を使うように設定します `unsloth/Qwen3.6-27B-GGUF` 。これは Unsloth から提供されます。別のモデルを使いたいですか？ Unsloth でそのモデルを読み込み、設定を更新すれば、任意の別モデルに差し替えられます。
{% endhint %}

### <i class="fa-caduceus">:caduceus:</i> Hermes Agent のセットアップ

**前提条件：**

この [Hermes](https://github.com/NousResearch/hermes-agent/blob/main/website/docs/getting-started/installation.md) コマンドラインインストーラーは Linux、macOS、WSL2 をサポートしています。 **Git** がインストールされていることを確認してください。Linux では、さらに **curl** および **xz-utils**もインストールしてください。インストーラーは自動的に `uv`、Python 3.11、Node.js 22、 `ripgrep`と `ffmpeg`.

#### 1. インストーラーを実行

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

インストーラーは次のことを行います：

* あなたのプラットフォームを検出し、依存関係をチェックします。
* Hermes を以下にクローンします `~/.hermes/hermes-agent/`.
* Python の仮想環境を作成し、Python 依存関係をインストールします。
* browser-tool の依存関係と Playwright の Chromium エンジンをインストールします。
* 以下を追加し、 `hermes` コマンドを追加して、セットアップウィザードを起動します。

{% columns %}
{% column %}
Playwright が `sudo` を要求して、Chromium の共有システムライブラリをインストールすることがあります。Hermes 自体に root 権限は必要ありません。
{% endcolumn %}

{% column %}

<figure><img src="https://735611837-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2FnabBNaHLvb1rH58cQwyC%2FScreenshot%202026-07-18%20at%205.31.57%E2%80%AFAM.png?alt=media&amp;token=4ac35864-89aa-45ce-84db-ad5b17f8b3e5" alt="" width="375"><figcaption></figcaption></figure>
{% endcolumn %}
{% endcolumns %}

#### **2. シェルを再読み込み** して、 `hermes` コマンドが `PATH`:

{% code title="bash" %}

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

{% endcode %}

{% code title="zsh" %}

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

{% endcode %}

#### **3. インストールを確認：**

```bash
hermes --version
```

コマンドが解決できれば、Hermes はインストールされています。すべては以下にあります `~/.hermes/`:

| パス                                      | 内容                           |
| --------------------------------------- | ---------------------------- |
| `~/.hermes/config.yaml`                 | 主要設定（モデル、プロバイダー、ツール、TTS など）  |
| `~/.hermes/.env`                        | APIキーやその他の秘密情報               |
| `~/.hermes/hermes-agent/`               | Hermes のソース + 仮想環境           |
| `~/.hermes/cron/`, `sessions/`, `logs/` | 実行時データ                       |
| `~/.hermes/skills/`                     | インストール済みスキル（Skills Hub から同期） |

{% hint style="info" %}
完全なインストール参照： [hermes-agent.nousresearch.com/docs/getting-started/installation](https://hermes-agent.nousresearch.com/docs/getting-started/installation)。インストーラーが不足している前提条件を報告した場合は、それをインストールしてからワンライナーを再実行してください。インストーラーは冪等です。
{% endhint %}

### ⚡ クイックスタート

Hermes をインストールした後、Hermes がローカルモデルの推論を提供・実行できるようにするため、Unsloth Desktop をインストールする必要があります。

{% stepper %}
{% step %}

#### Unsloth をダウンロード

始める最も簡単な方法は、 [Unsloth Desktop](/docs/jp/desktop.md) アプリをインストールすることです。 [MacOS](/docs/jp/meru/install/mac.md)Linux、 [Windows](/docs/jp/meru/install/windows-installation.md), [NVIDIA](/docs/jp/meru/install/pip-install.md), [AMD](/docs/jp/meru/install/amd.md)、Intel、そしてCPU構成をサポートしています。

<a href="https://unsloth.ai/download" class="button primary" data-icon="down-to-bracket">Unsloth をダウンロード</a>

* <i class="fa-apple">:apple:</i> [macOS 用をダウンロード](https://unsloth.ai/download/mac)
* <i class="fa-windows">:windows:</i> [Windows 用をダウンロード](https://unsloth.ai/download/windows)
* <i class="fa-linux">:linux:</i> [Linux 用をダウンロード](https://unsloth.ai/download/linux)

または、手動インストールを希望する場合：

**MacOS、Linux、WSL:**

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

**Windows PowerShell:**

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

{% endstep %}

{% step %}

#### インストール

1. Unsloth インストーラーを開き（`.dmg`, `.exe` のファイル）
2. Mac では Unsloth を Applications にドラッグするか、Windows ではセットアップを完了してください。
3. アプリを起動し、インストールが完了するまで待ちます
   {% endstep %}

{% step %}

#### モデルを選択

上部の「モデルを選択」ドロップダウンまたは「Model hub」タブを開き、デバイスに合うモデルと量子化を選んでダウンロードします。完了したら、すぐにチャットを開始できます。セットアップは不要です。

<figure><img src="https://735611837-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2FNCEVgKLJI0goPqjgcg9B%2Fmodel%20hub%20models.png?alt=media&amp;token=533b5e3c-a901-4b33-963e-4a703cc9d5a6" alt="" width="563"><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Unsloth の準備ができました

チャットを始めるには、メッセージを入力して Enter キーを押します。

**Hermes を接続します。** 実行 `unsloth start hermes` を、Unsloth が開いている間にターミナルで実行します。これにより APIキーが発行され、設定が書き込まれ、読み込まれたモデルに対して Hermes が起動します。

<figure><img src="https://735611837-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2FpAGvwjGD0iVMZKBoyu7m%2Fgreeennn.png?alt=media&amp;token=d17a5528-8375-444c-9aff-f9e9f7903bcd" alt="" width="563"><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}

### ⚡ Hermes Agent を `unsloth start`

Hermes をモデル付きで直接起動するには、以下を実行します：

```bash
unsloth start hermes \
    --model unsloth/qwen3.8-27B-GGUF-GGUF:UD-Q4_K_XL
    --temp 1.0 \
    --top-p 0.95 \
    --top-k 20 \
    --min-p 0.0 \
    --reasoning-effort medium
```

{% hint style="success" %}
設定/サンプリングフラグが設定されていない場合、Unslothはコンテキスト長、temperatureなどを含め、そのモデルに最適/推奨の設定を自動選択します。
{% endhint %}

Unsloth Studio にモデルを読み込んだ状態で、以下を実行します：

```bash
unsloth start hermes
```

<figure><img src="https://735611837-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2FOaFdKwRASHSoxDQx06l5%2FScreenshot_20260714_152023.png?alt=media&amp;token=c7e13fb2-e03e-49d1-8efa-f7494578943a" alt="Hermes Agent connected to a local model through Unsloth Studio"><figcaption><p>Unsloth Studio のプロバイダー経由で動作する Hermes Agent。</p></figcaption></figure>

Unsloth は、プロバイダー、モデル、コンテキスト設定があらかじめ構成された別の管理されたホームから Hermes を起動します。既存の Hermes 設定は変更されません。

この管理されたホームは既定では一時的です。セッションと状態を保持するには、最初の起動時に `--persist` を追加してください：

```bash
unsloth start hermes --persist
```

後で最新のセッションに戻るには、次を実行します：

```bash
unsloth start hermes --persist --continue
```

特定のセッションを再開するには、代わりに `--resume <session-id-or-title>` を使用します。

モデル選択、リモート接続、高度なオプションに関する完全な [unsloth start](/docs/jp/lian-xie/unsloth-start.md) リファレンスを参照してください。

Hermes のプロバイダーを自分で管理したい場合は、以下のセットアップウィザードを引き続き利用できます。

### 🔑 APIキーを作成

1. サイドバーを開き、左下の **Unsloth** アバターをクリックします。
2. へ移動し **設定** → **API**.
3. わかりやすい名前を入力します（例： `hermes-agent-macbook`).
4. *（任意）* 有効期限を設定します。
5. クリック **作成**.
6. **キーをすぐにコピーしてください。** Unsloth はハッシュのみを保存し、再表示することはできません。

<figure><img src="https://735611837-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2FrWnqY5PgvZdbWK8pmlD5%2Fimage.png?alt=media&amp;token=3507e7d7-b552-447f-b503-2418802b8f6e" alt="" width="375"><figcaption></figcaption></figure>

すべてのキーは `sk-unsloth-` というプレフィックスで始まります。いつでも同じページからキーを失効できます。失効したキーで行われたリクエストは `401 Unauthorized`.

### 🦥 Hermes を Unsloth API と統合

Hermes は各チャットターンを設定された推論プロバイダーに送信し、 **OpenAI互換の** エンドポイントに接続します。インストール中、または後からセットアップウィザードでプロバイダーを設定できます。

**1. セットアップウィザードを開く：**

{% columns %}
{% column %}

```bash
hermes setup
```

「何をしたいですか？」メニューから **モデル & プロバイダー** を選び、推論エンドポイントのみを設定するか、 **フルセットアップ** を選んで、すべて（TTS、ツール、メッセージングゲートウェイ、エージェント設定）を順に設定します。
{% endcolumn %}

{% column %}

<figure><img src="https://735611837-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2FChF6By1Dl44hVQl63kGW%2FScreenshot%202026-07-18%20at%205.34.39%E2%80%AFAM.png?alt=media&amp;token=371a287e-1264-47d2-af3e-fa3ed302e038" alt="" width="539"><figcaption></figcaption></figure>
{% endcolumn %}
{% endcolumns %}

**2. カスタム OpenAI互換エンドポイントを選択** Hermes が推論プロバイダーを尋ねてきたら。

<figure><img src="https://735611837-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2FA5VVaVsL7GzZGq9Dn3Bt%2Fhermes_agent_setup_2.png?alt=media&amp;token=a234d29d-14f6-431f-be1f-9a4e14f5951d" alt="" width="563"><figcaption></figcaption></figure>

**3. プロンプトに入力** Hermes の案内に従って入力します：

| プロンプト                         | 値                                                       |
| ----------------------------- | ------------------------------------------------------- |
| **API ベースURL**                | `http://localhost:8888/v1` *（あなたの Unsloth ポート + `/v1`)* |
| **APIキー**                     | あなたの `sk-unsloth-…` キー                                  |
| **検出されたモデル: … このモデルを使用しますか？** | `Y` *（Hermes は `GET /v1/models`)*                       |
| **を通じてモデルを自動検出します）**          | *トークン単位のコンテキスト長*                                        |
| **表示名**                       | 好きなものを入力してください。例： `unsloth-api`                         |

Hermes はエンドポイントを `/v1/models` と照合し、続行する前に検出されたモデルを確認します。

<figure><img src="https://735611837-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2FehQjrLJ0ztoSdNp94dfH%2Fhermes_agent_setup_3.png?alt=media&amp;token=641c6e6a-44c3-4013-8c08-32472b256283" alt=""><figcaption></figcaption></figure>

**4. 残りのプロンプトは既定値を受け入れる** （TTS、ツール、メッセージングゲートウェイ、エージェント設定）は後で再設定できます。Hermes はすべてを `~/.hermes/config.yaml` および `~/.hermes/.env`.

<figure><img src="https://735611837-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2FWbj2YWKpXw9T2jR0QQjh%2Fhermes_agent_setup_5.png?alt=media&amp;token=59985534-69e3-46ec-8ab9-1db8829c1721" alt=""><figcaption></figcaption></figure>

**5. Hermes を起動：**

```bash
hermes
```

起動バナーに Unsloth のモデル名がステータスバーに表示されます（例： `unsloth/Qwen3.6-27B-GGUF`）、そしてプロンプトは入力待ちになります。

<figure><img src="https://735611837-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2FU8UlRyw9n1SrENvZXSjD%2Fhermes_unsloth_run.png?alt=media&amp;token=6fd14920-a287-4aed-815e-33b7e4d09c68" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
後でモデルだけを再設定するには、 `hermes setup model`を実行します。設定ファイルを直接編集するには、 `hermes config edit` が `~/.hermes/config.yaml` を開きます `$EDITOR`.
{% endhint %}

### 任意：Unsloth サーバーを調整

`unsloth run` ローカルAPIサーバーを起動し、アプリが接続するためのモデルを読み込みます。起動時のサーバーの動作もカスタマイズできます。

```bash
# Hermes を提供する（--disable-tools はエージェント自身のツールを通過させます）
unsloth run \
  --model unsloth/gemma-4-26B-A4B-it-GGUF \
  --disable-tools \
  --reasoning off \
  -p 8888
```

{% hint style="warning" %}
を使ってください `--disable-tools` Hermes（または独自のツールを持つ外部エージェント）を動かすときに使用します。既定では Unsloth Studio は独自のサーバー側ツールを実行し、エージェントのツール呼び出しを吸収するため、Hermes は応答しますがツールは実行しません。 `--disable-tools` パススルーに切り替わり、Hermes 自身のツールが使われます。
{% endhint %}

を使ってください `で llama.cpp でも使えます！` 思考をオフにするには、または `を` 推論をサポートするモデルでオンにするには、

```bash
# ローカルネットワーク上に API を公開
unsloth run \
  --model unsloth/gemma-4-26B-A4B-it-GGUF \
  -H 0.0.0.0 \
  -p 8888
```

これによりサーバーは `0.0.0.0:8888`上で起動し、同じローカルネットワーク上の他のデバイスが接続できるようになります。 `-p` はサーバーの実行ポートを変更します。スマートフォン、ノートパソコン、またはネットワーク上の他のデバイスを API サーバーに接続したい場合は、次を付けて起動してください `-H 0.0.0.0`.

一部のアプリは、個々のリクエストに対して生成設定を上書きする場合があります。さらに高度なランタイム設定については、メインの [API チューニング](https://unsloth.ai/docs/basics/api#unsloth-run-command) セクションを参照してください。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://unsloth.ai/docs/jp/lian-xie/hermes-agent.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
