The fighting killed dozens of civilians, including women and children, the SOHR said.
The ceasefire went into effect about 2 p.m. (9 p.m. ET) between the Syrian military and the YPG, the military arm of the Kurdish political group the PYD, said state media outlet SANA, citing local television.
All Syrian soldiers and militiamen loyal to them will withdraw from the city while the local police remain to protect the security square, the SOHR said. That area contains the mayor's office, the police headquarters and the local army command center.
The two sides agreed to exchange "bodies of the martyrs and captives" at 9 p.m. local time. The al-Hasaka al-Qameshli road and all roads inside and outside the city will be opened, SANA said.
SANA reported that the Asayish, the military wing of the Kurdistan Workers Party, has escalated provocative actions in Hasaka in the last few days, attacking government buildings, stealing oil and cotton and carrying out abductions.
The agreement said the two sides would work on resolving "the Kurdish issue" and discuss what to do with discharged state employees, SANA said.
The two sides had agreed to a ceasefire last Sunday
but it quickly broke down, the SOHR reported.
The Kurdish forces drove ISIS fighters out of the city recently. When Syrian warplanes started bombing the area, the US military withdrew special operations forces, according to a US defense official.