If it's not a TV series, but a film, Starchaser: Legend of Orin:
In the future on a planet named Trinia, human slaves have lived underground for millennia mining crystals for a "god" named Zygon and his robot minions. One day Orin, a young miner, finds a jeweled sword embedded in the rocks. Hopps, grandfather of Orin's girlfriend Elan, recognizes the sword and gives his life to save Orin and keep the sword a secret. When Orin later takes the sword into his hands, it ascends into the air and buries itself in the cavern's floor. A projection of an old man appears from the blade, telling those present that above the caverns is a "magnificent universe" that the people may find (they have been told that above the cavern is "Hell"). The blade then disappears, leaving only the hilt.
....
Dagg is captured and the ship is rendered inactive; Orin is thrown clear out of the ship but is rescued by Aviana, the daughter of Bordogon's Governor. Upon waking up and meeting Aviana, Orin tells her his story, whereupon Aviana's computer reveals that the hilt has historically been used by a group of legendary guardians called the Kha-Khan to vanquish threats to humanity. Among these threats was a tyrant called Nexus, after whose defeat the hilt vanished until Orin's discovery of it. Aviana takes Orin to Trinia, where he again faces Zygon. Orin attempts to kill Zygon for Elan's death and thereby exposes him as a robot. Zygon then reveals that he is Nexus, seeking again to rule over humanity with his army of robots. Zygon takes Orin's hilt and begins to co-ordinate the attack, while Orin and Aviana are imprisoned in the cell block wherein Dagg is also captive. Just as Orin and Aviana confess their feelings toward one another, Aviana is taken aboard Zygon's flagship as a hostage. Orin is again approached by the Starfly, who brings him the hilt, which he uses to free himself and Dagg. They enter Zygon's flagship and take control of it, using it (again aided by the Starfly) to destroy the enemy fleet. They are rejoined by Silica, who has restored the Starchaser.
The robot might be Silica.
Silica is a supporting protagonist in the animated movie, Starchaser: The Legend of Orin. A governing Fembot originally designed to serve Zygon and his armada, Silica was re-programmed by Dagg Dibrimi for the purpose to help her newfound friends from the machinations of her previous employer. In the subsequent change, Silica fell in love with Dagg to the point she would risk her life to save him.
There is another robot, the sarcastic Arthur, who runs Dagg's ship. He doesn't have a body, but occasionally extrudes a "head" to communicate.
Trailer