The protesters have been trying to oust Prime Minister Yingluck Shinawatra since November, part of a long-running crisis that broadly pits Bangkok's middle class and royalist establishment against the mainly poor, rural supporters of Yingluck and her brother, former premier Thaksin Shinawatra.
"The prime minister and the Election Commission agree on a July 20 election," Puchong Nutrawong, secretary-general of the commission, told reporters after a meeting with Yingluck.
He said the commission would ask the government to issue a royal decree and get the king's endorsement for the vote. The cabinet, which must also sign off on an election, would probably consider the decree next week, he said.
The main opposition Democrat Party, which boycotted the vote in February, was noncommittal about its participation in a new election.
"Let me propose an exit strategy for Thailand first," Democrat leader Abhisit Vejjajiva told Reuters.
Abhisit, as part of his mediation effort, is calling for talks between the protagonists and for a political reform process to take place alongside a general election, although his efforts have met with scepticism.