Before he went to China, Kūkai had been an independent monk in Japan for over a decade. He was extremely well versed in Chinese literature, calligraphy and Buddhist texts. Esoteric Buddhism was not considered to be a different sect or school yet at that time. Huiguo was the first person to gather the still scattered elements of Indian and Chinese Esoteric Buddhism into a cohesive system. A Japanese monk named had brought back to Japan from China an esoteric mantra of the bodhisattva Ākāśagarbha, the "Kokūzō-gumonjihō" (虚空蔵求聞持法 "Ākāśagarbha Memory-Retention Practice") that had been translated from Sanskrit into Chinese by . When Kūkai was 22, he learned this mantra from Gonsō and regularly would go into the forests of Shikoku to practice it for long periods of time. He persevered in this mantra practice for seven years and mastered it. According to tradition, this practice brought him siddhis of superhuman memory retention and learning ability. Kūkai would later praise the power and efficacy of Kokuzō-Gumonjiho practice, crediting it with enabling him to remember all of Huiguo's teachings in only three months. Kūkai's respect for Ākāśagarbha was so great that he regarded him as his for the rest of his life.