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

# Behaviour

> What the assistant does for messages, comments, tags, story mentions and story replies.

The **Behaviour** page has three parts: **when** the assistant answers, what someone sees the first time they write, and **rules** for everything that happens on Instagram.

## Night and weekend mode

Some teams want to answer customers themselves during the day and let the assistant cover nights, days off and holidays. Choose **Only when the team isn't working** at the top of the Behaviour page.

<Frame caption="Who answers (1), the team's hours (2), holidays (3) and the wait before the assistant steps in (4)">
  <img src="https://mintcdn.com/instaforge/VoaGbcXgvTSUVUGD/images/answer-hours.png?fit=max&auto=format&n=VoaGbcXgvTSUVUGD&q=85&s=b53f80398255f04814083e1867b4ed67" alt="Night and weekend mode settings" width="2600" height="1604" data-path="images/answer-hours.png" />
</Frame>

* **Who answers (1):** **Always, 24/7** (the default) or **Only when the team isn't working**. The badge at the top right shows who answers right now.
* **Team working hours (2):** per day, in the business's time zone. The first time, they're copied from the opening hours. A shift can run past midnight, such as 22:00 to 06:00.
* **Holidays (3):** on these dates the assistant answers all day.
* **Assistant steps in after (4):** during working hours a new message is left for the team, and the people who can reply get an alert (**A message waits for the team during working hours** on the Alerts page). If nobody replies within this many minutes, the assistant answers after all, so the customer doesn't wait. Set **0** to leave it to the team only.

<Info>
  This covers direct messages and the website chat. Comments, comment campaigns and story mentions keep following their rules around the clock. If a person replies in the chat or turns the assistant off for it, the assistant stays out of it.
</Info>

<Tip>
  An AI agent can set this too: `answer_hours` shows the settings and `set_answer_hours` changes them. See [AI agents (MCP)](/running-the-agency/ai-agents).
</Tip>

<Frame caption="Welcome message (1), welcome test (2) and starter questions (3)">
  <img src="https://mintcdn.com/instaforge/B8AqbF46P_4W3pwQ/images/behaviour.png?fit=max&auto=format&n=B8AqbF46P_4W3pwQ&q=85&s=7cbaaef23502f4a81b374689de3f4217" alt="Welcome message (1), welcome test (2) and starter questions (3)" width="2600" height="588" data-path="images/behaviour.png" />
</Frame>

## First contact

* **Welcome message (1):** sent once, the first time someone writes. If they only said hello, nothing else is sent; if they asked something, the answer follows.
* **Try two welcome messages (2):** half of new people get each version. Each person keeps seeing the same one, and Insights shows which brought more bookings.
* **Starter questions (3):** up to four questions Instagram shows as buttons in a new chat, such as "Prices", "Book a time", "Where are you?". Tapping one sends it as a message.

## Rules

Each rule says: **when this happens** (and the message matches), **then do this**.

| This happens | Example |
| - | - |
| Direct message | Someone writes in Direct |
| Comment | Someone comments under a post or reel |
| Tag in a post or comment | Someone tags the account |
| Story mention | Someone mentions the account in their story |
| Story reply | Someone replies to one of the account's stories |

| Then | What happens |
| - | - |
| Answer with AI | Uses the knowledge base and what it knows about the person |
| Send a fixed message | Exactly your text, no AI |
| Start a question flow | Begins asking the questions of a flow |
| Hand over to a human | Sends the hand-off message and goes quiet in that chat |
| Do nothing | Saves the event only |

For comments you can reply **publicly**, in a **private DM**, or **both** (a short public reply such as "Sent you a DM 📩" while the full answer goes to Direct).

<Info>
  Rules are checked from top to bottom and the first match wins. Put specific rules (keywords, patterns) above general ones.
</Info>

## Examples

<AccordionGroup>
  <Accordion title="Thank people who mention you in their story">
    **When:** Story mention, always. **Then:** Send a fixed message: `Thank you for the mention, {{username}}! 💛`
  </Accordion>

  <Accordion title="Never discuss a sensitive topic">
    **When:** Direct message containing "complaint", "lawyer" or `refund*`. **Then:** Hand over to a human.
  </Accordion>

  <Accordion title="Push a promotion when people ask about prices">
    **When:** Direct message containing `price*` or "how much". **Then:** Answer with AI, with the extra instruction "Mention our 10% discount for first visits".
  </Accordion>
</AccordionGroup>


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