AI agents learning adapting executing complex tasks