This synth courser can be acquired as a companion after completing the Institute quest Mankind Redefined. Normally he's hanging around in the SRB division. If he's not there, he might be hanging around by the capsized boat north of Nordhagen Beach as marked below:
Unlike most of the other companions who doesn't have any faction affiliation, X6-88 will remain as your companion as long as you're not hostile with The Institute. Once you're marked as an enemy of the Institute, he will become hostile, regardless of where he is. If he's in a settlement, he'll engage your defenses and settlers until killed.
You cannot bring X6-88 to the Railroad HQ as they'll be automatically hostile. Also, X6 seems to maintain a neutral stance with how you resolve quests.
Extra skill/ability
Approval
Disapproval
Max Affinity Perk