Agency is a very important belief in Mormonism. It means generally, that we are free to make morally significant choices. But more than this, it means that God’s eternal plan is requires that we be free to make morally significant choices. This belief relates to the purpose of life and where we came from (The Premortal Life).
Before we were born into this mortal life we lived with God the Father. He gave us our agency. A war in heaven was fought over this very issue. Those who supported agency (you and me) were born into a mortal life, and Jesus was appointed to be our savior.