A joint statement said Iran was doing so in good faith to resolve outstanding issues related to nuclear safeguards.
The agreement came during a visit to Tehran by the IAEA's director general.
The global watchdog has criticised Iran for not answering its questions about possible undeclared nuclear material and nuclear-related activities at the two locations, and denying it access.
It is thought the activities took place long before 2015, when Iran struck a landmark deal with world powers that placed limits on its nuclear programme.
Iran insists it has never sought nuclear weapons, but evidence previously collected by the IAEA suggests that until 2003 it conducted "a range of activities relevant to the development of a nuclear explosive device".
IAEA Director General Rafael Grossi flew to Tehran on Monday for consultations with the head of the Atomic Energy Organisation of Iran, Ali Akbar Salehi.
On Wednesday, they announced they had "reached an agreement on the resolution of the safeguards implementation issues specified by the IAEA, in good faith".