According to official sources, Russian forces were dislocated to guard important objects which allowed Kazakh forces to quell the terrorists and take situation under control. So Russian forces did not engage in the actual fight, but rather backed up Kazakh forces.
What really happened is that Kazakh military did not want to obey the President orders when this chaos started. It's speculated that this was act of treason by some high officials in an attempt of coup. That's why Tokaev asked Russia to intervene. After Russia confirmed that they actually do support Tokaev with some symbolic forces sent, Kazakh military started to obey the orders and started to actually do what they must. That's my opinion.
What really happened is that Kazakh military did not want to obey the President orders when this chaos started. It's speculated that this was act of treason by some high officials in an attempt of coup. That's why Tokaev asked Russia to intervene. After Russia confirmed that they actually do support Tokaev with some symbolic forces sent, Kazakh military started to obey the orders and started to actually do what they must. That's my opinion.