Rakshasa (amatya)

Rakshasa is a character in the ancient Indian Sanskrit-language play "Mudrarakshasa". In the play, he holds the post of "Amatya" (prime minister) in the Nanda and Maurya courts of Magadha and also served as Royal Friend of Dhana Nanda . Originally a minister of the Nanda king, he escapes during Chandragupta Maurya's conquest of the Nanda empire. He then makes several attempts to overthrow Chandragupta, but each time, he is outsmarted by Chandragupta's advisor Chanakya. Finally, he agrees to give up the resistance, and accepts the post of "amatya" in the Maurya court. 
"Mudrarakshasa" biography.
Rakshasa appears in Vishakhadatta's play Mudrarakshasa.
In the "Mudrarakshasa", Chanakya feels insulted by the Nanda king, and overthrows him with help of his protege Chandragupta and another powerful king Parvateshvara (or Parvata). Nanda's prime minister Rakshasa escapes the royal capital Pataliputra, and makes seeveral attempts to overthrow Chandragupta. For example, he sends a vishakanya (poison girl) to assassinate Chandragupta. Chanakya makes this girl assassinate Parvata instead, with the blame going to Rakshasa. Parvata's son Malayaketu learns the truth about his father's death, and allies with Rakshasa. On another occasion, Rakshasa arranges for assassins to be transported to Chandragupta's bedroom via a tunnel. Chanakya notices a trail of ants carrying the leftovers of their food, and has them burned to death.
Absconding from Magadha.
For the task of getting Chandragupta Maurya killed, Amatya Rakshasa made an alliance with some of Chandragupta's enemies.
Rakshasa failed several times in his plan to get Chandragupta killed. He tried having some kings attack Pataliputra, the Maurya capital, but the plan failed due to Chanakya's intelligent tactics.
Meanwhile, Chanakya knew that it was dangerous for a clever leader like Amatya Rakshasa to hold a grudge against the king. Soon, Chanakya made plans to capture Amatya Rakshasa by luring him to return to Magadha. Chanakya spread rumors among certain people in Magadha, thanks to which he arrested one of Amatya Rakshas's associates. Chanakya knew that Amatya Rakshasa would come searching for his associate, or try to free him.
Becoming the Amatya of the Maurya Empire.
Rakshasa was tracked and captured finally by Chanakya, as per his plan. Chanakya told Rakshasa about his plan to make him the prime minister of Chandragupta's empire as Rakshasa had diligence and patriotism towards Magadha. Chanakya knew very well about Rakshas' efficient administrative skills and diplomatic tactics. Chanakya asked Rakshasa to become the Principal Amatya (Maha Amatya) of the Mauryan empire and to serve the kingdom with the same diligence and faithfulness he showed during the Nanda rule. Rakshasa was initially reluctant to do so. Chanakya convinced Rakshasa to become the Maha Amatya as he would be an extraordinary royal advisor. Finally, Amatya Rakshasa agreed to Chanakya for the benefit of Magadha. Amatya Rakshasa then realized Chanakya's dignity and overcame his enmity with him.