The female “was caught red-handed” trying to pass information to Russians, Ukrainian defence forces said on Monday.
They said the agent was trying to collect times and locations on the Ukrainian president’s schedule on the night before his visit to Mykolaiv oblast.
Ukrainian intelligence said in a press release the suspected spy is a resident of the fishing resort of Ochakiv and used to be a saleswoman in a local military shop.
They claimed they watched her as and boosted security measures ahead of Mr Zelensky’s visit.
The Ukrainians said they continued to document the suspect’s actions to learn more about her Russian handlers who were plotting a “new massive air strike on the region”.
A Security Service of Ukraine (SSU) spokesman said: “The SSU apprehended the traitor ‘red-handed’ when she was trying to pass intelligence to the invaders.
“To gather intelligence, the enemy agent drove in the target area, taking photos or video footage of Ukrainian facilities.
“The court has chosen custody as a measure of restraint for the suspect, who is facing up to 12 years in prison.”
President Zelensky accused Russia of hitting a blood transfusion centre in Ukraine’s Kupyan district late on Saturday – describing it as a war crime committed by “beasts”.
Multiple Russian strikes on Ukraine overnight Saturday into Sunday left six people dead.