It is not clear which armed group is involved in the siege.
Tunisian authorities say they will "do whatever needs to be done" to secure the employees' release.
Libya has been in turmoil since the Nato-backed removal of former leader Muammar Gaddafi in 2011.
"A crisis cell has been formed" to respond to the situation, says the Tunisian prime minister's office.
Africa news updates
Why is Libya so lawless?
Islamic State gains Libya foothold
Eight vehicles were involved in the raid, a Tripoli security spokesman told the BBC.
The self-declared government in Tripoli, backed by an alliance of different militia groups, is not recognised by the international community.
Tunisia re-established a consular presence in Tripoli in recent months after most foreign embassies shut down their missions over safety concerns, the BBC's Rana Jawad reports from the Tunisian capital Tunis.
The UN is trying to negotiate a political settlement to the crisis in Libya, after insecurity in the capital forced Libya's elected parliament and government to relocate to the eastern city of Tobruk.
Armed men have stormed the Tunisian consulate in Libya's capital Tripoli and are holding 10 employees hostage, Tunisia's foreign ministry says.