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?