> 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/tong-he/hermes-agent.md).

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

このガイドを使うと、オープンLLMをローカルで実行できます **Hermes エージェント** 経由で [**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="/files/30a58e727d8027487e92a694cbce84e0065d2d31" 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="/files/f0087bd867c64fb05d15b46a0a9fb8b0a2b4e7ef" 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をアプリケーションにドラッグし、Windowsではセットアップを完了してください。
3. アプリを起動し、インストール完了を待ちます
   {% endstep %}

{% step %}

#### モデルを選択

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

<figure><img src="/files/158354856e78d615be54ae9d6435c9ce561b7d4e" alt="" width="563"><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Unslothの準備が整いました

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

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

<figure><img src="/files/e80de67ed3ea23603ff90d3a5750d20c31d2e56d" 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 \
    --chat-template-kwargs '{"reasoning_effort":"medium"}'
```

Unsloth は使用すべき正しいパラメータを自動的に選択しますが、変更することもできます。

Unsloth Studioでモデルを読み込んだ状態で、次を実行します:

```bash
unsloth start hermes
```

<figure><img src="/files/6e6e8073651c257a8540a7b57c929ad50bf7c6f2" alt="Hermes Agent connected to a local model through Unsloth Studio"><figcaption><p>Unsloth Studioプロバイダー経由で実行されているHermes Agent。</p></figcaption></figure>

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

この管理ホームは既定では一時的です。セッションと状態を保持したい場合は、 `--persist` 初回起動時から次を追加してください:

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

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

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

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

完全な [unsloth start](/docs/jp/tong-he/unsloth-start.md) モデル選択、リモート接続、高度なオプションのリファレンス。

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

### 🔑 APIキーの作成

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

<figure><img src="/files/56897ad32966d1081797ea8ccf97a7df82f0a550" 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="/files/2e85bd9157229846b9404dec20d11a1eb403540f" alt="" width="539"><figcaption></figcaption></figure>
{% endcolumn %}
{% endcolumns %}

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

<figure><img src="/files/1aae32d6cd7ec15ef3863c6c765ea8738b10ea13" 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="/files/ec3e51aef408df3e9d9ae856c012c906b9e5fa1b" alt=""><figcaption></figcaption></figure>

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

<figure><img src="/files/fb8126221234da24ea2ab9168f668fa176011a07" alt=""><figcaption></figcaption></figure>

**5. Hermesを起動する:**

```bash
hermes
```

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

<figure><img src="/files/f3850832a3cb2c97985634a0ffb3536adcedbb4c" 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 %}

次を使用: `--reasoning off` で思考をオフにするか、 `--reasoning on` 推論対応モデルでオンにします。

```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` サーバーが使用するポートを変更します。スマートフォン、ノートPC、その他ネットワーク上のデバイスから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/tong-he/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.
