Librarians are Space Marine psykers. Less likely to be fucked inside out by daemons though, due to being a superhuman and all. Often overheard punishing xenos and heretics alike while screaming cheesy one-liners like "Your book is overdue, BITCH!". They have varying degrees of awesomeness depending on what writer and/or chapter. Usually though, they dominate the battlefield and are feared by both friend and foe as they wield a vast selection of pure psykic awesomeness.
Back during the Great Crusade, when the Primarchs were reunited with their legions, the Space Marines began discovering some of their new recruits had psychic potential. Wanting to utilize this and prevent them from falling to Warp corruption, Magnus the Red, Sanguinius, and Jaghatai Khan proposed the creation of Librariums, divisions of the Legions which would take in psyker Space Marines and train them to use their powers for the good of the Imperium of Man. Seeing the possible good, the Emperor agreed, authorizing the go ahead and presumably getting all teary-eyed at how independent and grown-up his kids had gotten (while being awesome and manly of course). When the Librariums proved effective, they spread to other Legions. However, a number of Primarchs, namely Mortarion (he's got psyker issues that would make a Culexus blush), Rogal Dorn, Corax, and Leman Russ opposed the training of Librarians and wanted the program shut down, believing that the powers of the Warp could not be controlled (Russ maintained that Rune Priests were not actually Librarians, given the Space Wolves insistent maintaining that they drew power from Fenris, not the Warp). Further concern was raised with Magnus's constant peering into the Warp to learn more about his powers, which Russ and Mortarion felt warranted censure.
Then Nikaea Happened
Following the Emperor's departure from the Great Crusade, a conclave was called to determine whether or not Librarians should continue to be used. With representatives summoned to the Council of Nikaea (often remembered as the Trial of Magnus the Red) both sides pleaded their cases. In the end, the Emperor, fearing that Magnus was being way too arrogant and reckless in his pursuit of power and in serious danger of Fausting himself over (which is exactly what ended up happening), decided that Librarians posed too great a risk and ordered the Legions to disband their Librariums, return to their battle companies, and never use their psychic powers in battle again. An edict Magnus ignored. Well, actually, an edict that quite a lot of them either totally ignored or later broke. But Magnus broke it harder. The White Scars simply ignored it, but the likes of Dorn and Vulkan implemented it straight away.
"Hear now the words of my ruling
I am not blind to the needs of the Imperium, but nor am I blind to the realities of the hearts of men. I hear men speak of knowledge and power as though they are abstract concepts to be employed as simply as a sword or gun. They are not. Power is a living force, and the danger with power is obsession. A man who attains a measure of power will find it comes to dominate his life until all he can think of is the acquisition of more. Nearly all men can stand adversity, but few can stand the ultimate test of character, that of wielding power without succumbing to its darker temptations.
Peering into the darkness to gain knowledge of the Warp is fraught with peril, for it is an inconstant place of shifting reality, capricious lies and untruths. The seeker after truth must have a care he is not deceived, for false knowledge is far more dangerous than ignorance. All men wish to possess knowledge, but few are willing to pay the price. Always men will seek to take the short cut, the quick route to power, and it is a man’s own mind, not his enemy or foe, that will lure him to evil ways. True knowledge is gained only after the acquisition of wisdom. Without wisdom, a powerful person does not become more powerful, he becomes reckless. His power will turn on him and eventually destroy all he has built.
I have walked paths no man can know and faced the unnameable creatures of the Warp. I understand all too well the secrets and dangers that lurk in its hidden darkness. Such things are not for lesser minds to know; no matter how powerful or knowledgeable they believe themselves to be. The secrets I have shared serve as warnings, not enticements to explore further. Only death and damnation await those who pry too deeply into secrets not meant for mortals.
I see now I have allowed my sons to delve too profoundly into matters I should never have permitted them to know even existed. Let it be known that no one shall suffer censure, for this conclave is to serve Unity, not discord. But no more shall the threat of sorcery be allowed to taint the warriors of the Astartes. Henceforth, it is my will that no Legion will maintain a Librarius department. All its warriors and instructors must be returned to the battle companies and never again employ any psychic powers.
Woe betide he who ignores my warning or breaks faith with me. He shall be my enemy, and I will visit such destruction upon him and all his followers that, until the end of all things, he shall rue the day he turned from my light."
Dude could give a speech.
Unfortunately, this seemed to be one of those decisions that the Emperor didn't really think through. It added yet another layer of bullshit on top of his fear of the warp and psykers in general, a group of people who, had they been able to ply their mind-bullets freely would have been an awesome weapons against the traitors (I mean presumably) when Heresy time came around. Thing is... This is something that the books and stuff seem to say a lot but it's kinda... Well... It's hard to say how true that actually is/was.
At Istvaan psykers wouldn't have made any difference (3 legions vs 8 is a bad day for the good guys) and the balance of forces was so extreme that just knowing ahead of time wouldn't have helped. At Calth they might have made a difference. All of the former Ultramarine librarians had bad dreams in the days before the treachery, so maybe they might have seen what was coming. But if they could ever have convinced Roboute Guilliman of impending treachery (remember this was happening just after Isstvan V and communication was moving slowly thanks to the Warp Storms, on top of the fact that Marines fighting each other was totally alien to them (fluff writers expect you to disregard the fact that the Wolves had already massacred two other legions and tried to do the same to the World Eaters)), they would have really been struggling to deal with the magic stuff because it was totally new and a weird combination of technology and warpstuff. Oh, and of course practically no-one who wasn't on Guilliman's flagship or with the 4th company even knew what the problem was. So it seems really unlikely that Librarians would have magically made the Heresy all better.
In any case, the edict of Nikaea stood for a year or so at most, and it was ignored or abandoned by nearly all the legions.
Loyalist Response to Nikaea
- In one of his brighter ideas, Roboute Guilliman himself stated during the Battle of Calth that the Edict of Nikea needed to be overturned as soon as possible. Thus, when he thought that Terra and the Emperor had already fallen he decided to build the Imperium Secundus in a manner he thought sensible and kept his Chief Librarian around as an advisor (much to the chagrin of a Space Wolves detachment deployed on Macragge to "ensure" Guilliman's loyalty.)
- Without a Primarch, the remaining Iron Hands mostly fell in with the Ultramarines and so basically did whatever they were doing.
- Lion El'Jonson re-introduced the Librarians as soon as he discovered that the traitors were using daemons, presumably knowing what shit was going down from his experiences on Caliban. Even going so far as to punch the living fuck out of a Chaplain who reminded him that it was going against the Emperor's edict. As in, literally punched his head off - although said Chaplain was about to execute one of the Librarians for using his psychic powers against daemons and refused to back down, soooooo...
- Rogal Dorn locked all his Librarians up in the Phalanx and refused to even let them rejoin their battle brothers as line-troopers. However, when Nathaniel Garro stealthed his way on board to try and rescue them, they seemed happy enough where they were. Apparently all the Imperial Fists need to feel happy is thick walls around them. With the Primarch explaining that they were exactly where they needed to be. Presumably for keeping them in reserve for when the Imperium really need them. What happened to them afterwards is (as of yet) unexplained so we're forced to assume that were just left there to rot for a millenia or so until they died of old age or went rogue and warp-walked their way out.
- While Sanguinius desperately tried to uphold the Emperor's word, his own former Librarians met in secret and proved their worth by saving the entire Legion from the daemonic precursor of the Black Rage at Signus. So he kept them afterwards.
- There were barely any Salamanders left after Isstvan, though by M41 they looked back upon Nikaea as an ancient and archaic edict that had no place any more.
- Corax was a latent psyker but voted against at Nikea. We don't know if they reinstated their librarians but it seems extremely likely that they did after the Alpha Legion attack to disrupt/steal their cloning tech (which Librarians could have detected). Lets be honest he was dabbling in Gene-tech, he wouldn't have even flinched at going against Nikea, like giving Charles Manson a speeding ticket - it wouldn't register.
- The White Scars just kinda shrugged and twiddled their mustaches and did their own thing same as ever, including keeping their Storm Seers around. Since it was also suggested that the Khan himself was a psyker (true enough, though he favoured using his sword instead), on top of his total disregard for authority and support for the librarians this shouldn't be that much of a surprise. If nothing else, he could fall back on the excuse that he wasn't at Nikea at the time the edict was made and could therefore plead ignorance. His "stormseer" who spoke for the Scars at Nikea simply privately refused to accept it and vindicated himself shortly after by exploding a daemon with lightning. His psychic powers (and those of the one surviving loyalist from the Thousand Sons) later saved the entire Legion during the Horus Heresy.
- The Space Wolves supported the banning of librarians, but kept their own afterwards. They totally denied that their Rune Priests actually were pyskers at all, and claimed that their power came from Fenris, as opposed to the warp. Which was totally wrong, of course, and they may or may not have known this. Of course, seeing as they use psychic hoods and psychic foci...they totally knew. They might just have been jerks, or perhaps more likely the Big E made a decision to tolerate their beliefs, seeing it was important for his 'executioners' to be able to deal with other warp-users. In fact, two of their librarians, Aun Helwintr and Ohthere Wyrdmake, were vocal opponents of employing librarians at the council and yet directly participated in the Burning of Prospero.
- Malcador the Sigillite gave tacit permission to for the Librarians among the Knights-Errant to begin using their psychic powers, even supplying them with psychic hoods. The Adeptus Custodes made it clear that they did not recognize Malcador's authority to do so, but since the Emperor Himself had appointed Malcador as Regent of Terra, they were in a bit of a logical-paradox: either enforce the Emperor's will by taking out Malcador, or defy the Emperor's will by taking out Malcador. They settled for threatening to kill any Librarian using his powers in their presence, so the Knights-Errant just did it out of their presence.
So by the Siege of Terra all but two of the loyalist legions definitely had active librarians, and one of the other two probably did.
Traitor Response to Nikaea
- Lorgar and his Word Bearers were already planning evil, so they just ignored the prohibition.
- Magnus The Red decided being a ninja space wizard was too cool, and ignored the decree. If he hadn't he would've been all right.
- The World Eaters (somewhat puzzlingly) apparently ignored the decree as well, still having official Librarians (not Sorcerers, actual honest to goodness Librarians) during the Heresy, and there's no way in hell they reinstated them since they would be glad to get rid of them. As best we know they weren't represented at Nikaea (for reasons that may become obvious) and it's easy to see that Angron just didn't give a fuck because the decision didn't involve RAGE. However, the World Eaters hated their librarians all the while they existed and frequently didn't even tolerate them being around. This was nothing specifically personal, it was just that psykers made the Butchers' Nails a bit...twitchy and could not themselves be implanted without becoming brain-dead. Which is not a good thing for brain implants that are already turning you into a psychotic, rage-filled murder machine. By the time of the Shadow Crusade the Librarians weren't even considered full members of the Legion anymore, and Angron killed them all shortly after he became a Daemon Prince.
- Mortarion was actually just about the biggest psyker hater in the universe, and was one of the decree's strongest supporters. Hilariously, this backfired badly on him when he eventually realised that getting the edict pushed through only weakened the loyalists psykers; his allies were (mostly) letting their psykers run rampant with a whole new set of freakshow abilities. Things got so bad for him that he tried to get the librarian supporting Jaghatai Kahn on his side. Jaghatai countered by attempting to carve the hypocrite out of Mortarion's pustuled arse. He then pillaged a Thousand Son's library world and summoned a demon whose sole purpose was to tempt him into using sorcery even more. It worked. Ironically due to his lack of people skills and his poor Psy-dar he never knew his second-in-command was a dirty warp burglar. First rule of management, get to know your people.
- Alpha Legion also ignored the edict, like they did almost everything else.
- The Night Lords nominally accepted the edict but the Night Haunter mostly left the decision to individual company commanders. Most happily went along the edict (even going so far as to exile their Chief Librarian) as they weren't too fond of psykers anyway but occasionally dabbled in sorcery throughout the Heresy.
- The Sons of Horus went along with the decree initially but learned quickly from the Word Bearers (through the Lodges) and were quick to use sorcery after Istvaan.
- It's not really known what the Iron Warriors thought. But if it helped them build or tear down fortresses any quicker they would have joined the "fuck Nikaea bandwagon" with gusto.
- We likewise do not know how the Emperor's Children reacted.
In M41 the Edict technically still stands (no-one could overrule the emperor) but it stopped being enforced after the heresy and the marines could please themselves. Also of interest is that the Emperor violated the Edict himself by ordering the founding of the Grey Knights, who are even bigger violators of it than the Thousand Sons.
There is obviously a bit of historical revisionism going on, because most accounts from the 41st Millenium look back at Nikaea and suggest that the Emperor actually said "yes" to Librarians, so long as they were trained in a controlled and careful manner. Which is what the White Scars and Blood Angels were doing at the time anyway, it was only the Thousand Sons who ruined it for everyone by thinking there should be no limits
By M41 it has been left it up to individual Chapters whether or not to use Librarians, and most Chapters have Librarians to some degree or another, with the noticeable exceptions of the Black Templars and the Marines Malevolent.
Among Codex compliant Chapters, the ranks of the Librarium are based on their level of training and advancement. They are as follows:
- Chief Librarian: The head of the Librarium, and the most powerful psyker in the Chapter. He is also one of the masters of the Chapter and usually a senior adviser to the Chapter Master. On the tabletop they are usually represented by named special characters of psychic mastery level 3, (or level 2 if they occasionally have some other unique ability) If you don't have a special character in your chosen chapter then you'll just have to settle for a cool Epistolary.
- Epistolary: The highest rank below Chief Librarian, Epistolaries serve as the main communication aides on the battlefield, sending psychic messages through the Warp to their brothers in the Librariums, similar to Astropaths, but without having their eyes burned out. While no longer explicitly stated in the 6th edition codex, Epistolaries have traditionally been psychic mastery 2 on the tabletop with the ability to know and cast two powers per turn.
- Codicier: Mid-level Librarians, who evaluate reports from campaigns and document them in their Librariums. Supposedly represented on the tabletop as the common variety "Librarian", only at level 1.
- Lexicanum: Entry-level Librarians, they are responsible for compiling battlefield reports for the Codiciers. Interestingly, they don't wear psychic hoods, or even helmets unless in dangerous environments. Haven't been represented on the tabletop since 2nd edition, when they were WS/BS4 W1 A1 Ld8 and a psychic power.
- Acolytum: Librarians in training. Brought in from the battle companies before or shortly after they leave the Scout company, they're tested for psychic potential. It's possible that the Acolytum may be killed in the process, but that's life in a Space Marine Chapter for you. If they survive they're enrolled in Introduction to Mind Bullets and How Not to Melt Your Head 101