This is a summary from Elder D. Todd Christofferson's devotional talk, Moral Agency.
Elder Christofferson identified 3 Elements of Moral Agency;
1. Alternatives to choose from. There must be opposition and different choices. There needs to be a good and a bad choice, or in some cases maybe a good and better choice. Law is also an important aspect of alternatives. If there are no laws, choices have no meaning.
2. You must know that alternatives exist and what they are. Ignorance limits agency. Your choices are meaningless if you don't know what is available. The gospel increases your agency because it reveals things in their true light. The gospel increases your perspective, which makes it easier to choose. When you are you close to the spirit; the correct choice is much more obvious. Light and darkness can't occupy the same space at the same time.
3. The freedom to make choices. You must have the freedom to obey or disobey laws, but you can't choose your consequences.
Obedience to laws and commandments increases your agency and makes you more free not less. The world says that God's laws are restrictive and binding, but the world is wrong. Think of God's laws and commandments like a ladder leading up to God. Each step represents a law or commandment, and the more commandments you know and keep the closer you get to God. Your rewards and blessings are based on the laws (commandments) you keep.
Increasing your agency allows you to be independently strong, and God wants you to be righteous in the dark. God wants you to be anxiously engaged even when the spirit is not strong with you. Because of the nature of this world, and God knows how hard it is to keep the spirit on a high level at all times, the spirit ebbs and flows in strength within us. For this reason He needs us to make important things happen through our faith, when the spirit is at a low point.
In the pre-existence, Satan began a spiritual war to deny us of our agency. That war has followed us to earth. Satan can't do anything about truth or law, so he combats it with lies hoping that we will fall for it. Satan knows that truth increases our agency, which is why he counters it with lies knowing that lies impairs our agency.
Some of the lies Satan uses to limit or destroy our agency depending on the degree we believe and act on it are the following;
Jesus Christ has everything to do with agency. Our agency is only possible because of Jesus Christ. Without Christ, our best intentions to do good and become like God would be useless. All our efforts to be righteous no matter how diligent would result in failure. Without Jesus Christ, we would be subject to Satan no matter how much good we did in life.