The memorandum of understanding signed this week, though yet to be made public, extends a tenuous ceasefire announced in April by another 60 days to allow the warring countries to negotiate a permanent truce.
Under the deal, the US will end its blockade of Iran's ports while Tehran will restore the passage of oil tankers and other maritime traffic through the Strait of Hormuz, which it has effectively blocked since the US and Israel launched strikes on February 28.
The Swiss foreign ministry said the deal would be inked on Friday at the luxurious mountain resort of Buergenstock.
The US president said under the agreement Tehran would not have a nuclear weapon and the full text would be made public in a formal setting in a few days.
Iran has long said that it would not develop a nuclear weapon and that its nuclear program is for peaceful purposes only.
Trump has given shifting rationales for attacking Iran, but appears to have achieved little of what he has said he wanted: Iran's theocratic government remains in place, its ballistic missile program has not been dismantled, and it has not ended its support for anti-Israel militias like Hezbollah.
Israel has not directly participated in the negotiations and has distanced itself from both the April ceasefire and the latest US-Iran agreement, adding uncertainty to whether the new ceasefire will hold.
The war has affected most countries in the region, killing more than 7000 people, mostly in Iran and Lebanon, which Israel invaded in March after Iran-allied Hezbollah joined the fighting.
US Vice President JD Vance said that the agreement included Israel and Lebanon, contradicting Israeli Prime Minister Benjamin Netanyahu, who said on Monday that Israel is not bound by it, and will not withdraw from southern Lebanon.
A Hezbollah spokesperson told Reuters the group believed Iran would not agree to a permanent truce if the Israeli occupation was not ended.
Iran's military command, Khatam al-Anbiya Central Headquarters, warned that Israel should expect a hard response if it did not stop its attacks on southern Lebanon.
A senior US official said the agreement allows Iran to immediately begin selling oil and fuel, and included banking, transportation and insurance services to facilitate the sales.
US and Iranian officials say the deal could eventually deliver substantial economic benefits to Iran by lifting sanctions and unfreezing foreign assets.
It could also set up a $US300 billion ($A424 billion) reconstruction fund, paid for by neighbouring Gulf states that host US military bases and were hit by Iranian attacks during the war, if Iran complies with other terms.
In the coming 60 days, negotiators will return to difficult issues like the future of Iran's nuclear program, which Tehran was discussing with Trump officials in February until those negotiations were interrupted by the US decision to launch the war.
Two other issues that Trump and Netanyahu used to justify the war appear not to be on the agenda: ending Iran's support for regional armed militia groups and curbing its missile program.
Trump has publicly criticised Netanyahu and expressed frustration at Israel's military campaign, saying on Tuesday he was "not happy" with the way Israel had handled itself.
"Iran wants to get it done," Trump told reporters about the next phase of negotiations with Iran.
"They have to get back to business, and the relationship is now normalised, so I think it's going to go pretty quickly."
Earlier he described the deal as "a wall to a nuclear weapon" for Iran.
Iran signed an agreement to sharply curtail its uranium enrichment efforts in 2015 with the US and other countries, but the agreement fell apart after Trump unilaterally withdrew the US in his first term.
That led to Iran creating a stockpile of highly enriched uranium that Trump says he wants removed or destroyed.
Oil prices slid more than two per cent to new three-month lows on Tuesday, a day after tumbling nearly five per cent following news of the deal, though industry officials say Middle East oil and gas output will take months to fully recover.
Both sides say the Strait of Hormuz, which normally carries about one-fifth of the world's trade in oil and liquefied natural gas, will be open from Friday, but shipping companies say they will wait to see if peace holds.