How can we Rig a character using C++ code?

I have the Rig graph of a character that contains the rig values which can be changed using a Sequencer. Now, I want to write a code which can randomly changes the Rig values to drive the animation. Any solution for this?