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

# Prompt Library: Save, Organize, and Reuse Your Prompts

> Build a personal and team-wide prompt library in Layest. Save your best prompts, organize by category, and reuse them in any AI assistant conversation.

The Prompt Library is a curated collection of saved prompts you and your team can build up over time, making it fast to reuse the phrasing and structures that consistently produce great results. Instead of retyping the same instructions from scratch every session, you save a prompt once, organise it in a folder or tag it by use case, and inject it into any conversation with a single keystroke.

## Prompt Library vs. Knowledge Prompts

Layest has two distinct prompt systems, and it's worth knowing the difference before you start building your library:

<Tabs>
  <Tab title="Prompt Library">
    The **Prompt Library** (this feature) is for *you*, the user. It stores reusable message templates that you insert into the AI Assistant chat at conversation time. Prompts here are personal by default, but can be promoted to workspace-level for the whole team.
  </Tab>

  <Tab title="Knowledge Prompts">
    **Knowledge Prompts** live inside an agent's configuration and shape how that agent behaves for *every* conversation — they're part of the agent's system instruction set, not a one-off message. Edit them in **Agents → \[Agent Name] → Configuration → System Prompt**.
  </Tab>
</Tabs>

In short: Prompt Library = what *you* say; Knowledge Prompts = what the *agent* always knows.

## Creating and Saving a Prompt

<Steps>
  <Step title="Open the Prompt Library">
    In the left navigation bar, click **Assistant**, then select the **Prompt Library** tab. Alternatively, type `/prompt` in any chat input to open the picker inline.
  </Step>

  <Step title="Click New Prompt">
    Press the **+ New Prompt** button in the top-right corner of the library panel.
  </Step>

  <Step title="Write your prompt">
    Give the prompt a descriptive **Name** (e.g. "Summarise meeting notes"), choose a **Category** folder (or create a new one), and type the prompt text in the **Content** field. Use `{{variable}}` placeholders for parts you want to customise at run time.

    ```text theme={null}
    Summarise the following meeting notes in three sections:
    Key decisions, Action items (with owners), and Open questions.

    Meeting notes:
    {{paste notes here}}
    ```
  </Step>

  <Step title="Add tags (optional)">
    Type one or more tags in the **Tags** field to make the prompt easier to find later (e.g. `meetings`, `summarisation`, `internal`).
  </Step>

  <Step title="Save the prompt">
    Click **Save**. The prompt is now available in your personal library and in the `/prompt` picker inside any chat conversation.
  </Step>
</Steps>

## Organising Prompts with Folders and Tags

As your library grows, keeping prompts organised saves time when you need to find the right one quickly.

**Folders** group prompts by broad category. Create a folder by clicking **+ New Folder** in the left sidebar of the Prompt Library. Drag and drop prompts between folders to reorganise them.

**Tags** cross-cut folders so a single prompt can surface in multiple contexts. Add tags when creating or editing a prompt. You can filter the library view by tag using the **Tags** filter at the top of the panel.

<Tip>
  Agree on a shared tagging convention with your team before promoting prompts to the workspace level. Consistent tags like `research`, `client-facing`, and `data-extraction` make it much easier to search across a large shared library.
</Tip>

## Using a Saved Prompt in a Chat Conversation

There are two ways to insert a saved prompt into an active conversation:

**Method 1 — Slash command picker**

1. In the chat input, type `/prompt` and press `Space`.
2. Start typing the prompt name to filter results.
3. Press `Enter` or click the prompt to insert it into the input field.
4. Fill in any `{{variable}}` placeholders, then press `Enter` to send.

**Method 2 — Library panel**

1. Open the Prompt Library panel.
2. Find the prompt you want and hover over it.
3. Click the **Insert** button (arrow icon) to copy the prompt text into the active chat input.
4. Edit as needed, then press `Enter` to send.

## Sharing Prompts with the Workspace

Personal prompts are visible only to you. To share a prompt with everyone in your workspace:

1. Hover over the prompt in the library and click **⋯ More**.
2. Select **Share with workspace**.
3. Choose a permission level:
   * **View & use** — teammates can insert the prompt but cannot edit the original
   * **View, use & edit** — teammates can modify the prompt and save their changes

Workspace-level prompts appear in a **Shared** folder visible to all members. Only workspace admins and the original prompt creator can delete or unpublish a shared prompt.

<Note>
  Workspace admins can restrict who is allowed to promote prompts to the workspace level. If you don't see the **Share with workspace** option, ask your admin to grant you the **Prompt Publisher** role in **Settings → Roles & Permissions**.
</Note>

## Example Prompt Templates

Kick-start your library with these ready-to-use templates for common tasks.

<AccordionGroup>
  <Accordion title="Research Summary">
    Use this prompt to get a structured briefing on any topic.

    ```text theme={null}
    You are a research assistant. Summarise the following topic for a professional audience:

    Topic: {{topic}}

    Structure your response as:
    1. Overview (2-3 sentences)
    2. Key facts and figures
    3. Recent developments (last 12 months)
    4. Key stakeholders or players
    5. Open questions or areas of uncertainty
    ```
  </Accordion>

  <Accordion title="Document Summarisation">
    Quickly distil a long document into the essentials.

    ```text theme={null}
    Summarise the document below. Your summary must:
    - Be no longer than 200 words
    - Capture the main argument or purpose
    - List up to five key takeaways as bullet points
    - Note any recommendations or next steps

    Document:
    {{paste document text here}}
    ```
  </Accordion>

  <Accordion title="Structured Data Extraction">
    Extract specific fields from unstructured text and return them as JSON.

    ```text theme={null}
    Extract the following fields from the text below and return them as valid JSON.
    If a field is not present, use null.

    Fields: name, company, email, phone, date_mentioned, topics_discussed

    Text:
    {{paste text here}}
    ```
  </Accordion>

  <Accordion title="Stakeholder Email Draft">
    Draft a professional update email from bullet-point notes.

    ```text theme={null}
    Draft a professional email to {{recipient}} updating them on the following:

    Key points:
    {{bullet points}}

    Tone: {{formal / friendly / neutral}}
    Desired length: {{short / medium / long}}

    Include a clear subject line and a call to action at the end.
    ```
  </Accordion>
</AccordionGroup>
