Seoul welcomes the deal, but spokesman Cheon Ho-sun cautioned that many details must still be worked out and the aid workers will not be released immediately.
Under the terms of the agreement, South Korea agreed to stick by its previous decision to withdraw its 200 non-combat troops from Afghanistan, which work mostly in an engineering and medical capacity.
In addition, Seoul will halt all Christian missionary work in Afghanistan.
The spokesman said there was no agreement to pay the captors, nor was there any mention of releasing Taliban prisoners -- a major demand of the kidnappers.
Taliban spokesman Qari Yousef Ahmadi said delegates from South Korea and the Taliban had "reached an agreement" to free the captives in face-to-face talks Tuesday in the central town of Ghazni.
Twenty-three hostages, all church volunteers, were seized July 19 by the Taliban militant group while they were traveling on a bus in Afghanistan. Two were executed and two others were freed, leaving 19 still in captivity.
While South Korean missionaries have been active in the region, the hostage group's church has said the kidnapped group's trip to Afghanistan did not involve Christian missionary work.
The kidnapping of government officials or foreign aid workers has been used increasingly by insurgents in a bid to destabilize the Western-backed government that took power after the defeat of the Taliban in 2001.
Violence in Afghanistan is running at its highest level since the Taliban were expelled from government nearly six years ago.
A suicide bomber in eastern Afghanistan killed three NATO soldiers and wounded six others on Tuesday as they were working on a bridge project, according to a news release from NATO's International Security Assistance Force.
As a matter of ISAF's policy, the soldiers' nationalities were not released. The suicide bomber approached the soldiers and "self-detonated, instantly killing himself and two nearby soldiers," ISAF said.
The third soldier died en route to an ISAF medical facility.
"Our thoughts during this very difficult time are with the friends, family and colleagues of the soldiers who were killed in this incident," said ISAF spokesman Maj. Charles Anthony.
On Monday, three coalition service members and two Afghan soldiers were killed in an ambush in Kunar province, also in eastern Afghanistan, the U.S.-led coalition said. Three coalition and seven Afghan soldiers were wounded.
The nationalities of the slain service members in this incident also were not supplied. U.S. troops have a strong presence in the eastern part of the country.
Near the southern Afghan city of Kandahar, Afghan and coalition forces on Tuesday killed two Taliban militants and detained five others. The operation occurred southwest of the city, the U.S.-led coalition said.