Early Sanskrit Grammar Before Panini By Agastya? Tholkaapiyar

And as Tholkappiyar's Guru was a Scholar of Vedas,which is in Sanskrit, is it that Aindhiram is a Sanskrit Work? Agastya could not have written Aindhiram in Tamil as the First Tamil Grammar Agathiyam was by Agastya,which has been lost? Why write two books on the same subject? Or ,as Agastya is a schloar in both Tamil and Sanskrit,Aindhiram could be in Tamil?