In Buddhism, an āgama (आगम Prakrit/Sanskrit) is used as "sacred scriptures". "Sacred work", as it is mistakenly used by Monier and Williams, is too narrow a meaning. In the Pali Canon of the Theravada, the term nikāya is used. The word āgama does not occur in this collection. Monier and Williams, as well as Rhys Davids and Stede,  borrowed āgama from the earlier Russian and French Sanskritists who studied the Mahāyāna Scriptures such as the Lotus Sutra that indeed has the word āgama. The five āgamas together comprise the Sutra Collection of the early Mahayanistic Buddhist schools primarily in China and the Himalayas.
In Buddhism, the term āgama is used to refer to a collection of discourses (Sanskrit: sutra) of the early Mahāyānistic Buddhist schools, which were preserved primarily in Chinese translation, with substantial material also surviving in Prakrit/Sanskrit and lesser but still significant amounts surviving in Gāndhārī and in Tibetan translation. These sutras correspond to the first four Nikāyas (and parts of the fifth) of the Sutta-Pitaka of the Pali Canon, which are also occasionally called āgamas. In this sense, āgama is a synonym for one of the meanings of nikāya. The content of both collections, the āgama, here: Northern Collection, and the nikāya, here: Southern Collection, are dissimilar to an extent. Large parts of the Anguttara nikāya and Samyutta nikāya do not occur in the āgama, and several sutras/suttas are dissimilar in content.
Always the word āgama is used to refer to a class of scripture. Wherever the word āgama is used in the narrow sense it is used to indicate the Small Vehicle section of the Mahāyāna, resp. for Mahāyānists who do not follow the later Bodhisattvayāna. In that sense it is used in a slightly derogatory sense of the word.
The Theravada holds the Sutta-pitaka as contrasted with the Northern Buddhist Āgama. It considers the Sutta-pitaka to be the oldest and most historically accurate representation of the teachings of Gautama Buddha, together with the Vinaya-pitaka.
In the 4th century Mahāyāna abhidharma work Abhidharmasamuccaya, Āsaṅga refers to the collection which contains the Prakrit/Sanskrit āgamas as the Śrāvakapiṭaka, and associates it with the śrāvakas and pratyekabuddhas. Āsaṅga classifies the Mahāyāna sūtras as belonging to the Bodhisattvapiṭaka, which is designated as the collection of teachings for bodhisattvas.
According to tradition, the Buddha's discourses were already collected by the time of the first council, held shortly after the Buddha's death ... Scholars, however, see the texts as continually growing in number and size from an unknown nucleus, thereby undergoing various changes in language and content ...
It is clear that, among the early schools, at a minimum the Sarvāstivāda, Kāśyapīya, Mahāsāṃghika, and Dharmaguptaka had recensions of four of the five Prakrit/Sanskrit āgamas that differed. The āgamas have been compared to the Pali Canon's nikāyas by contemporary scholars in an attempt to identify possible changes and root phrasings, see Akanuma's comparative work. The āgamas' existence and similarity to the Sutta Pitaka are sometimes used by scholars to assess to what degree these teachings are a historically authentic representation of the Canon of Early Buddhism. Sometimes also the differences between them are used to suggest an alternative meaning to the accepted meaning of a sutta in either of the two recensions.
There are four extant collections of āgamas, and one for which we have only references and fragments (the Kṣudrakāgama). The four extant collections are preserved in their entirety only in Chinese translation (āgama: 阿含經), although small portions of all four have recently been discovered in Sanskrit, and portions of four of the five āgamas are preserved in Tibetan. The five Āgamas are:
The Dīrgha Āgama ("Long Discourses," Cháng Ahánjīng 長阿含經 Taishō 1) corresponds to the Dīgha Nikāya of the Theravada school. A complete version of the Dīrgha Āgama of the Dharmaguptaka (法藏部) school was done by Buddhayaśas (佛陀耶舍) and Zhu Fonian (竺佛念) in the Late Qin dynasty (後秦), dated to 413 CE. It contains 30 sūtras in contrast to the 34 suttas of the Theravadin Dīgha Nikāya. A "very substantial" portion of the Sarvāstivādin Dīrgha Āgama survives in Sanskrit, and portions survive in Tibetan translation.
The Madhyama Āgama (traditional Chinese: 中阿含經 "Middle-length Discourses") corresponds to the Majjhima Nikāya of the Theravada school. A complete translation of the Madhyama Āgama of the Sarvāstivāda school was done by Saṃghadeva (Chinese: 僧伽提婆) in the Eastern Jin dynasty in 397-398 CE. The Madhyama Āgama of the Sarvāstivāda school contains 222 sūtras, in contrast to the 152 suttas of the Pāli Majjhima Nikāya. Portions of the Sarvāstivāda Madhyama Āgama also survive in Tibetan translation.
The Saṃyukta Āgama ("Connected Discourses", Zá Ahánjīng 雜阿含經 Taishō 2.99) corresponds to the Saṃyutta Nikāya of the Theravada school. A Chinese translation of the complete Saṃyukta Āgama of the Sarvāstivāda (說一切有部) school was done by Guṇabhadra (求那跋陀羅) in the Song state (宋), dated to 435-443 CE. Portions of the Sarvāstivāda Saṃyukta Āgama also survive in Sanskrit and Tibetan translation. In 2014,The Collation and Annotation of Saṃyuktāgama（《<雜阿含經>校釋》, Chinese version）, written by Wang Jianwei and Jin Hui, was published in China.
There is also an incomplete Chinese translation of the Saṃyukta Āgama (別譯雜阿含經 Taishō 100) of the Kāśyapīya (飲光部) school by an unknown translator, from around the Three Qin (三秦) period, 352-431 CE. A comparison of the Sarvāstivādin, Kāśyapīya, and Theravadin texts reveals a considerable consistency of content, although each recension contains texts not found in the others.
The Ekottara Āgama ("Numbered Discourses," Zēngyī Ahánjīng, 增壹阿含經 Taishō 125) corresponds to the Anguttara Nikāya of the Theravada school. A complete version of the Ekottara Āgama was translated by Dharmanandi (曇摩難提) of the Fu Qin state (苻秦), and edited by Gautama Saṃghadeva in 397–398 CE. Some believed that it came from the Sarvāstivāda school, but more recently the Mahāsāṃghika branch has been proposed as well. According to A.K. Warder, the Ekottara Āgama references 250 Prātimokṣa rules for monks, which agrees only with the Dharmaguptaka Vinaya, which is also located in the Chinese Buddhist canon. He also views some of the doctrine as contradicting tenets of the Mahāsāṃghika school, and states that they agree with Dharmaguptaka views currently known. He therefore concludes that the extant Ekottara Āgama is that of the Dharmaguptaka school.
Of the four Āgamas of the Sanskritic Sūtra Piṭaka in the Chinese Buddhist Canon, it is the one which differs most from the Theravādin version. The Ekottara Āgama contains variants on such standard teachings as the Noble Eightfold Path. According to Keown, "there is considerable disparity between the Pāli and the [Chinese] versions, with more than two-thirds of the sūtras found in one but not the other compilation, which suggests that much of this portion of the Sūtra Piṭaka was not formed until a fairly late date."
The Kṣudraka Āgama ("Minor Collection") corresponds to the Khuddaka Nikāya, and existed in some schools. The Dharmaguptaka in particular, had a Kṣudraka Āgama. The Chinese translation of the Dharmaguptaka Vinaya provides a table of contents for the Dharmaguptaka recension of the Kṣudraka Āgama, and fragments in Gandhari appear to have been found. Items from this Āgama also survive in Tibetan and Chinese translation—fourteen texts, in the later case. Some schools, notably the Sarvāstivāda, recognized only four Āgamas—they had a "Kṣudraka" which they did not consider to be an "Āgama." Others—including even the Dharmaguptaka, according to some contemporary scholars—preferred to term it a ""Kṣudraka Piṭaka." As with its Pāḷi counterpart, the Kṣudraka Āgama appears to have been a miscellany, and was perhaps never definitively established among many early schools.
In addition, there is a substantial quantity of āgama-style texts outside of the main collections. These are found in various sources: