A distinction is made between so called industrial AIs and non-industrial AIs. Industrial AIs contrary to their name are not only for industrial purposes; they can be soldiers, for use in the home or any range of uses. What separates them from non-industrial AIs is that whereas non-industrial AIs are programmed with human-like desires industrial AIs are programmed to love serving and doing the job they were built to do. Industrial AIs technically have full rights and if this programming were to fail they would be able to live their lives how they see fit, there would be no machine uprising. This is however a purely hypothetical (some might say hollywood) occurrence and has never happened. In addition to this all AIs are equipped with some sort of friendliness protocol.
In the galaxy at large, although extremely rare, AIs do exist but they tend to be either irreproducible one offs by great hermit like inventors or insane due to bad design