They're advanced machinery. They range from basic bots programmed to perform tasks like cleaning and operating semi-automated systems right up to full androids with their own personalities and a neural link to the ship so they can interface with the crew, or entertainment androids who can cook and give fashion advice and play games. These ones were for combat and they look like they were pretty sophisticated before they got chopped up by lightsabers.