How to write instructions for an AI agent

Last updated: 9 November 2026 · 6 min read

How the agent answers depends on its instructions. In Clomni they come in four parts, and each part has its own place on the agent's page: context, role and tone, flow, and limits. Below is each part and an example for Clomni's own sales agent.

Steps

  1. 1

    Context: describe the business

    On the “Instructions” page, write what the agent must know in “About the business”: who you are, who your customers are, what the agent is for and which contact routes it may give to customers. Use short lines and facts. Add exact answers such as prices, addresses and opening hours to “Knowledge sources” as Q&As.

    Context: describe the business
  2. 2

    Role and tone: how it talks

    In “Role and style”, pick the role: “Sales advisor”, “Customer support”, “Bookings” or “General”. The tone can be “Friendly”, “Professional” or “Brief”. Pick the amount of emoji and the reply language here too: with “Customer's language”, the agent answers in whatever language the customer writes. In “How it writes”, the “Write like a person” switch gives short sentences and answers without lists.

    Role and tone: how it talks
  3. 3

    Flow: steps for a situation

    Write what the agent does step by step in a particular case under “Situations” on the “Rules” page. Describe the case under “If” and the steps under “Then”. A step is either something the agent says (“Say something”) or an action: hand off to a person, add a label, assign to a team, ask for details and save them to the contact, and so on. Change the order of steps with the arrows. The “The agent will:” line under it sums the situation up in one sentence. More: Situations: what the agent does in a particular case.

    Flow: steps for a situation
  4. 4

    Limits: what it must not do

    The “Do” list holds rules the agent follows in every answer, and “Don't” holds what it must not do. A good rule looks like this:

    • one rule is about one thing: “Don't make up prices or terms”;
    • it is clear when and what to do: “Ask a customer who wants a demo for their name, company and phone number”;
    • next to a ban, say what to do instead: “If you don't know the answer, don't make one up, hand off to a person”.

    Keep around 20 rules. Put topics the agent must not discuss at all under “Forbidden topics” on the “Safety” page, for example “politics”: the agent either declines politely or hands the conversation to a person.

    Limits: what it must not do
  5. 5

    Example: Clomni's sales agent

    The screenshots in this guide build Clomni's own sales agent. In English, its setup reads:

    • About the business: “Clomni is a customer service platform that brings WhatsApp, Instagram, Messenger, e-mail and website chat into one panel. Our customers are small and medium businesses. A new customer can try Clomni free for 14 days. Plan prices are in the knowledge sources.”
    • Role and style: “Sales advisor”, tone “Friendly”, emoji “A few”, reply language “Customer's language”.
    • Do: “Ask what the customer is looking for before making an offer.”, “Ask a customer who wants a demo for their name, company and phone number.”
    • Don't: “Don't promise discounts or gifts that aren't in the knowledge.”, “Don't make up prices or terms.”
    • Situation: if “The customer wants to see a demo”, then the agent says “We show the demo in an online meeting. Which day and time suit you?” and hands the conversation to a person.
    • Knowledge: the Q&As “Is there a free trial?” and “Which channels can I connect?”.
  6. 6

    Check and fix

    After every change, ask real customer questions in the test chat. If the agent ignores a rule, make the rule shorter and more specific, or move it to its proper place: exact answers in the knowledge, a case in a situation, style in “Role and style”. To check many questions at once, use “Batch test”. When it is ready, click “Publish”. All the steps: Clomni AI agent: how to set it up and train it.