> For the complete documentation index, see [llms.txt](https://docs.maiagent.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.maiagent.ai/maiagent-user-guide/ja/build/agent/add-system-prompt.md).

# AI アシスタントへのシステムプロンプトの追加

役割指示を作成したら、MaiAgent の AI エージェント設定に追加できます。

## 役割指示を追加する <a href="#add-system-prompt" id="add-system-prompt"></a>

### 1. AI エージェントの設定画面を開く <a href="#step-1-navigate-to-ai-agent-settings" id="step-1-navigate-to-ai-agent-settings"></a>

左側のメニューで <mark style="color:blue;">AI 機能</mark> > <mark style="color:blue;">AI エージェント</mark> を選択します。設定する AI エージェントを一覧から探し、その行の <mark style="color:blue;">操作</mark> 列にある <mark style="color:blue;">編集</mark> アイコンをクリックします。

<figure><img src="https://2584873290-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTvHx8hgwYGDTLD3A7xoW%2Fuploads%2Fgit-blob-4d2b79176a41568cb0cd9e0dc9e201b5671a6a6a%2Fai-agent-list-edit-button.png?alt=media" alt="AI エージェント一覧の操作列にある編集アイコンを強調表示"><figcaption><p>操作列の編集アイコンをクリックして AI エージェントの設定画面を開きます</p></figcaption></figure>

### 2. 回答モードの設定画面に切り替える <a href="#step-2-switch-to-answer-mode-settings" id="step-2-switch-to-answer-mode-settings"></a>

<mark style="color:blue;">設定</mark> タブの左側にある設定メニューから、<mark style="color:blue;">回答モード設定</mark> を選択します。

<mark style="color:blue;">回答モード</mark> を <mark style="color:blue;">RAG 質疑応答</mark> または <mark style="color:blue;">Agent モード</mark> に設定するか、<mark style="color:blue;">その他のモード</mark> を開いて <mark style="color:blue;">ハイブリッド</mark> を選択します。

{% hint style="warning" %} <mark style="color:blue;">その他のモード</mark> にある <mark style="color:blue;">テンプレート</mark> モードでは、役割指示を設定できません。
{% endhint %}

<figure><img src="https://2584873290-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTvHx8hgwYGDTLD3A7xoW%2Fuploads%2Fgit-blob-b814b654848f855a4cfe488c9517e7388c11cb3a%2Fai-agent-reply-mode-settings.png?alt=media" alt="設定タブの回答モード設定に表示された RAG 質疑応答、Agent モード、その他のモード"><figcaption><p>回答モード設定で回答モードを選択します</p></figcaption></figure>

### 3. 役割指示欄にテキストを入力する <a href="#step-3-enter-text-in-system-prompt-section" id="step-3-enter-text-in-system-prompt-section"></a>

同じページの下部にある <mark style="color:blue;">役割指示</mark> 欄に指示を入力し、右下の <mark style="color:blue;">保存</mark> をクリックします。

<figure><img src="https://2584873290-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTvHx8hgwYGDTLD3A7xoW%2Fuploads%2Fgit-blob-f56ca83283c5e1689fde5ff2f3808aa9ac70d906%2Fai-agent-instructions-field.png?alt=media" alt="使い方のヒント、プロンプトのクイック挿入、入力欄がある役割指示セクション"><figcaption><p>役割指示欄に内容を入力します</p></figcaption></figure>

これで、AI エージェントは定義した役割指示に従って動作し、専用の AI エージェントになります。


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.maiagent.ai/maiagent-user-guide/ja/build/agent/add-system-prompt.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
