> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mossx.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Agents and the prompt library

> Create agents and prompt templates, then call them from the input box with # and !.

Agents decide "who is doing the work". The prompt library decides "which reusable text to insert into the input box". Maintain both in Settings, and call them from the input box with `#` and `!`.

## Agents

Open **Settings → Agents**.

You can:

* Create an agent: name + prompt (role, tone, workflow, tool preferences)
* Edit or delete
* Import / export JSON
* Type `#` in the input box to select one

The prompt is sent as a system instruction when the chat starts. A name is required. The prompt is optional, but a blank agent is almost never useful.

<img src="https://mintcdn.com/mossx-docs/kz4nt5KFSKzkAZwe/images/vscode/agents-list.png?fit=max&auto=format&n=kz4nt5KFSKzkAZwe&q=85&s=f9f7e2280adc8289be680104866e3945" alt="Agents list" width="100%" data-path="images/vscode/agents-list.png" />

### Import conflicts

When an imported agent already exists, pick a strategy:

| Strategy  | Result                                  |
| --------- | --------------------------------------- |
| Skip      | Keep the existing one                   |
| Overwrite | Replace it with the version in the file |
| Duplicate | Generate a new ID and keep both         |

Preview how many items will be created, updated, or conflicted before you import.

### Switch in a chat

Type `#` to open completions. After you pick one, the current session uses that agent. You can clear the selection to return to the default behavior.

If no agent is available, the completion says **No agents available**.

## Prompt library

Open **Settings → Prompt library**.

Prompts are reusable templates. They work well for:

* Code review checklists
* Commit message outlines
* A fixed opener such as "give a plan first, then change the code"

After you create one, type `!` in the input box to insert it. Insertion is text. You can still edit it before you send.

<img src="https://mintcdn.com/mossx-docs/kz4nt5KFSKzkAZwe/images/vscode/prompt-library.png?fit=max&auto=format&n=kz4nt5KFSKzkAZwe&q=85&s=b4aaa913a30bd9b7c78d8d6d32057f76" alt="Prompt library" width="100%" data-path="images/vscode/prompt-library.png" />

The prompt library also supports import and export, so you can share it with teammates.

## How this differs from prompt enhancer

| Capability      | Trigger                        | Result                                |
| --------------- | ------------------------------ | ------------------------------------- |
| Prompt library  | Type `!`                       | Insert a template you wrote           |
| Prompt enhancer | Click enhance on the input box | Let a model rewrite the current draft |

See [Prompt enhancer](/en/vscode/customize/prompt-enhancer).
