The Agastya-Gita is contained in chapters 51 & 52 of Varaha Purana.
1-2. After hearing the account of Dharanivrata from sage Durvasas, Satyatapas went to a slope of the Himalaya mountain where the river there was Pushpabhadra (beautiful with flowers), the stone Citrasila (beautifully shaped) and the banyan tree Bhadravata (particularly attractive), and building a hermitage there, spent the rest of his life in contemplation.
3. Thousands of aeons have elapsed since I performed this vrata, and now I have forgotten all about it.
4-5. By your blessings I now begin to get a recollection of all that. I am, therefore, anxious to know more.
6. Therefore, kindly tell me what Agastya did after returning to the residence of Bhadrasva.
7. When the sage returned, Bhadrasva asked him about Moksha-dharma.
8. Oh sage! By what means is the bondage of worldly existence snapped, and by what means the sorrows in life can be got over?
9. Oh king! Listen well to this story relating to what is distant and what is near, and based on the division into the seen and the unseen.
10. At the time when there was no day, no night, no direction, no heaven, no gods and no sun, a king named Pasupala was looking after numerous beasts.
11. He once went to see the eastern ocean, and there, on that shore of that limitless expanse of water, saw a forest full of snakes.
12. There were eight trees and a freely flowing river. Five important persons were there moving horizontally and upwards. One of them was holding an effulgent woman.
13. The woman was holding on her chest a person having the splendour of a thousand suns, and with three colours and three divisions.
14. Seeing the king, all of them became silent and still; and as soon as the king entered the forest, they became combined into a single being.
15. The king was then encircled by the serpents, and he began to think about how he could kill them and escape.
16. When he was thus thinking, another person having the three colours, white, red and yellow, came out of his body.
17. He asked by gesticulation where he should go. Just then there arose Mahat.
Mahat or Reason (buddhi, vijnana, sattva) is the first evolute of Prakrti. Its function is to make decisions both cognitively and ethically, both in cognition and in action. It is cosmic and covers the whole world (universe). The world comes into being out of a cosmic assertion or decision “That is”. This cosmic decision is related to the Cosmic Person. While it is cosmic for the world, it is separate for each individual.
18. The king was covered by that and asked to be alert in mind. He was then confronted by the woman (who was really Maya).
The enquiry of Non-dualism or Monism is ontology of the Spirit. Sankara, the greatest exponent of the Non-dualism of the Vedanta, introduces the concept of Maya, synonymous with Prakrti as the instrument that creates, sustains and dissolves the world of forms and names.
The verbal root of Maya is ma, meaning to measure. The etymological root of the word Maya makes it clear that it is something that makes the object we experience determinate through spatial, temporal and causal laws.
The Svetasvatara Upanisad gives an idea that Maya is a kind of net thrown on Being, making it look like the world fixed by some laws, constituting the structure of the net. This idea makes it clear that Maya is not mere illusion. The object of any illusion, like that of dream, disappears later, whatever fright it may have created in the person experiencing it. The idea of the Brahman creating the world, which does not exist on its own, through His will, involves something like the idea of illusion. Salvation as the ultimate goal is freedom from determinateness whether it is the life of pain or pleasure, happiness or sorrow, good or bad, knowledge or ignorance. It is the same as freedom from Maya.
P. Sriramachandrudu explains succinctly that Maya is indescribable. It is neither existent, nor non-existent, nor both. It is not existent, for the Brahman alone is the existent (sat). It is not non-existent, for it is responsible for the appearance of the world. It cannot be both existent and non-existent as such a statement is self-contradictory. It is thus neither real, nor unreal; it is Mithya. But it is not a non-entity or a figment of imagination like the son of a barren woman. In the example of a rope mistaken for a snake, the rope is the ground on which the illusion of snake is super-imposed. When right knowledge dawns, the illusion disappears. The relation between the rope and the snake is neither that of identity nor of difference, nor of both. It is unique and known as non-difference (tadatmya). Similarly, the Brahman is the ground, the substratum on which the world appears through Its potency – Maya. When right knowledge dawns, the real nature of the world is realized as Maya disappears.