An Iranian and an Afghan are also accused, the reports said.
The allegations come after Saudi Arabia and some of its allies cut diplomatic ties with Tehran in January during a crisis between the regional rivals.
The decision came after demonstrators burned the Saudi embassy in Tehran and a consulate in Iran's second city of Mashhad to protest the Saudi execution of Shiite cleric Nimr al-Nimr, a native of the Qatif area.
The trials are taking place before a special criminal court in Riyadh, the Saudi Gazette and Al-Arabiya news channel's website reported.
More From This Section
They divulged defence secrets, sought to commit sabotage, tried to recruit moles in government departments to send coded information, and supported "riots" in Qatif, the reports said.
They added that some suspects met Iran's supreme leader Ayatollah Ali Khamenei.
The executed Shiite cleric Nimr was a driving force behind protests that began in 2011 among the kingdom's minority Shiites.
Those protests later developed into a call for equality in the kingdom where Shiites complain of marginalisation.
Saudi Arabia alleges that Iran has a 37-year record of spreading "sedition, unrest and chaos" in the region.
He alleged Iran has "spy cells... That are conducting sabotage operations or terrorism".