In what scripts the oldest Sanskrit literature was written? When was Brahmi script used for it? I am aware that Vedas were orally memorized -- and were not written for a long time.
Assuming Manuscripts also count then:
The Bakhshali manuscript is variously dated between 3rd century (acc. to carbon dating methods) to 9th century AD, and it was found in in the Gandhāra region. It was a mathematical text written Śāradā script (suitable for being found in Gandhāra).
The Bower manuscript is dated to around the 5th-6th century AD. It was a text regarding Buddhism and Ayurveda mainly. It was found in northwestern China. It is not in pure Sanskrit but a type of mixed-Sanskrit called Hybrid Sanskrit. It was written in Gupta script (a form of Brahmi script).
Arguably the oldest Sanskrit Manuscript. It's carbon dated to the 2nd century AD. It contains a treatise on Nyaya-Vaiśeṣika but it is more popular for containing a summary of the Parvas of the Mahābhārata. It was written in Brahmi script.