draft version with longterm and shortterm memory support. build succesfully.