Jain literature refers to the literature of the Jain religion. It is a vast and ancient literary tradition, which was initially transmitted orally. The oldest surviving material is contained in the canonical Jain Agamas, which are written in Ardhamagadhi, a Prakrit (Middle-Indo Aryan) language. Various commentaries were written on these canonical texts by later Jain monks. Later works were also written in other languages, like Sanskrit and Maharashtri Prakrit.
The Jain tradition believes that their religion is eternal, and the teachings of the first Tirthankara Rishabhanatha existed millions of years ago. The mythology states that the tirthankaras taught in divine preaching halls called samavasarana, which were heard by gods, ascetics and laypersons. These divine discourses were called Śhrut Jnāna (or heard knowledge) and always comprises eleven angas and fourteen purvas. The discourses are remembered and transmitted by the Ganadharas (chief disciples), and is composed of twelve angas (parts, limbs). It is symbolically represented by a tree with twelve branches. The spoken scriptural language is believed to be Ardhamagadhi by the Śvētāmbara Jains, and a form of divine sound or sonic resonance by the Digambara Jains.
According to the Jain tradition, the divine Śhrut Jnāna of a tirthankara is then converted into sutta (scripture) by his disciples, and from such suttas emerge the formal canons. The suttas are grouped into duvala samgagani pidaga (twelve limbed baskets), which are transmitted orally by the disciples. In every universal cycle of Jain cosmology, twenty-four tirthankaras appear and so do the Jain scriptures for that cycle.
Initially, the canonical scriptures were transmitted through an oral tradition and consisted of teachings of historical Jain leaders like Mahavira codified into various collections.Gautama and other Gandhars (the chief disciples of Mahavira) are said to have compiled the original sacred scriptures which were divided into twelve Angas or parts. They are referred to as the eleven Angas and the fourteen Pūrvas, since the twelfth Anga comprises fourteen Pūrvas. These scriptures are said to have contained the most comprehensive and accurate description of every branch of Jain learning. The Jain Agamas and their commentaries were composed mainly in Ardhamagadhi Prakrit as well as in Maharashtri Prakrit.
While some authors date the composition of the Jain Agamas starting from the 6th century BCE, some western scholars, such as Ian Whicher and David Carpenter, argue that the earliest portions of Jain canonical works were composed around the 4th or 3rd century BCE. According to Johannes Bronkhorst it is extremely difficult to determine the age of the Jain Agamas, however:
Mainly on linguistic grounds, it has been argued that the Ācārāṅga Sūtra, the Sūtrakṛtāṅga Sūtra, and the Uttarādhyayana Sūtra are among the oldest texts in the canon. This does not guarantee that they actually date from the time of Mahāvīra, nor even from the centuries immediately following his death, nor does it guarantee that all parts of these texts were composed simultaneously.
Elsewhere, Bronkhorst states that the Sūtrakṛtāṅga “dates from the 2nd century BCE at the very earliest,” based on how it references the Buddhist theory of momentariness, which is a later scholastic development.
During the reign of Chandragupta Maurya (c. 324 or 321 – c. 297 BCE), Āchārya Bhadrabahu (c. 367 – c. 298 BCE), said to have been the last knower of the complete Jain agamas, was the head of Jain community. At this time, a long famine caused a crisis in the community, who found it difficult to keep the entire Jain canon committed to memory. Bhadrabahu decided to travel south to Karnataka with his adherents and Sthulabhadra, another Jain leader remained behind. The famine decimated the Jain community, leading to the loss of many canonical texts. According to Śvētāmbara (“white-clad”) tradition, the agamas were collected on the basis of the collective memory of the ascetics in the first council of Pataliputra under the stewardship of Sthulibhadra in around to 463–367 BCE. During the council, eleven scriptures called Angas were compiled and the remnant of fourteen purvas were written down in a 12th Anga. Another council was later organised in 2nd-century BCE in Udayagiri and Khandagiri Caves, Kalinga (now in Odisha) during the reign of Kharavela.
The Śvētāmbara order considers these Jain Agamas as canonical works and sees them as being based on an authentic oral tradition. They consider their collection to represent a continuous tradition, though they accept that their collection is also incomplete because of a lost Anga text and four lost Purva texts.
However, these texts were rejected by the Digambara (lit. “sky-clad”, i.e. naked) order, which hold that Āchārya Bhutabali (1st Century CE) was the last ascetic who had partial knowledge of the original canon. According to Digambaras, the Purvas and the original Agamas of Gautama were lost during the Mauryan period crisis and famine. This Digambara stance on the loss of the Agamas is one of the disagreements that led to the main schism in Jainism. Digambara masters proceeded to create new scriptures which contained the knowledge of the doctrine that had survived in their community. As such, Digambaras have a different set of canonical scriptures. According to von Glasenapp, the Digambara texts partially agree with the enumerations and works of older Śvētāmbara texts, but in many cases there are also major differences between the texts of the two major Jain traditions.