Most ancient Indian texts contain religious themes and these are known as Vedas.
They are assigned to c. 1500–500 B.C. The Vedas are four in number.
The Rig Veda mainly consists of prayers.
The other three, Sama, Yajur and Atharva-contain prayers, rituals, magic and mythological stories.
The Upanishads contain philosophical discussion on atma and pramatma.
They are also referred to as Vedanta.
The earliest Buddhist texts were written in Pali.
They are called Tripitakas (three baskets) viz. Suttapittaka, Vinayapitaka and Abhidhammapitaka.
Of the most important non religious Buddhist literature are the Jatakas.
They contain the stories of the previous birth of the Buddha.
Each birth story is called a Jataka. These stories throw invaluable light on the social and economic conditions of the period between the fifth and second centuries BC.
The Jaina texts were written in Prakrit and were eventually compiled in sixth century AD at Vallabhi in Gujarat.
They are called Angas and contain the philosophical concepts of the Jainas.
To this class belongs the Dharmashastras or the law-books which prescribe the duties for different social groups.
The earliest law books is Manu Smriti. It was the first book translated by the British and formed the basis of Hindu code of law.
Arthasastra of Kautilya provides rich material for the study of Indian economy and polity of the Mauryan period.
The earliest and the most important work on grammar is the Ashtadhyayi written by Panini, which is dated by scholars to around 700 B.C.
The works of Kalidasa who lived during the Gupta period comprise poems and dramas. The famous among them are Abhijananashakuntalam, Ritusamhara and Meghadutam.
For the history of Kashmir we have an important book called Rajataranagini written by Kalhana(12th AD).
Harshacharita is written by Banabhatta in praise of Harshavardhana.
The earliest south Indian literature is called Sangam literature. It was written in Tamil and is secular in nature.
It was produced by poets who joined together in assemblies (Sangam) patronized by chiefs and kings during the first four centuries of the Christian era.
The Sangam literature is our major source for the study of south Indian society, economy and polity during BC300–AD300.
The descriptions given in the Sangam literatures are confirmed by archaeological finds and accounts of foreign travellers.