A chatbot system includes a parent chatbot and a plurality of sub-chatbots. Each sub-chatbot is associated with a specific domain. The parent chatbot is adapted to receive a user query and direct the user query to a relevant sub-chatbot. Each sub-chatbot includes at least one chatbot dialog, and is adapted to respond to the user query using the at least one chatbot dialog. Each sub-chatbot is implemented by a program entity adapted to return a return function. The return function is a function configured to accept a context object unique to the sub-chatbot as an input argument. The at least one chatbot dialog is accessed by at least one access function. The access function is a function configured to accept the context object of the sub-chatbot.