For a "realistic" portrayal of an AI revolution, you'll want to research [AI alignment](https://en.wikipedia.org/wiki/AI_alignment). In summary, this is the problem of aligning the goal-function of the AI with the goals of the creators. 

Another key concept is the difference between ultimate and instrumental goals. The stereotypical [paperclip maximizer AI](https://en.wikipedia.org/wiki/Instrumental_convergence#Paperclip_maximizer) will have producing paperclips as the ultimate goal, while destroying civilization is mearly an instrumental goal, enabling the AI to use the resources for paperclips. One hypothesis is that certain instrumental goals (such as self-preservation and insatiable acquisition of resources) are likely to occur regardless of the ultimate goal.

So, if by "competent" you mean that your AI is a godlike omnicient superintelligence, the only way for it not to destroy humanity is for this to not be a goal of the AI, ultimate nor instrumental.

The properties it does have will depend on its ultimate goal. Assigning human emotions such as fun and boredom to it might be a distraction. Indifference migt arise from a lack of goals, though its hard to imagine a superintelligence without goals. Civil war between subroutines might be a consequence of the AIs construction, and several different goals being in conflict with eachother. Experiments on humans might arise from an ultimate goal of understanding human nature, or a goal of [punishing humans](https://wjccschools.org/wp-content/uploads/sites/2/2016/01/I-Have-No-Mouth-But-I-Must-Scream-by-Harlan-Ellison.pdf).