| Spoiler warning!|
This article contains plot details about an upcoming episode.
Kandra were created as spies by the Lord Ruler with Hemalurgy.
The Lord Ruler turned his friends and all other Terris feruchemists into mistwraiths. Through Hemalurgy, he returned his friends to sentience through pairs of spikes called the kandra blessings. He designed them to have a weakness; in this case, kandra are susceptible to soothing. One very powerful Mistborn - lerasium strength or near to it - burning brass, a lesser Mistborn burning both duralumin and brass, or several Soother Mistings working in concert, can overwhelm a kandra and control it like a puppet.
The kandra were charged with a secret mission to collect harvested beads of Atium in exchange for contracts. This Atium would then be delivered to the Homeland, and sealed in a pit with a metal lid. Because the Atium was in fact Ruin's "body" (more like the physical counterpart to his power), Ruin was unable to find it due to metal being a shield to his eyes.
In the early days of the kandra, allomancers used them like tools. The kandra people created a set of rules, called the First Contract, which the Lord Ruler had engraved in metal before inscribing it with his signature. When the kandra created their own contract for working with the humans, they used the First Contract as their guide. As a result of this mistreatment, kandra became distrustful and disdainful towards humans. 
The kandra were trained that should any of their number be enslaved by Ruin, they should pull free their blessings, effectively killing themselves. This was called The Resolution by the kandra, and reveals their full role as the Lord Ruler's spies against Ruin rather than against humans, as had been assumed throughout the Final Empire.