How to create a bot workflow engine with xstate

I was recently involved in a project where we needed to create a chatbot.
The project required us not to rely on any cloud services, so we…