> ## 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 prompt library

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

Agents decide “whose role does 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, process, tool preferences)
* Edit or delete
* Import / export JSON
* Type `#` in the input box to select one

The prompt is sent to the model as a system instruction when the conversation starts.

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

### Import conflicts

When you import an agent that already exists, pick a strategy:

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

### Switch in chat

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

## Prompt library

Open **Settings → Prompt library**.

Prompts are reusable templates, useful for:

* A code-review checklist
* A commit-message outline
* A fixed opening such as “propose a plan first, then change the code”

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

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

## Difference 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/jetbrains/customize/prompt-enhancer).
