Swiss Foreign Minister Ignazio Cassis and US Ambassador Edward McMullen signed the agreement in Bern Friday, the foreign ministry said in a statement.
The move comes after Venezuelan President Nicolas Maduro announced in January that he was cutting off diplomatic relations with Washington after US President Donald Trump recognised opposition head Juan Guaido as the country's interim leader.
The last US diplomatic staff were withdrawn from the country last month.
Cassis had first discussed the issue with US Secretary of State Mike Pompeo and National Security Advisor John Bolton when he visited Washington in February, the statement said.
The US government officially asked the Swiss foreign ministry to take over the so-called “protective power mandate” in Venezuela in mid-March, it added.
“The mandate offers Switzerland the opportunity to contribute to the de-escalation of tensions between the two countries and thus to play a constructive role in regional stability,” the statement said.
The foreign ministry said it would likely mainly assure US consular services in Venezuela.
Caracas “will now closely examine Switzerland's assumption of this mandate,” it said, adding that it was ready to assume its new duties as soon as Venezuela gave its stamp of approval.
Maduro has blamed US sanctions for Venezuela's acute economic problems, but Guaido says government corruption and mismanagement are at fault.
The US, which has not ruled out military intervention to oust Maduro, is among some 50 countries that have recognised Guaido as Venezuela's leader.
Switzerland, renowned for its neutrality, already represents the diplomatic interests of a range of countries in similarly difficult situations.
The wealthy Alpine nation represents US interests in Iran. It also represents Russian interests in Georgia and vice-versa, Iranian interests in Saudi Arabia and vice-versa, and Iranian interests in Egypt. And until 2015, it represented US interests in Cuba and Cuban interests in the US.