Autómata

Set in 2044 after solar flares have made the Earth's surface radioactive, 99.7% of the Earth's human population has been wiped out. The survivors built robots, the Automatas, to help them rebuild in harsh environments. 
The robots have two unalterable protocols: the first obliges them to preserve human life; the second limits them from fixing themselves. Initially, these robots were popular, but failure to stop desertification saw them shifted in roles to manual labor and domestic care. Jacq works as insurance claim checker for the company that makes the robots, the ROC. One day he investigates a report from a cop, Wallace, who shot a robot claiming it was fixing itself and looked alive. The next day, he follows a robot which was stealing parts, and when Jacq finds it hiding outside the walls, it intentionally burns itself. He takes the burned robot's brain core. Jacq speculates to his friend and boss Robert that there might be someone, a clockmaster, who somehow succeeded in altering the second protocol, and hopes that if he were able to close the case by finding such a person, he would be able to transfer to a city on the coast, as he secretly fears that the city is too dangerous for his unborn daughter. In Jacq's dreams, it is hinted that he has memories of the ocean as a child, before it dried up.
Jacq shares his plan with Wallace, who brings him to a woman who owns a prostitute robot in the ghetto, which is capable of performing human harm for the purposes of pleasure. When Jacq is unable to get the clockmaster's name from the owner, the cop shoots at the hostess robot Cleo, saying it will be easier to simply follow the owner to Cleo's clockmaster. Jacq meets Cleo's clockmaster, Dr. Dupre, but gets no valuable information, so he leaves the his card and the board containing the kernal of the burned robot with her, promising a nuclear battery he recovered as a reward for information. The next day, however, Dupre calls Jacq and shows that Cleo has began repairing herself after she installed a hybrid between the ruined kernal and a standard kernal. Jacq messages Robert about it, but the ROC intercepts it and sends a team of men and child soldiers. Dupre is killed, but Jacq escapes and catches up with Cleo in a car, leading to the men pursuing Jacq and Cleo. Their car crashes before the men are killed in an explosion.
Jacq wakes up the next morning in the radioactive desert with three unknown robots and Cleo. They don't obey his command to take him to the city, but the first protocol makes them carry him with them and save him from hunger and dehydration. Jacq manages to secretly send a text message with his rough location to Robert.Knowing of the danger Jacq is in, Robert asks Wallace to recover Jacq in exchange for wiping Wallace's record clean, as he knew that Wallace was being investigated for the use of drugs while on duty. Robert didn't know that Wallace intended to extort Jacq for half the value of the nuclear battery, and when Wallace finds Jacq, a physical confrontation ensues. The robots, unable to harm Wallace or permit the harming of Jacq, freeze in confusion as Wallace threatens Jacq with a gun. Two robots consecutively step in front of the gun to prevent it from killing Jacq, and both are destroyed. When Cleo steps in front of the gun, Jacq fires a recovered flare gun into Wallace's stomach, killing him and causing his partner to flee with their vehicle. Informed of the failure, the ROC orders another team out to kill Jacq.
At a cable car station on the edge of a canyon, Jacq meets the robot which altered all of the others and was the original of its kind. After a philosophical talk with him in which Jacq expresses uncertainty in his memories of the ocean and of his own survival, Jacq surrenders the nuclear battery that the robots need. They use it to build an insect-like robot. The ROC forces Robert to track Jacq with their henchmen. Unable to find him, they kidnap Jacq's wife and newborn daughter. Robert, disagreeing with the intent to use Jacq's wife and daughter as hostages, reveals a gun he stole off of Wallace's corpse, and in the ensuing firefight, he is wounded and left for dead. In the morning, the robots repair a truck for Jacq so he can return to the city. Jacq initially takes the car, but Jacq goes back to the robots' place after finding the dying Robert and knowing his family is in danger. The henchmen find the robots' place and kill two of them dead and damages Cleo. Jacq arrives and crashes the truck killing the two henchmen, but at last he is cornered by the lead henchman, Vernon. The insect robot, which Vernon had fired at, pushes Vernon off a nearby ledge. Vernon catches a lower ledge, but he eventually loses his grip and falls to his death. Jacq reunites with his family and Cleo thanks him. Jacq, severely wounded in the gunfight, recalls his memories of the ocean before it dried as his wife drives him to the remaining ocean for his dying wish.