IAEA, Iran reach agreement