Implemented the AI webservice