The Belisarius novels are an alternate history series
written by David Drake
and Eric Flint
In these books, a pair of rival sentiences from our future go back in time to change the course of history. The "bad" sentience seizes control of the Malwa in India, to exploit the caste and racial structures to create a eugenics program. The "good" sentience is a crystal named Aide, which finds its way to Belisarius, who is tasked with saving the world.