Cognosticator (5e Creature)
From D&D Wiki
Medium monstrosity, neutral
Innate Spellcasting (Psionics). The cognosticator's innate spellcasting ability is Intelligence (spell save DC 16). It can innately cast the following spells, requiring no components:
Mind Hive. The cognosticator has access to the memories of all minds it has copied; it can choose to replace its Intelligence, Wisdom, or Charisma scores with those of a creature it has copied, can use any skills they have, and knows any languages they know. Upon its death, all minds stored by the cognosticator are released back to their original bodies, if they remain; for each mind, there is a 5 percent chance it will be sent to the wrong body.
Mind Scramble. One creature the cognosticator can see within 30 ft. must succeed on a DC 13 Charisma saving throw or have its mind copied and replaced. The cognosticator can choose to exchange the target's mind with one it already has stored. If it does not use a previously copied mind, it creates one. When it does, the game statistics of the creature are unchanged, aside from its alignment and Intelligence, Wisdom, and Charisma scores, which are randomized; if the target has any class levels, it can’t use any of its class features. While its mind is replaced, the target is unable to communicate and acts bizarrely, unaccustomed to its surroundings and body. If the cognosticator instead chooses to swap in a mind it has copied, the target gains the alignment, mental ability scores, and personality of the new mind.
The fate of the cognosticator's creator remains unknown, but its purpose, according to the oldest recovered specimen, was to allow open telepathic communication and psychomigration between entities with normally incompatible mental wavelengths, allowing vastly different beings to exchange bodies across even the planar barriers for purposes of research.