The optimal way to build AI Chatbots?

This sounds brilliant. BUT, how do we actually do this? And do you have a live example of a chatbot thats built in this way? Would be interesting to try out.