initial autonomous agent code