An Afghan child was killed in the crossfire as police battled the attackers for three hours.
Several foreign nationals working for the San Rafael-based charity, Roots of Peace, were in the building at the time of the attack but were able to flee, the group's director told The Associated Press.
Afghanistan's deputy interior minister said the standoff ended with all four attackers being killed.
One died when he exploded his vehicle at the entrance to the compound, the other three were killed by police, he said.
Roots of Peace, founded by CEO Heidi Kuhn, clears landmines and works with local farmers to improve their food crops, including table grapes.
The Taliban has promised to disrupt the upcoming April 5 presidential elections. This is happening as American troops continue the drawdown in Afghanistan. Roots has been working in Afghanistan since 2003.
The group's director did not identify the nationalities of the workers inside the building, but the minister said at least three were believed to be American.
Kuhn says this attack will not deter Roots of Peace in its mission.
(ABC7 News contributed to this report)