Sage Agastya's advice to Lord Rama was to always maintain dharma and to never give up on one's goals.