Alexei was part of Miss Kizlet's team in the Shard, who were involved in sucking people's souls into the Wi-Fi for the Great Intelligence. He was controlled by the Intelligence at some time prior to 2013. He coined the term "Spoonhead."
In 2013, he was planning on going on vacation — after which, Kizlet was going to kill him. Kizlet decided to delay it until after his holiday. Alexei sent a Spoonhead disguised as Kate Webster to upload Clara to the data cloud, but the Eleventh Doctor reversed the process. He tried using the Wi-Fi to crash an aeroplane into Clara's street, but the Doctor boarded the plane and piloted it to safety.
The next morning, he tracked down the Doctor and Clara and sent another Spoonhead, this time successfully uploading her. After Kizlet was uploaded to the Wi-Fi, he followed Mahler's orders to download her back to the body, which would also take out everyone else's minds in the cloud.
When the Great Intelligence left, he was freed from its control. He didn't know what was going on. As Kizlet's mind reverted to a scared child, his execution was not carried out. (TV: The Bells of Saint John)