For the IGI (Instrument rating ground instructor), you have just to study your Instument written again, it is exactly the same written than the IGI. you can refresh your memory by studying the written exam of the Instrument rating (just take the Jeppesen written preparation or the ASA prep test, it helps)
for the AGI, you have to study more ,
, but also, bear in mind that you have to take the FOI (fundamentals of instructing) before be able to each ;(
hope that helps ;=)