Abe no Seimei is a real-life historical figure who is shrouded in myth rather than facts. He was an onmyoji for the Heian emperor and government, making calendars and advising on spiritually correct ways to deal with issues. He prayed for the well-being of emperors and the government, along with being an astrologer and predicted astrological events. Due to living an extremely long life with no illnesses, after his death legends arose much like those surrounding Merlin.
According to some legends, Seimei had kitsune blood within him, from his mother's side. At a very early age, around or before five years, he was allegedly able to command weak oni to do his bidding. His mother entrusted Seimei to Kamo no Tadayuki, an older onmyoji, so that he would live a proper human life and not become evil himself.
Seimei had a significant enemy, an esoteric Buddhist priest by the name of Ashiya Doman, who often tried to usurp Seimei's position. One legend about them was that Doman and Seimei had a divination duel to reveal the contents of a box. Doman had another person put 15 mandarin oranges in a box, and "divined" that there were fifteen oranges in it. Seimei saw through the ruse, transformed the oranges into rats, and stated that fifteen rats were in the box. When the rats were revealed, Doman was shocked and defeated.
The Pentagram in the West is known in Japan to be Abe no Seimei's seal, which represents the Wu Xing.