The Consuls of Traken were five Trakenites who governed the people of the Traken Union. The Keepers ruled for thousands of years with the power of the Source. Towards the end of his rule, the Keeper would start to lose his hold on perfect harmony throughout the Traken Union and would select a consul to be his successor and the next Keeper of Traken. (TV: The Keeper of Traken)
The Consuls of Traken were led by the the Keeper, who ruled for thousands of years with the power of the Source. The Keeper was connected to all the minds of the Traken Union. The Keeper was able to protect them mentally from all evil that threatened their paradise. The Consuls, however, protected them physically and had the power to command the Fosters (Workers) and the Proctors (Security) like Neman. (TV: The Keeper of Traken)
Circa 1981, as his end approached, the current Keeper contacted the Fourth Doctor for his help. He explained about the Melkur on Traken and asked for help preventing the evil from taking control of the bioelectronic Source which was the keystone of the Keeper's power and of Traken civilisation. The Doctor and Adric agreed and the Keeper pulled the TARDIS to Traken.
The Keeper had chosen Consul Tremas as his successor. When Tremas came under suspicion with the Doctor and Adric about the Melkur, Consul Seron was nominated by the other Consuls to be the next Keeper. When Seron was being inspected by the Keeper to see if he was an appropriate successor, Consul Kassia, who was possessed by the Melkur, killed him. When Tremas and the other Consuls arrived, Kassia declared that Seron was dead because he was rejected by the Keeper.
When the Keeper died, Kassia became connected to the Source. Immediately, she was taken over by the Melkur, who became the new Keeper. The Doctor and Adric sabotaged the connection to the Source and forced Melkur out of the Keeper's sanctum, allowing Luvic to take Melkur's place and become the new Keeper. (TV: The Keeper of Traken)
As the new Keeper of Traken, Luvic would have had to appoint the four new Consuls to replace Seron, Kassia, Tremas (after he was kidnapped and murdered by the Master) and himself.