The sutras were recordings produced and then assembled by the
Buddha' s disciples. During the fourth month after the Buddha' s
passing, they gathered in the Seven-leaf Cave outside the city of
Rajagrha, holding the first synod to recall, determine, and assemble
a lifetime of the Buddha' s words and teaching. Mahakasyapa the
Honored One presided and Ananda recited. The sutras to be
assembled there and then were The Agamas, subdivided into four
parts, namely, Dirghagama (Long Agama), Madhyamagama (Middle
Agama), Ekottaragama (Numerical Agama), and Samyuktagama
(Miscellaneous Agama).
On Ananda reading the sutras as told by the Buddha, 500 individuals
taking part in the gathering set out to investigate and confirm their
authenticity. Such was how the sutras came to be recorded.