Yajnavalkya or Yagyavlkya (Sanskrit: याज्ञवल्क्य, Yājñavalkya) was a Hindu Vedic sage. He is mentioned in the Upanishads, and likely lived in the Videha region of ancient India, approximately between the 8th century BCE, and the 7th century BCE. Yajnavalkya is considered one of the earliest philosophers in recorded history. Yajnavalkya proposes and debates metaphysical questions about the nature of existence, consciousness and impermanence, and expounds the epistemic doctrine of neti neti ("not this, not this") to discover the universal Self and Ātman. His ideas for renunciation of worldly attachments have been important to Hindu sannyasa traditions.
Yajnavalkya is credited for coining the Advaita (non-dualism, monism), another important tradition within Hinduism. Texts attributed to him, include the Yajnavalkya Smriti, Yoga Yajnavalkya and some texts of the Vedanta school. He is also mentioned in various Brahmanas and Aranyakas.
In the Brihadaranyaka Upanishad, a set of dialogues suggest Yajnavalkya has two wives, one Maitreyi who challenges Yajnavalkya with philosophical questions like a scholarly wife; the other Katyayani who is silent but mentioned as a housewife. While Yajnavalkya and Katyayani lived in contented domesticity, Maitreyi studied metaphysics and engaged in theological dialogues with her husband in addition to "making self-inquiries of introspection". In contrast to the Brihadaranyaka Upanishad, the epic Mahabharata states Maitreyi is a young beauty who is an Advaita scholar but never marries.
Yajnavalkya is associated with several other major ancient texts in Sanskrit, namely the Shukla Yajurveda, the Shatapatha Brahmana, the Brihadaranyaka Upanishad, the Dharmasastra named Yājñavalkya Smṛti, Vriddha Yajnavalkya, and Brihad Yajnavalkya. He is also mentioned in the Mahabharata and the Puranas, as well as in ancient Jainism texts such as the Isibhasiyaim.
Another important and influential Yoga text in Hinduism is named after him, namely Yoga Yajnavalkya, but its author is unclear. The actual author of Yoga Yajnavalkya text was probably someone who lived many centuries after the Vedic sage Yajnavalkya, and is unknowIng Yajnavalkya was father, Vajasaneya was his biological son, who wrote or explained Yoga Yajnavalkya in writings to his descendants!  Ian Whicher, a professor of Religion at the University of Manitoba, states that the author of Yoga Yajnavalkya may be an ancient Yajnavalkya, but this Yajnavalkya is not to be confused with the Vedic-era Yajnavalkya "who is revered in Hinduism for Brihadaranyaka Upanishad".
Now as a man is like this or like that,
according as he acts and according as he behaves, so will he be;
a man of good acts will become good, a man of bad acts, bad;
he becomes pure by pure deeds, bad by bad deeds;
And here they say that a person consists of desires,
and as is his desire, so is his will;
and as is his will, so is his deed;
and whatever deed he does, that he will reap.
Max Muller and Paul Deussen, in their respective translations, describe the Upanishad's view of "Soul, Self" and "free, liberated state of existence" as, "[Self] is imperishable, for he cannot perish; he is unattached, for he does not attach himself; unfettered, he does not suffer, he does not fail. He is beyond good and evil, and neither what he has done, nor what he has omitted to do, affects him. (...) He therefore who knows it [reached self-realization], becomes quiet, subdued, satisfied, patient, and collected. He sees self in Self, sees all as Self. Evil does not overcome him, he overcomes all evil. Evil does not burn him, he burns all evil. Free from evil, free from spots, free from doubt, he became Atman-Brâhmana; this is the Brahma-world, O King, thus spoke Yajnavalkya."
The section 4.3 of the Brihadaranyaka Upanishad is attributed to Yajnavalkya, and it discusses the premises of moksha (liberation, freedom), and provides some of its most studied hymns. Paul Deussen calls it, "unique in its richness and warmth of presentation", with profoundness that retains its full worth in modern times.
The Maitreyi-Yajnavalkya dialogue of Brihadaranyaka Upanishad states that love is driven by a person's soul, and it discusses the nature of Atman and Brahman and their unity, the core of Advaita philosophy. The Maitreyi-Yajnavalkya dialogue has survived in two manuscript recensions from the Madhyamdina and Kanva Vedic schools; although they have significant literary differences, they share the same philosophical theme.
This dialogue appears in several Hindu texts; the earliest is in chapter 2.4 – and modified in chapter 4.5 – of the Brihadaranyaka Upanishad, one of the principal and oldest Upanishads. Adi Shankara, a scholar of the influential Advaita Vedanta school of Hindu philosophy, wrote in his Brihadaranyakopanishad bhashya that the purpose of the Maitreyi-Yajnavalkya dialogue in chapter 2.4 of the Brihadaranyaka Upanishad is to highlight the importance of the knowledge of Atman and Brahman, and to understand their oneness. According to Shankara, the dialogue suggests renunciation is prescribed in the Sruti (vedic texts of Hinduism), as a means to knowledge of the Brahman and Atman. He adds, that the pursuit of self-knowledge is considered important in the Sruti because the Maitreyi dialogue is repeated in chapter 4.5 as a "logical finale" to the discussion of Brahman in the Upanishad.
Concluding his dialogue on the "inner self", or soul, Yajnavalkaya tells Maitreyi:
One should indeed see, hear, understand and meditate over the Self, O Maitreyi;
indeed, he who has seen, heard, reflected and understood the Self – by him alone the whole world comes to be known.