> 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/en/build/agent/agent-templates.md).

# Create an Agent from the Agent Template Library

Choose an official template from the Agent Template Library, preview a sample conversation, and apply it with one click to create an editable, organization-owned Agent whose instructions, knowledge ba

The <mark style="color:blue;">Agent Template Library</mark> turns Agents designed by MaiAgent into templates. Preview a template's sample conversation, then click <mark style="color:blue;">Apply</mark> if it fits your needs. The system creates an **editable** Agent in your organization. You can then adjust its role instructions, knowledge base, and tools to suit your company.

## Template Library vs. Agent Marketplace <a href="#vs-marketplace" id="vs-marketplace"></a>

Both offer official Agents from the same source. The difference is whether you can edit the Agent after adding it:

|                                   | Agent Marketplace (enable an official built-in Agent)  | Agent Template Library (apply a template)                                 |
| --------------------------------- | ------------------------------------------------------ | ------------------------------------------------------------------------- |
| What you get                      | A **locked** official Agent                            | An **editable** organization-owned Agent                                  |
| Role instructions / tools / model | Cannot be changed                                      | Can be changed freely                                                     |
| Version updates                   | Automatically follows the latest official version      | Keeps the version you applied; later official updates do not overwrite it |
| Counts toward                     | Limit on concurrently enabled official built-in Agents | Plan limit on the number of Agents                                        |

In short: **Use the Agent Marketplace if you want an official Agent that works out of the box and is maintained for you. Use the Agent Template Library if you want to customize an official design.** For the Agent Marketplace, see [Use Official Built-in Agents](/maiagent-user-guide/en/work/built-in-agents/use.md).

{% hint style="info" %}
To see <mark style="color:blue;">Agent Template Library</mark> in the left menu, your organization's plan must include Agent Builder, and your role must have the <mark style="color:blue;">AI Assistants</mark> permission under <mark style="color:blue;">AI Features</mark>. For role settings, see [Role Permissions](/maiagent-user-guide/en/org/roles/role-permission.md).
{% endhint %}

## Example Use Case <a href="#use-case" id="use-case"></a>

Lin, a sales manager at a trading company, wants the team to answer customer emails in a consistent tone with clear key points, but does not want to write role instructions from scratch. In the <mark style="color:blue;">Agent Template Library</mark>, Lin searches for “email” and finds the “Email Reply Writer” template. Lin previews the sample conversation and confirms that it summarizes the incoming email and checks the tone and version before drafting a reply. Lin then clicks <mark style="color:blue;">Apply</mark>. The system creates an Agent with the same name and a dedicated knowledge base. Next, Lin clicks <mark style="color:blue;">Go to AI Assistant Settings</mark>, renames the Agent to the team's preferred name, and saves it. Lin can then upload the company's quotation guidelines to this Agent's knowledge base and adjust its role instructions so replies better match company practice.

## Steps <a href="#steps" id="steps"></a>

### 1. Open the Agent Template Library <a href="#open-library" id="open-library"></a>

Click <mark style="color:blue;">Agent Template Library</mark> in the left menu. The page displays all available official templates as cards. Each card shows the template name, category, and description. If a template uses MaiGPT connectors, such as Microsoft or Google, the corresponding connector icons appear on the card.

<figure><img src="https://1360999650-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6v6TNkkOQVfRYfcNirHL%2Fuploads%2Fgit-blob-eb8a9e821c13eeac598316f4f46c027a96fcb557%2Fagent-templates-library.png?alt=media" alt="Agent Template Library page showing official template cards and category filters"><figcaption><p>Agent Template Library in the left menu and the list of template cards</p></figcaption></figure>

### 2. Filter or search for templates <a href="#filter-and-search" id="filter-and-search"></a>

* Switch between <mark style="color:blue;">All</mark>, <mark style="color:blue;">Role</mark>, and <mark style="color:blue;">Industry</mark> at the top, then select a category tag below, such as <mark style="color:blue;">Legal</mark> or <mark style="color:blue;">Banking</mark>, to narrow the results.
* Use <mark style="color:blue;">Search template names or descriptions</mark> in the upper-right corner to find a template by keyword.

<figure><img src="https://1360999650-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6v6TNkkOQVfRYfcNirHL%2Fuploads%2Fgit-blob-bf733806a3cdff6fed48843a872234d462a219a7%2Fagent-templates-search.png?alt=media" alt="Searching for ‘email’ leaves only the Email Reply Writer card"><figcaption><p>Searching for “email” finds the Email Reply Writer template</p></figcaption></figure>

### 3. Preview a template <a href="#preview" id="preview"></a>

Click a card or its <mark style="color:blue;">Preview</mark> button to open the preview window:

* A sample conversation plays on the left so you can see how the Agent interacts with users. Click <mark style="color:blue;">Replay</mark> to watch it again from the beginning.
* The guide on the right follows the conversation and explains each step.
* An <mark style="color:blue;">Apply</mark> button appears at the bottom. If [Ask AI](/maiagent-user-guide/en/start/header-tools.md#ask-ai) is enabled in your environment, <mark style="color:blue;">Ask AI</mark> also appears. You can ask AI to suggest how to customize the template.

<figure><img src="https://1360999650-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6v6TNkkOQVfRYfcNirHL%2Fuploads%2Fgit-blob-d568636b6585d0cf7130564f6b86a3400f02241b%2Fagent-templates-preview.png?alt=media" alt="Email Reply Writer preview with a sample conversation on the left and a step-by-step guide on the right"><figcaption><p>Preview window: sample conversation and step-by-step guide, with Ask AI and Apply buttons at the bottom</p></figcaption></figure>

{% hint style="info" %}
The preview only plays a sample conversation prepared by the provider. It does not create resources or use your quota.
{% endhint %}

### 4. Apply the template <a href="#apply" id="apply"></a>

Click <mark style="color:blue;">Apply</mark> in the preview window. After creation, an <mark style="color:blue;">Agent Added</mark> window lists the resources created:

* **AI assistant**: It has the same name as the template. If your organization already has an Agent with that name, the system automatically adds a number to the name.
* **Knowledge base**: A dedicated knowledge base with the same name, already linked to this Agent.

You can go straight to the next step from this window:

* <mark style="color:blue;">Go to Conversation</mark>: Try chatting with the new Agent immediately.
* <mark style="color:blue;">Go to Upload Knowledge Base Documents</mark>: Add your company's documents to its dedicated knowledge base.
* <mark style="color:blue;">Go to AI Assistant Settings</mark>: Adjust the name, role instructions, tools, and other settings.
* <mark style="color:blue;">Maybe Later</mark>: Close the window and find it later in the <mark style="color:blue;">AI Assistants</mark> list.

<figure><img src="https://1360999650-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6v6TNkkOQVfRYfcNirHL%2Fuploads%2Fgit-blob-c0c2a7ed4ae4f9f9022aca49fd2214516a65d50c%2Fagent-templates-apply-success.png?alt=media" alt="Agent Added window listing the new Agent, knowledge base, and next-step buttons"><figcaption><p>After applying the template, the new Agent and knowledge base are listed</p></figcaption></figure>

{% hint style="warning" %}
Each time you apply a template, a new Agent is created and counted toward your plan's Agent limit. If the limit has been reached, you will see “The creation limit has been reached. Upgrade your plan or contact an administrator.” For plan limits, see [Trial and Subscription Plans](/maiagent-user-guide/en/others/trial-and-plans.md).
{% endhint %}

### 5. Customize the Agent <a href="#customize" id="customize"></a>

Click <mark style="color:blue;">Go to AI Assistant Settings</mark> to open the new Agent's settings page. Like an Agent you create yourself, you can change its <mark style="color:blue;">Name</mark> and LLM model. You can also use the left menu to adjust <mark style="color:blue;">Knowledge Base Settings</mark>, <mark style="color:blue;">Tools</mark>, <mark style="color:blue;">MaiGPT Connectors</mark>, and <mark style="color:blue;">Skill Settings</mark>. The tools, skills, and connectors included in the template are already attached. Click <mark style="color:blue;">Save</mark> after making changes.

<figure><img src="https://1360999650-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6v6TNkkOQVfRYfcNirHL%2Fuploads%2Fgit-blob-acc3bc9c769f6300116f8ee19334b34089e95991%2Fagent-templates-edit-settings.png?alt=media" alt="Agent settings after applying a template, with the name changed to Demo – Email Reply Writer"><figcaption><p>Agent settings after applying the template: knowledge base, tools, connectors, and skills are preconfigured, and the name can be changed</p></figcaption></figure>

For details on each setting, see [Create an Agent](/maiagent-user-guide/en/build/agent/setup.md) and [Add Role Instructions to an Agent](/maiagent-user-guide/en/build/agent/add-system-prompt.md).


---

# 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/en/build/agent/agent-templates.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.
