aiml: add dumps/loads method