# 為 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>

選擇您要設定的 AI 助理，並點按設定。

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

### 2. 切換至回答模式設定頁面 <a href="#step-2-switch-to-answer-mode-settings" id="step-2-switch-to-answer-mode-settings"></a>

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

將模式設置為 Agent、一般(預設)或混合模式：

{% hint style="warning" %}
「模板」和「工作流」模式無法設置角色指令
{% endhint %}

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

### 3. 在角色指令區段加入文字 <a href="#step-3-enter-text-in-system-prompt-section" id="step-3-enter-text-in-system-prompt-section"></a>

<figure><img src="/files/95S3Qk6EDT0M3dIVPfRu" alt=""><figcaption></figcaption></figure>

如此一來，AI 助理就會根據您所定義的角色指令行動，成為您專屬的 AI 助理。


---

# Agent Instructions: 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:

```
GET https://docs.maiagent.ai/build/add-system-prompt.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
