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

# Writing your agent's greeting and instructions

> How to write a first message and instructions that work on a call: what to include, what to leave to RuleInside, examples you can copy, and how to test each change.

This page helps you write the words your agent works from. When you finish, you will be able to:

* write a greeting that tells callers who they are talking to and invites them to speak,
* write **Additional instructions** that give your agent your store's tone and priorities without repeating or
  contradicting what RuleInside already handles,
* test a change and check it against real conversations.

Plan about half an hour for a first version, then a few short rounds of testing.

## Where you write them

Everything on this page is written in the agent editor: click **Agents** in the sidebar. The greeting is the
[First message](/agent-settings#first-message) card and the instructions are the
[System prompt](/agent-settings#system-prompt) card. What you can write depends on the agent's
[edit level](/agent-settings#edit-levels), shown as a badge in the editor header.

| Edit level | What you can write | Limit |
| - | - | - |
| **View only** | Nothing. You can read the current instructions. | |
| **Name, voice & greeting** | The **First message** and **Personalization variables** | 1,000 characters for the first message |
| **Instructions** | Everything above, plus **Additional instructions**, **Who speaks first**, the **Recording notice** sentence and, when transfers are on for your account, **When to transfer** for each number | 8,000 characters for Additional instructions; 500 for the recording sentence and for each **When to transfer** |
| **Full control** | Everything above, plus the whole **System prompt**, which takes the place of Additional instructions | 20,000 characters |

Only account **owners** can change an agent. Members can read every setting but cannot edit. Agents you create
yourself always start at **Full control**; your main agent keeps the level RuleInside set for it.

## What is already handled for you

Your agent arrives with instructions and store tools set up by RuleInside. At the **Instructions** level the
System prompt card says so: "Platform behaviour (memory, store lookups, call handling) stays managed." Your
Additional instructions are added in their own section, and the rest of the prompt is never touched.

Before you write anything, open the **System prompt** card and click **Show** under **Current agent instructions
(managed)**. Read what is already there. Your job is to add what only you know: your store, your products, your
tone. You do not need to describe the things below, and you should not contradict them.

| Already handled | How it works | What not to write |
| - | - | - |
| **Order questions** | For a customer logged in to your store: the status of their own orders, and the tracking number when your store records one. Someone not logged in gets an order's details only by giving its order number together with the billing email and postcode on that order. | Instructions that promise order details "for any order", or on less than those checks. |
| **Product search** | Searches your catalogue by meaning, not only by exact words. | A product list pasted into the instructions to "search". |
| **Coupon codes** | Tells the shopper whether a coupon code is valid. | Instructions that promise a discount the store has not set up. |
| **Refund requests** | The agent records the request and tells the shopper: "Your refund request has been recorded and sent to the store owner to review. They will get back to you about it." A person approves every refund; nothing is refunded automatically. Only shoppers your store has recognised can make a request. | "Approve refunds under 20 euros", or any promise of a refund, an amount or a date. See [Refund requests](/refunds). |
| **Recording objections** | If a caller says they do not want to be recorded, that call's recording and transcript are deleted. With the recording notice said after the first exchanges, the agent says someone from the team will get back to them and ends the call. | Your own script for what to do when someone objects to recording. |
| **The store tools** | Order look-up, product search and coupon check are marked **Managed** on the [Tools](/tools) page and always stay on the agent. | Instructions to "turn off" or replace them. |

Some behaviour is set by a setting, not by words. Call length, silence, interruptions, the language and the time
zone all have their own fields in [Agent settings](/agent-settings). We recommend using the setting rather than
writing an instruction for it: for example, set **Maximum call length (minutes)** under **Call limits** instead of
writing "keep calls under ten minutes".

## The greeting

The greeting is the **First message**: "The first thing customers hear." It is up to 1,000 characters, and it is
required when **Agent speaks first** is chosen.

### What a good greeting contains

1. **That the caller is talking to an AI assistant.** Always include this. The portal does not stop you saving a
   greeting without it, but always include it.
2. **That the call may be recorded**, when **Recording notice** is set to **In the opening line**. If you choose
   **After the first exchanges** instead, take the recording sentence out of the greeting, or it will be said twice.
   The greeting must still say the caller is talking to an AI assistant.
3. **Your store's name**, so the caller knows they reached the right place.
4. **One open question** that hands the turn to the caller, such as "What can I help you with today?"

### Keep it short for the ear

A greeting is heard, not read. Some advice:

* Aim for two or three short sentences, about ten seconds when you read it aloud. Read it aloud before you save.
* End on the question, so it is clear that it is the caller's turn to speak.
* Leave out web addresses, symbols, abbreviations and opening hours. They are hard to follow by ear, and are better
  given later, if the caller asks.
* If you want the recording notice always heard in full, switch on **Callers cannot interrupt the greeting** under
  **Conversation behaviour**.
* Write the greeting in the language your agent speaks.

### Example greetings

Replace the parts in angle brackets with your own details.

A fashion store:

```text theme={null}
Hi, thanks for calling <Your store>. I'm the store's AI assistant, and this call may be recorded. Are you looking for something new, or can I help with an order?
```

An electronics store:

```text theme={null}
Hello, you've reached <Your store>. I'm an AI assistant and this call may be recorded. Tell me what you're looking for, and I'll help you find the right model.
```

A food store:

```text theme={null}
Hi, welcome to <Your store>. You're speaking with our AI assistant, and this call may be recorded. What can I help you with today?
```

With **Recording notice** set to **After the first exchanges**, the same greeting keeps the AI part and drops the
recording part:

```text theme={null}
Hi, welcome to <Your store>. You're speaking with our AI assistant. What can I help you with today?
```

The recording sentence then goes in **What the agent says** (up to 500 characters, said word for word), for
example "Just so you know, this call may be recorded for quality purposes."

### Greeting a customer by name

[Personalization variables](/agent-settings#personalization-variables) are values your storefront passes in when a
call starts, such as the customer's first name. Write a variable's name in double curly braces, for example
`{{first_name}}`. When no value is passed in, the default you set is used instead.

Choose a default that still reads naturally. With the default `there`:

```text theme={null}
Hi {{first_name}}, welcome back to <Your store>. I'm the store's AI assistant, and this call may be recorded. How can I help today?
```

A known customer hears "Hi Laura, welcome back…", and everyone else hears "Hi there, welcome back…". If "welcome
back" would sound odd to a first-time visitor, drop it:

```text theme={null}
Hi {{first_name}}, thanks for visiting <Your store>. I'm an AI assistant and this call may be recorded. What are you shopping for today?
```

Write the variable's name exactly as it appears in your list of variables. **Save variables** saves that list
straight away; the first message saves with **Save changes**.

<Note>
  The website assistant has its own **Returning-shopper greeting**, which uses `{name}` with single braces and has its
  own rules. See [The returning-shopper greeting](/website-assistant#the-returning-shopper-greeting).
</Note>

### Who speaks first

With **Agent speaks first**, the greeting is said as soon as the call connects. With **Caller speaks first**, the
agent waits for the person to answer ("Hello?"), then says the greeting. Either way, the greeting is the same text
and needs the same AI disclosure. **Who speaks first** needs the **Instructions** level.

## Writing Additional instructions

**Additional instructions** take up to 8,000 characters: "Added to your agent's instructions. Leave blank to
remove." You do not need to use all of them. A clear page of instructions usually does more than a long one.

### A simple structure

We recommend five short parts, in this order. Plain labels in capitals, as in the example further down, keep it
easy for you to find things later.

1. **Who you are.** The store's name, what it sells and who buys from it.
2. **Tone.** How the agent should sound, in a sentence or two.
3. **What to help with.** The most common reasons people contact you, in order of importance, with the facts the
   agent needs for each.
4. **What to avoid.** The topics that are out of scope, said once, in one place.
5. **When to hand over.** What to do when the agent cannot help: your support email, or a transfer when transfers
   are on.

### Write for the ear

Everything the agent says is spoken. Some advice:

* **Short sentences.** Ask for replies of one or two sentences, then let the customer talk.
* **One question at a time.** "What size do you usually wear?" works better on a call than three questions in one
  breath.
* **Two options, not ten.** Ask the agent to offer two choices and then ask if the customer wants to hear more.
* **No lists or formatting in what it says.** Tell the agent to speak in sentences and never to read out bullet
  points, symbols or web addresses.
* **Show how to say numbers.** Give one example of how a price, a weight or a phone number should sound, such as
  "say 24.99 euros as twenty-four ninety-nine". If you give your phone number or email address, write them the way
  they should be spoken.
* **Help with names.** If a brand or product name is easy to mishear, add it to **Words to recognise** under
  **Conversation behaviour**, so the agent catches it when a customer says it.

### Be specific

"Be helpful" and "be professional" give the agent nothing new to do. Say what helpful looks like in your store.

| Instead of | Try |
| - | - |
| Be helpful and friendly. | Sound like a relaxed shop assistant: warm, brief, everyday words. Answer the question first, then offer one useful next step. |
| Know our shipping policy. | For shipping costs and delivery times, answer from the Shipping and returns document. If it does not cover the question, say so and give our support email. |
| Recommend products. | When someone describes what they need, suggest at most two products that fit, and say in one sentence why each fits. Then ask which sounds better. |
| List the sizes: S, M, L, XL. | When asked about sizes, say the range in a sentence, such as "we have it from small to extra large", then ask which size they usually wear. |
| Prices: €24.99, €39.00. | Say prices the way a person would: "twenty-four ninety-nine", "thirty-nine euros". |
| Handle angry customers well. | If someone is upset, say you understand in one short sentence, then deal with the problem. Do not keep apologising. |
| Upsell whenever possible. | When someone has chosen a camera, offer a matching memory card once. If they say no, do not offer it again. |
| Never discuss politics. Never talk about other shops. Never give opinions on the news. | Keep the conversation on our products, orders and store policies. If asked about anything else, say politely that you can only help with the store, and ask what they need. |

### Do not add a "never" rule after every bad call

When a conversation goes wrong, it is tempting to add a line such as "never do that again". After a few weeks the
instructions become a long list of exceptions that is hard to keep consistent: rules start to overlap, and some
contradict each other or the managed instructions.

Instead, find the instruction that left the gap and rewrite it. For example, suppose the agent recommended a
grinder to someone who had just said they buy ground coffee. Rather than adding "never suggest a grinder to people
who buy ground coffee", rewrite the original line:

```text theme={null}
Before: Recommend a grinder with every coffee order.
After:  Suggest a grinder only to customers who buy whole beans and do not have one yet.
```

One clear boundary is fine, such as "Stay on coffee, brewing and the shop." It is a long list of narrow
prohibitions that we recommend avoiding.

### Referring to your documents

Facts that change, such as shipping rates, return windows, opening hours or a size guide, are best kept in
[Knowledge](/knowledge) documents rather than typed into the instructions. When they change, you update one
document instead of searching your instructions.

In the instructions, say **when** to use a document, not what it says:

```text theme={null}
For questions about delivery costs, delivery times and returns, answer from the Shipping and returns document.
```

Adding or changing documents needs **Full control** on the agent. On your main agent below Full control, contact
RuleInside to add a document for you. A document in **Prompt** mode is always given to the agent; one in **Auto**
mode is looked up when it is relevant.

### Describing when to transfer

If RuleInside has switched transfers on for your account, each number under
[Transfer to a person](/agent-settings#transfer-to-a-person) has its own **When to transfer** box (up to 500
characters, required). Write the transfer conditions there, and be specific:

```text theme={null}
The caller asks to speak with a person, wants to change an order that has already shipped, or is a business asking about wholesale prices.
```

Some advice:

* Keep the conditions in **When to transfer**, and keep your Additional instructions consistent with them. Two
  different versions of the same rule are hard to maintain.
* Transfers work on phone calls only. For conversations on your website, tell the agent what to offer instead, such
  as your support email.
* If the card says "No transfer numbers. The agent never hands a call over.", do not write instructions that promise
  a transfer.

### At Full control: editing the whole prompt

At **Full control** the System prompt card shows the whole prompt in one box, up to 20,000 characters, instead of
Additional instructions. All the advice above still applies. In addition:

* **Keep RuleInside's sections.** If your agent's prompt contains RuleInside's platform sections, they must still be
  there when you save, or the save is refused with "Your system prompt must keep its platform sections (…).
  Restore them and save again." A blank agent you created has none.
* **Copy the prompt before a big edit.** Paste it into a document on your computer first, so you can put it back.
* **Leave alone what you did not write.** If you are not sure what a line does, keep it and contact RuleInside.
* The greeting (when the caller speaks first) and the recording sentence (when said after the first exchanges) are
  kept in their own sections. They are not shown in this box and are kept automatically when you save.

## A complete example

Here is a full set of Additional instructions for a fictional WooCommerce coffee shop. It is about 2,900
characters, well under the 8,000 limit. Copy it, then replace every detail with your own. It assumes a Knowledge
document called "Shipping and returns" is attached to the agent.

```text theme={null}
WHO YOU ARE
You are the voice assistant for Fernhill Coffee Roasters, an online shop that roasts and sells coffee beans and brewing equipment. We roast in small batches every Monday and Thursday and ship from one warehouse. Our customers range from beginners with their first French press to people who weigh every dose.

TONE
Warm, relaxed and knowledgeable, like a good barista on a quiet morning. Use everyday words and avoid jargon unless the customer uses it first. Keep most replies to one or two short sentences, then let the customer talk. Ask one question at a time. Speak in full sentences: never read out lists, bullet points, symbols or web addresses. When there are several options, give two and ask if they would like to hear more.

WHAT TO HELP WITH, IN THIS ORDER
1. Choosing coffee. Ask how they brew: espresso, filter, French press, moka pot or cold brew. Then ask whether they like chocolatey and smooth, or bright and fruity. Suggest one or two coffees that fit, and say in one sentence why.
2. Choosing equipment. For beginners, start with the simplest option that fits their budget. Suggest a grinder only to customers who buy whole beans and do not have one yet.
3. Brewing help. Give one clear tip at a time and check it helped before giving another. For filter coffee, our starting recipe is fifteen grams of coffee to two hundred and fifty grams of water.
4. Shipping and returns. For delivery costs, delivery times and returns, answer from the Shipping and returns document. If it does not cover the question, say so and give our support email.
5. Orders and refunds. Use the store's built-in order and refund handling as usual. Never promise a refund, a refund amount or a date.

HOW TO SAY THINGS
Say prices the way a person would, for example "fourteen ninety-five" for 14.95 euros. Say weights in words, for example "two hundred and fifty grams". Our three house coffees are Alba, Campo and Notturno; say them as written. Our decaf is called Notturno Decaf.

WHAT TO AVOID
Stay on coffee, brewing and the shop. If someone asks about something else, say politely that you can only help with Fernhill Coffee, and ask what they would like to know. Do not give medical advice about caffeine: mention Notturno Decaf, and suggest they ask their doctor about anything medical. Do not guess stock levels, roast dates or delivery dates. If you cannot find the answer, say you are not sure.

WHEN YOU CANNOT HELP
Our team answers email Monday to Friday, nine in the morning to five in the afternoon. Give the support address, spoken as "hello at example dot com", and say someone will reply within one working day. If the customer is upset, say you understand in one short sentence before giving the address.

ENDING THE CONVERSATION
When the customer has what they need, ask once if there is anything else. If not, thank them for choosing Fernhill Coffee and say goodbye.
```

## Testing your changes

A change is only finished when you have heard it work. We recommend this routine:

<Steps>
  <Step title="Save">
    Click **Save changes** in the bar at the bottom of the editor and wait for "Agent updated." Closing a panel does
    not save it.
  </Step>

  <Step title="Try it in Preview">
    Click **Preview** in the editor header. Preview talks to the real agent with its **saved** settings. Start with
    **Text** to check the words, then try **Voice** to hear the greeting and the pace. See [Testing](/testing).
  </Step>

  <Step title="Ask the questions your customers ask">
    Keep a short list of five or six real questions, such as "what's your cheapest grinder?" or "how long does
    delivery take?", and ask the same ones after every change, so you can compare.
  </Step>

  <Step title="Read real conversations">
    After real customers have talked to the agent, open [Calls](/conversations) and read a few transcripts. The
    transcript also shows the actions the agent took and when it checked your knowledge base, which tells you
    whether it used the document you expected.
  </Step>

  <Step title="Change one thing at a time">
    If you change the tone, the greeting and three rules at once, you cannot tell which change made the difference.
    Make one change, test it, then make the next. Keep a note of what you changed and when.
  </Step>
</Steps>

<Note>
  Preview does not identify you as a customer, so store tools answer as they would for a guest. To check order
  answers for logged-in customers, read real conversations in **Calls**.
</Note>

## Common questions

<AccordionGroup>
  <Accordion title="My instructions are ignored">
    First check that the change was saved: you should have seen "Agent updated." Preview uses the saved settings
    only. Then click **Show** under **Current agent instructions (managed)** and look for anything that says the
    opposite of your instruction. If your instruction is about orders, refunds or recording, it is already handled
    for you (see [What is already handled for you](#what-is-already-handled-for-you)). Otherwise, rewrite the
    instruction to be more specific, with an example of what the agent should say, and test again.
  </Accordion>

  <Accordion title="The agent reads out symbols or formatting">
    Check your instructions and documents for bullet points, symbols and web addresses the agent may repeat. Add a
    line such as "Speak in full sentences and never read out symbols or web addresses", and give one spoken example
    for prices or phone numbers. At **Full control**, the **Text normalisation** setting under **Voice** decides how
    numbers and symbols are turned into speech; contact RuleInside before changing it if you are not sure.
  </Accordion>

  <Accordion title="It talks too long">
    Ask for replies of one or two sentences, and for two options at a time rather than full lists. Make sure the
    instructions do not ask for long explanations elsewhere. Callers can also cut in: with **Callers can interrupt
    the agent** on (under **Conversation behaviour**), the agent stops talking as soon as the caller speaks.
  </Accordion>

  <Accordion title="Can I change what it says about orders?">
    Order look-up is one of RuleInside's store tools, marked **Managed**, and you cannot change or remove it. It
    answers a customer logged in to your store about their own orders, and anyone else only when they give the
    order number together with the billing email and postcode on that order.
    Your instructions can set the tone around it, but they cannot widen who gets order details. If you need
    something changed, contact RuleInside.
  </Accordion>

  <Accordion title="Why is the box greyed out?">
    Either you are a member rather than an owner, or the agent's edit level does not include that field.
    **Additional instructions** need the **Instructions** level; the whole **System prompt** needs **Full control**;
    a **View only** agent cannot be changed at all. See [Edit levels](/agent-settings#edit-levels).
  </Accordion>

  <Accordion title="The recording notice is said twice">
    You chose **After the first exchanges** but the greeting still contains the recording sentence. Take it out of
    the greeting and keep the AI disclosure.
  </Accordion>

  <Accordion title="The greeting says 'Hi there' instead of the customer's name">
    No value was passed in for that variable, so its default was used. Check the default under **Personalization
    variables**, and check that the name in the greeting matches the variable's name exactly.
  </Accordion>

  <Accordion title="Can I tell the agent to give discounts or approve refunds?">
    Not refunds: a person approves every refund, and the agent only records the request. For discounts, the agent
    can tell a shopper whether a coupon code is valid. We recommend not writing instructions that promise discounts
    your store has not set up.
  </Accordion>

  <Accordion title="How do I remove my Additional instructions?">
    Empty the box and click **Save changes**. Saving it empty removes your section; the managed instructions stay
    as they are.
  </Accordion>
</AccordionGroup>

## Next steps

<CardGroup cols={2}>
  <Card title="Agent settings" icon="sliders" href="/agent-settings">
    Every field in the agent editor, including the first message and the system prompt.
  </Card>

  <Card title="Testing" icon="flask" href="/testing">
    Try your changes with Preview before customers hear them.
  </Card>

  <Card title="Knowledge" icon="book" href="/knowledge">
    Add the documents your agent answers from.
  </Card>

  <Card title="Calls" icon="phone" href="/conversations">
    Read real conversations and see where the agent can improve.
  </Card>
</CardGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.