we had a lesson about agency today in elders and you'll find most of your answers about this in 2 Nephi 2 there was also this scripture i cant break it down completely cause its pretty complicated but what i can see is that in verse 30 it says that an intelligence needs to act for itself or there is no existance D&C 93: 29-30 29 Man was also in the beginning with God. Intelligence, or the light of truth, was not created or made, neither indeed can be. 30 All truth is independent in that sphere in which God has placed it, to act for itself, as all intelligence also; otherwise there is no existence.