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

# Write your guidelines

> What guidelines are, how to add them, @mentions, and writing tips.

**Guidelines** are instructions injected into your employee's system prompt. They live below [Identity setup](/help/ai-employees/identity-and-guidelines/identity-setup) on the **Identity & guidelines** tab in [**AI Employees**](https://app.heyy.io/ai-employees) and shape how the employee behaves in specific situations — escalation rules, when to pull @Content, seasonal promos, and more.

Where identity setup sets global defaults, guidelines add the playbook. Active guidelines from all four categories are combined on every reply unless a [guideline override](/help/ai-employees/going-live/automation-guideline-overrides) on a specific automation says otherwise.

<Tip>
  Finish [Identity setup](/help/ai-employees/identity-and-guidelines/identity-setup) first, then add a few focused guidelines per category. Test each change in the [Playground](/help/ai-employees/going-live/test-in-playground) before going live.
</Tip>

## How guidelines work

When a customer message reaches your AI employee, Heyy merges active guidelines with identity setup, [content](/help/ai-employees/content/add-your-website), and [capabilities](/help/ai-employees/capabilities/choose-attributes-to-expose) to produce each reply.

Each guideline is a short, titled instruction. You group them into one of four categories — each category has its own accordion and a dedicated article with goals and examples.

<Frame>
  <img src="https://mintcdn.com/heyy-c8bd5c9e/1coCVJUJuVs6SA9x/assets/ai-employees-guidelines-categories.png?fit=max&auto=format&n=1coCVJUJuVs6SA9x&q=85&s=40c86f5de3ea95316b2f1fb7a2c528e9" alt="Four guideline category accordions on the Identity & guidelines tab" width="1366" height="629" data-path="assets/ai-employees-guidelines-categories.png" />
</Frame>

| Category                                                                                                          | Use for                                                              |
| ----------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------- |
| [**Identity & style**](/help/ai-employees/identity-and-guidelines/identity-and-style)                             | Who the employee is and how they communicate in chat.                |
| [**Conversation flow & objectives**](/help/ai-employees/identity-and-guidelines/conversation-flow-and-objectives) | Goals per thread and when to use @Content, @Actions, or @Assets.     |
| [**Boundaries**](/help/ai-employees/identity-and-guidelines/boundaries)                                           | Hard limits, compliance, escalation, and topics to decline.          |
| [**Other**](/help/ai-employees/identity-and-guidelines/other)                                                     | Seasonal promos, regional rules, and one-offs that do not fit above. |

## Anatomy of a guideline

Every guideline has the same fields whether you create it from scratch or start from a template.

| Field        | Description                                                                                 |
| ------------ | ------------------------------------------------------------------------------------------- |
| **Title**    | A short label your team recognizes in the accordion list.                                   |
| **Status**   | **Active** guidelines are injected on every reply; **inactive** ones are saved but ignored. |
| **Prompt**   | The instruction the employee follows when the guideline is active.                          |
| **Category** | One of the four types above — set when you create the guideline.                            |

## Add a guideline

1. Open an employee and go to **Identity & guidelines**.
2. Expand the category accordion you want.
3. Click **New**. A popup opens with the option to start from a template or write your own.
4. To use a template, click the **three-dot icon** to browse templates for that category. Hovering over or clicking a template previews its contents — worth browsing even if you don't use one as-is, simply for inspiration on structure and phrasing.
5. To write your own, type a rough draft directly into the prompt field the way you'd explain the rule out loud, then click **Optimize** — you do not need to arrive with polished prompt-engineering language.
6. Enter a title, set status to **Active**, and click **Save**.

<Frame>
  <img src="https://mintcdn.com/heyy-c8bd5c9e/1coCVJUJuVs6SA9x/assets/ai-employees-guidelines-add.png?fit=max&auto=format&n=1coCVJUJuVs6SA9x&q=85&s=4fc6ec17fd21b64291d7ae2905c30e05" alt="New guideline form with title, prompt field, and Optimize and Save buttons" width="1366" height="634" data-path="assets/ai-employees-guidelines-add.png" />
</Frame>

Use **Suggestions** when creating a guideline to start from a template for that category.

## Guidelines are prompt engineering, made accessible

Every guideline you write, regardless of category, is converted into a carefully engineered prompt behind the scenes. Small differences in phrasing, structure, and specificity can produce meaningfully different behavior from an AI system — and most people configuring an employee are not prompt engineers, and should not need to be. The template library and the Optimize button exist to close that gap: you supply the business logic and the intent, and the platform translates it into language the model follows reliably.

<Tip>
  Do not aim for "perfect" wording on the first attempt. Write the rough version the way you would naturally explain it to a colleague, let Optimize do the heavy lifting, then review the result before saving — and re-run Optimize again if the first pass does not quite land.
</Tip>

## How Optimize works

Every guideline has an **Optimize** button next to Save. Click it, and a smaller model rewrites the prompt before it goes live, tightening the wording without changing what it tells the employee to do.

| Optimize does this                             | Example                                                                                                                                                                  |
| ---------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **Removes anything already covered elsewhere** | If name and gender are already set in [Identity setup](/help/ai-employees/identity-and-guidelines/identity-setup), Optimize will not leave them repeated in a guideline. |
| **Removes duplicate role-specific rules**      | Support and Sales roles carry built-in behavior — a guideline restating something the Role field already handles gets dropped.                                           |
| **Tightens the structure**                     | Long, meandering phrasing gets shortened into something direct, without losing the actual instruction.                                                                   |

For example, this:

> Before recommending anything, learn the customer's situation one question at a time: (1) what they're trying to achieve, (2) their timeline, (3) their budget or company size. Skip anything already answered in the conversation. Once you have the picture, recommend the best fit and move to the next step.

becomes:

> Qualify leads by asking about their goals, timeline, and budget or company size. Ask one question at a time, skipping any details already provided. Once you have a clear picture, recommend the best solution.

Same instruction, same order of operations, tighter sentences — and any bracketed template placeholders are folded into plain language once you have filled in your specifics.

<Tip>
  Run Optimize again after any significant edit, not just the first time you write a guideline — guidelines pick up small contradictions and repetition as they grow, especially once several start to overlap. Once a guideline is already tight, the Optimize button will not reappear until you make a change worth re-running it on.
</Tip>

## @mentions in prompts

Type `@` in the prompt editor to reference capabilities you have already configured. Mentions tell the employee which attributes, knowledge, tools, or files you mean — without pasting long IDs or URLs.

<Frame>
  <img src="https://mintcdn.com/heyy-c8bd5c9e/1coCVJUJuVs6SA9x/assets/ai-employees-guidelines-mentions.png?fit=max&auto=format&n=1coCVJUJuVs6SA9x&q=85&s=e5db910714a560aaae0ce9c35dadeb70" alt="@ mentions dropdown open in a guideline's prompt editor, showing Attributes, Actions, and Content options" width="1437" height="876" data-path="assets/ai-employees-guidelines-mentions.png" />
</Frame>

| Mention        | Description                                                           |
| -------------- | --------------------------------------------------------------------- |
| **Attributes** | Contact fields the employee can read, share, or update.               |
| **Content**    | Knowledge sources from the Content tab — websites, Q\&A, and uploads. |
| **Actions**    | Tools the employee may invoke during the conversation.                |
| **Assets**     | Shareable files from the Assets tab — PDFs, images, and brochures.    |

If nothing appears when you type `@`, configure [attributes](/help/ai-employees/capabilities/choose-attributes-to-expose), [content](/help/ai-employees/content/add-your-website), [actions](/help/ai-employees/capabilities/actions-overview), or [assets](/help/ai-employees/capabilities/share-files-in-chat) first, then return to the prompt.

## Writing tips

| Tip                                                    | Why it helps                                                                                                                                     |
| ------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| Prefer several focused guidelines over one long block. | Easier to test, deactivate, and update without side effects.                                                                                     |
| Write observable situations.                           | "When the customer asks for a refund" beats "handle complaints."                                                                                 |
| Deactivate instead of delete.                          | Seasonal or campaign rules can be turned off and reused later.                                                                                   |
| Avoid duplicating identity setup.                      | Role, tone, and answer length belong in [Identity setup](/help/ai-employees/identity-and-guidelines/identity-setup) — use guidelines for nuance. |
| Test after every change.                               | Run real customer-style questions in the [Playground](/help/ai-employees/going-live/test-in-playground).                                         |

## How the four categories work together

Although each category is configured separately, they combine into a single, coherent instruction set that governs every conversation. It helps to think of each as answering a different question:

| Category                                                                                                          | Answers                                                                |
| ----------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------- |
| [**Identity & style**](/help/ai-employees/identity-and-guidelines/identity-and-style)                             | How should this employee sound?                                        |
| [**Conversation flow & objectives**](/help/ai-employees/identity-and-guidelines/conversation-flow-and-objectives) | What is it trying to achieve, and what should it draw on to get there? |
| [**Boundaries**](/help/ai-employees/identity-and-guidelines/boundaries)                                           | What must it never do, under any circumstances?                        |
| [**Other**](/help/ai-employees/identity-and-guidelines/other)                                                     | What else is unique to how this business operates?                     |

A well-configured employee has thoughtful input across all four, not just one or two. It is common to over-invest in Identity & style, since tone feels like the most visible, most "creative" part of setup, while under-investing in Boundaries, since it feels like a formality — in practice the opposite emphasis is usually more valuable: an imperfect tone rarely causes real harm, but a missing boundary around pricing, competitors, or off-limits topics can.

<Tip>
  Once all four categories are filled in, audit the result by imagining a few different, slightly awkward customer messages and mentally walking through how the employee would respond. If you cannot confidently predict the reply, a guideline somewhere needs to be more specific.
</Tip>
