separate ai from server.