Kūkai's philosophy is based on the Mahavairocana Tantra and the Vajrasekhara Sutra (both from the seventh century). His "Benkenmitsu nikkyôron" (Treatise on the Differences Between Esoteric and Exoteric Teachings) outlines the difference between exoteric, mainstream Mahayana Buddhism (kengyô) and esoteric Tantric Buddhism (mikkyô). Kūkai provided the theoretical framework for the esoteric Buddhist practices of Mantrayana, bridging the gap between the doctrine of the sutras and tantric practices. At the foundation of Kūkai's thought is the Trikaya doctrine, which holds there are three "bodies of the Buddha".