The United States and Iran have announced an agreement aimed at ending months of conflict and paving the way for the reopening of the Strait of Hormuz, a vital shipping route for global energy supplies, although key details of the accord remain unclear.