- You may be looking for the robotic Gyros.
Gyros was a tidally locked planet, with one half extremely hot, the other half extremely cold, leaving only a narrow strip between the two in which life could exist. The habitable zone was home to a humanoid race which created the robotic Gyros to serve them. When a terrible illness struck which killed thousands, some survivors fled the cities, while others sealed themselves in buildings and were cared for by the Gyros, who also maintained the cities and farms. When the descendants of the survivors who had fled tried to return, the Gyros would not let them enter.
When the First Doctor, John and Gillian arrived on the planet, the Gyros captured Gillian, and one of the natives joined the Doctor and John on a journey into the city to find her. The Doctor rescued Gillian from being thrown into a valley of flames, and gave the people the cure for the sickness. (COMIC: The Gyros Injustice)