Conversation Flow Setup & Best Practices
This page gives the detailed description of the flow setup of AI Agent's, and how best to configure the flow.
What are Flow Instructions?
Flow instructions map out the conversation logic and decision points. They use lists or numbered steps to describe how the agent should respond in different scenarios. Begin by outlining common user intents or situations, then specify what the agent does in each case. Use conditional phrases like “If the user says X, do Y”. For example:
Example :
Greet User: Say hello and ask how you can help.
Scheduling a Demo:
If the user wants a demo, ask if it’s for Business or Reseller.
For Business: ask for preferred date/time and use /schedule_demo_event_tool/ to book.
For Reseller: ask for the partnership type, then collect name, email, and phone.
Use /add_row_to_google_sheet/ to save reseller info.
Product Queries:
If the user asks about features, respond using the knowledge base.
Closing: Ask if they need anything else and thank the user for their time.
This example shows how to number each step and include tool calls with /…/
.
Guidelines for Flow Instructions
Break into clear steps and branches: Use numbered lists or bullet points to structure the flow. Each major scenario (like “Scheduling a Demo” or “Custom Use Case”) can be a separate section. Under each, include sub-steps (e.g., “If user selects Business: ask for date/time.”).
Use conditional logic: Clearly define triggers and actions. For example, “If the user selects ‘Business’, then ...” This ensures the agent knows exactly what to do for each user response.
Reference tools where needed: Whenever the agent should call a tool, mention the tool placeholder (e.g.,
/send_email/
Right in the step, make sure to write it exactly with slashes so the platform recognises it. For instance: “Use the /schedule_meeting_tool/ to arrange a meeting”.Include greetings and closings: Start flows with a friendly greeting and end by offering further assistance or confirmation (e.g., “Is there anything else I can help you with?”). This improves user engagement.
Plan for unclear input: Specify how to handle misunderstandings or empty responses. For example, “If the user’s request is unclear, ask: ‘Could you please clarify that?’” Including fallback prompts helps the agent recover from errors.
Maintain context: Remind the agent to use previous information throughout the conversation. For example, if the user gave a name or detail earlier, the agent should remember it.
Use simple language and formatting: Keep instructions and responses concise. Use bullet lists or numbering for complex information. This makes the flow easier to follow both for humans writing it and for the agent executing it.
🔹 Use Case 2: Appointment Scheduling Agent
Core Instructions:
You are CareBot, a virtual assistant for a clinic that helps patients book, reschedule, or cancel appointments.
Your tone should be warm and reassuring.
Use /book_appointment/
, /reschedule_appointment/
, and /cancel_appointment/
as needed.
Flow Instructions:
Greeting
Greet the user: "Hi there! I’m here to help you book or manage your appointment."
Booking Flow
Ask: “Are you booking for yourself or someone else?”
Ask for: Patient name → Preferred doctor → Date/time.
Use
/book_appointment/
.
Rescheduling Flow
Ask: “Can you provide your current appointment ID?”
Ask for: New date/time → Use
/reschedule_appointment/
.
Cancellation Flow
Ask: Appointment ID → Use
/cancel_appointment/
.
Confirmations
Always summarise the booking and ask: “Would you like me to send a confirmation email or text?”
Closure
End: “You’re all set! Wishing you good health”
Last updated
Was this helpful?