But if past debates over setting norms of behavior for cyberspace are a guide, American officials are leery of any kind of agreement that might make illegal the types of activity — like espionage, data manipulation or attacks on infrastructure — that the United States may want to use in a future conflict.

Elections are an interesting example. Congress and many others have condemned the 2016 Russian attacks on the Democratic National Committee and the private email accounts of senior officials in Hillary Clinton’s presidential campaign. But the United States has interfered in foreign elections before, including Italy in the 1940s and Iran and Latin America in the 1950s and 1960s, and some officials say that no American president should be forced to give up that tool if it could prevent a war.

Similarly, the Pentagon worries about commitments to avoid using cyberattacks as a prelude to military action. The United States had a secret program, code-named “Nitro Zeus,” which called for turning off the power grid in much of Iran if the two countries had found themselves in a conflict over Iran’s nuclear program. Such a use of cyberweapons is now a key element in war planning by all of the major world powers.

Still, the fact that companies and governments came together on any kind of vision for keeping the internet free of malicious activity was viewed by some key players as a step forward.

“Most of the world’s democracies are rallying around the need to protect all democracies from cyberattacks,” said Brad Smith, the president of Microsoft, who has been among the most vocal in arguing for a digital Geneva Convention. “You have to start by building a strong coalition among the democracies themselves.”

Much of the statement of principles calls for restrictions on actions Washington has also condemned in the past: the theft of intellectual property, including trade secrets and industrial designs, and attacks on “the public core of the internet.”

The United States has indicted Chinese, North Korean, Iranian and Russian hackers for offenses including theft of industrial secrets and for attacking Sony Pictures Entertainment to prevent the distribution of a movie that North Korea found offensive. Nonetheless, the administration’s aversion to international agreements in general may have made it leery of joining the announcement on Monday.

Governments were outnumbered by companies and nongovernmental groups as signatories. Google, Facebook, Microsoft and I.B.M. all signed on. Three of the five countries that are part of what is known as the “Five Eyes,” — the English-speaking victors of World War II who share intelligence information — also signed: Britain, Canada and New Zealand.