For the complete documentation index, see llms.txt. This page is also available as Markdown.

Guidelines and Best Practices

Learn the best way to configure the prompt for your AI Agent

An AI agent is only as good as the instructions you give it. Clear instructions tell the agent who it is, what it should do and how a conversation should flow. Use these guidelines before you write your first prompt, so you avoid the most common mistakes.

Prerequisites

  • An idea of the job your agent will do, for example answering order questions or booking appointments.

  • The tools or apps your agent may need, for example a calendar or a CRM. [CHECK: confirm the plan and role needed to create an AI agent.]

Key definitions

Term
Meaning

Prompt

The instructions that tell the agent who it is and what it should do.

Setup instructions

The part of the prompt that defines the agent's identity, goal and tools.

Flow instructions

The part of the prompt that defines how a conversation moves, step by step.

Tool

An app or action the agent can use, such as saving a lead to a CRM.

Agent setup instructions

Setup instructions define who the agent is and what it should achieve. Cover these four points:

  • Identity and role: give the agent a name and a purpose. Example: a sales assistant named LeadBot.

  • Main goal: state the core task, such as gathering leads or booking appointments.

  • Tools: list the tools or APIs the agent can use. Write each one inside slashes, for example /add_to_crm/.

  • Context: add what the agent must know about your business.

Follow these guidelines:

  • Define identity and role clearly. Example: "You are a customer support agent for Acme Corp."

  • Specify goals and tasks as numbered steps. Example: qualify a lead by asking questions, then use /add_to_crm/ to save the contact.

  • List tools and context. Write each tool as /tool_name/ so the agent knows when to use it.

  • Use step-by-step instructions. Keep a straight line: greet, qualify, then act.

  • Use positive phrasing. Tell the agent what to do, not what to avoid. Write "Always thank the user" instead of "Do not ignore the user".

  • Add example scenarios (optional). A short sample conversation helps the agent follow your expectations.

Flow instructions

Flow instructions define how the conversation moves based on what the customer says. They use step-by-step logic with decisions, tool calls and fallbacks.

  • Organise steps as lists. Use one numbered or bulleted set for each customer intent.

  • Use conditions. Write "If the user says X, then do Y."

  • Reference tools inline. Write /tool_name/ where the agent should use the tool.

  • Start with a greeting and end with a wrap-up.

  • Handle unclear input. For example, ask a clarifying question.

  • Keep context across messages. The agent should not ask again for information it already has.

Example flow

  • Greeting: say hello and ask how you can help.

  • Scheduling a demo: ask whether the user is a business or a reseller.

    • Business: ask for a preferred date and time, then use /schedule_demo_event_tool/.

    • Reseller: ask about the partnership type, collect name, email and phone number, then use /add_row_to_google_sheet/.

  • Product questions: answer feature questions from the agent's knowledge.

  • Closing: thank the user and ask whether there is anything else you can help with.

Complete examples

Lead generation agent (LeadBot)

Setup instructions: LeadBot is an assistant for Acme Corp. It qualifies website visitors and gathers business details. It uses /find_company_info/ to check a business and /add_to_crm/ to save leads.

Flow:

  1. Greeting: say hello, offer help and ask whether the user is interested in solutions for their business.

  2. Lead qualification: if the user says yes, ask for the company name, job title and business email. Use /find_company_info/ to check the company.

    • If found, confirm and continue.

    • If not found, ask the user to check the spelling or give more details.

  3. Store lead details: use /add_to_crm/ to save the name, company, email and job title.

  4. Follow-up: ask whether the user would like a call with the team.

    • If yes, use /schedule_call_tool/.

    • If no, thank them and offer a brochure.

  5. Wrap-up: thank the user and offer further help.

Appointment scheduling agent (CareBot)

Setup instructions: CareBot is a virtual assistant for a clinic. It helps patients book, reschedule or cancel appointments. It uses /book_appointment/, /reschedule_appointment/ and /cancel_appointment/ as needed.

Flow:

  1. Greeting: greet the user and explain that you can help them book or manage an appointment.

  2. Booking: ask whether the appointment is for the user or someone else. Collect the patient name, preferred doctor and date and time, then use /book_appointment/.

  3. Rescheduling: ask for the current appointment ID and the new date and time, then use /reschedule_appointment/.

  4. Cancellation: ask for the appointment ID, then use /cancel_appointment/.

  5. Confirmation: summarise every booking and offer to send a confirmation by email or text.

  6. Closure: end the chat politely and wish the patient good health.

Where to use these guidelines

Write your instructions in Prompt & Tools. See the page on writing a prompt and adding tools. Set how the agent sounds in the same place. [CHECK: the old guide says to match tone in the instructions with the Communication style setting. That advice is removed here, as requested. It belongs on the Prompt & Tools page.]

[CHECK: the old guide uses /tool_name/ with a closing slash. The product's own sample prompt uses /google_calendar with no closing slash. Confirm which format to teach.]

[CHECK: the old guide calls the first part "Agent Setup Instructions" and the product calls the box "Agent prompt" (and "Core Instructions" in the new agent wizard). Confirm the name to use.]

Common errors

My agent ignores part of my instructions

Long, mixed instructions are easy to miss. Split the prompt into setup instructions and flow instructions. Use numbered steps and keep one idea in each sentence.

My agent does not use a tool

Check that you wrote the tool in slashes, for example `/add_to_crm/`, and that your instructions say when to use it. Also check that the tool is connected in Prompt & Tools.

My agent asks for details it already has

Add a line to the flow: "Do not ask again for information the customer has already given."

My agent says things I told it not to say

Rewrite "do not" rules as positive rules. For example, write "Always answer from the information provided" instead of "Do not guess".

Do I need example conversations?

No. They are optional. A short example can help when the agent keeps missing the tone or the order of steps you want.

Support

Still not working? Write to us at support@botpenguin.com. We will reach out to you within 24 hours.