The structure factor of AgI, both Bragg and diffuse scattering, has been measured at 12 temperatures between 293 and 790 K by powder neutron diffraction. Below 420 K gamma- and beta-phases coexist, but there is evidence for considerable conversion of gamma-to beta-phase above 400 K. The reverse Monte Carlo technique has been used to model the alpha-phase data above 420 K. The maximum Ag+ density is found to occur in the tetrahedral sites, with diffusion between them through trigonal and, to a lesser extent, octahedral positions. The Ag+ density distribution is only weakly temperature dependent. An effective single site potential has been derived from the Ag+ density distribution; the energy barrier between tetrahedral sites is in good agreement with that determined from the ionic conductivity. However the motion of Ag+ is not simple hopping diffusion across this barrier, but is correlated with the motion of the I- and of the other Ag+. Many studies have reported unexpected behaviour between 600 and 700 K, which has been attributed to some kind of ''order-disorder'' transition. In this work no evidence was found for such a transition, suggesting that it is not caused by a change in short range order.