This paper discusses a language-independent approach for building smart and easily-extensible personal assistants and chatbots. Given a natural language utterance, the system extracts a formal meaning representation that enables mapping the user intent to the execution of a Java source code. This allows building both smart personal assistants and chatbots that can be easily extended by overriding and implementing simple Java methods. The matching process between the natural language input and the output source code relies on an unsupervised algorithm. Therefore, adding new features to the final system does not require training on large datasets mapping natural language queries to a formal meaning representation.