rhythmic-jordan-68259
09/14/2025, 10:36 AMtall-airline-16756
09/14/2025, 10:36 AMtall-airline-16756
09/14/2025, 10:37 AMrhythmic-jordan-68259
09/14/2025, 10:50 AMtall-airline-16756
09/14/2025, 10:51 AMon_enter()
and on_exit()
. For instance, you can warmly greet the user when they enter the first node.
These steps can help you build a dynamic and thoughtful workflow with conditional logic. If you'd like, I’m here to provide a specific code example or guide you further—just let me know!
Sources: examples/README.md | flows/multi_stage_flow.py | Pipeline nodes and hooks | LiveKit Docs | agent.pyrhythmic-jordan-68259
09/14/2025, 11:04 AMtall-airline-16756
09/14/2025, 11:05 AMawait self.session.say("Hello! How can I assist you today?")
2. Detect Intent: Next, use a tool or some logic to understand if the user wants to schedule an appointment. If that’s the case, you can smoothly move on to the next step.
3. Collect Name and Date of Birth: Here, you’ll want to gather the user’s name and date of birth using function tools. For example: `name = await self.session.ask("Can you please tell me your name?")
dob = await self.session.ask("What is your date of birth?")`It’s a good idea to store this information in the session state or userdata so you can refer back to it later.
4. Confirm and Complete: Once you have all the details, kindly confirm everything with the user and wrap up the workflow: await self.session.say(f"Thank you, {name}. Your appointment has been scheduled.")
This workflow really makes the most of LiveKit’s session management and tools to keep things running smoothly and maintain context. If you’d like me to provide a more detailed code template or any extra guidance, just let me know—I’m here to help!
Sources: examples/frontdesk/calendar_api.py | examples/src/frontdesk/calendar_api.ts | Workflows | LiveKit Docs | flows/simple_flow.pyrhythmic-jordan-68259
09/14/2025, 11:22 AMrhythmic-jordan-68259
09/14/2025, 11:30 AMrhythmic-jordan-68259
09/14/2025, 12:36 PM