What happened in the book is that these AIs incorporated, thus becoming "people" according to the Supreme Court. Then these corporations owned the majority of other AI corporation stocks. Thus, they effectively owned themselves. Actual people had no control over them, and they made sure the courts and politicians supported their "human" rights.

We don't have AIs anyway near as sophisticated. Remember they are many times smarter than any single human being. Our current AIs are idiot savants by comparison. But they are getting smarter...