The Bodhisatta was once born as Ādāsamukha, son of Janasandha, king of Bārāṇasī. Ādāsamukha became king at the age of seven, having successfully solved the problems set him by his courtiers.
Janasandha had a servant named Gāmaṇicanda who, being old, retired when Ādāsamukha came to the throne. However, various mishaps befell Gāmaṇicanda, and he was charged on various counts by different people. As he was being brought to the king to receive punishment, he was asked by several persons to convey messages to the king, and to find out from him solutions for their troubles.
The king listened to the charges brought against Gāmaṇi and to his explanation of them. Convinced of Gāmaṇi’s innocence, he passed sentences which ultimately brought gain to Gāmaṇi. The king then proceeded to solve the problems contained in the messages brought by Gāmaṇi. He gave to Gāmaṇi the village in which he lived, free from all taxes, and there Gāmaṇi lived happily to the end of his days.
The story was told by the Buddha to certain monks who had been discussing his wisdom.
Gāmaṇicanda is identified with Ānanda. In the story he is referred to also as Gāmaṇi, Canda-