In 1942 the Russian-American scientistc and sci-fi author Isaac Asimov formulated three "Robot Laws" in a short story, which were intended as guidelines for the use of robotics for the benefit of mankind.
First law: Robots must not hurt humans or allow humans to be harmed by inaction.
Second Law: Robots must obey orders unless the orders conflict with the First Law.
Third Law: Robots must protect their own existence unless this conflicts with the First or Second Law.
These robot laws can be considered the equivalent of the "Hippocratic Oath" in robotics. Incidentally, these laws do not exclude a scenario in which robotics is directed against man - namely, to protect mankind from itself. This scenario is implemented in the Hollywood film I, Robot (starring Will Smith).