Maybe it wasn't a remote planet but a floating island with a castle on it? In that case, it probably was [_Laputa: Castle in the Sk_y](https://en.wikipedia.org/wiki/Castle_in_the_Sky). After the success of _Nausicaä_, the legendary Studio Ghibli was founded, and _Laputa_ was the first movie of the new studio. Often _Nausicaä_ is counted as the first Ghibli movie, because many of the later Ghibli masterminds where involved, but that movie was technically "pre-Ghibli".

The story revolves around a young girl, Sheeta. She's hunted by agents who are after her crystal pendant. On the run from the agents, Sheeta meets a young boy named Pazu. He is searching the floating city in the sky that his father once saw. Maybe Sheeta has something to do with this city and its powers?

The robot would be part of the automated defense system of the floating castle that Sheeta and Pazu run into.