Historians who have focused on the Kennedy-Khrushchev interaction say the lesson of the encounter is that having no agenda is a bad idea.

The presidential historian Michael Beschloss, who has written extensively on the meeting, said that one lesson from the Vienna encounter “is that when two leaders of important world powers have their first meeting as heads of state, the results can be very dangerous unless the agenda has been carefully planned by both sides, and unless each leader has a number of experienced officials in the room who are a significant part of the discussions.”

There are differences, to be sure.

Kennedy entered the meeting as a hawk, after warning of a nonexistent “missile gap” between the United States and the Soviet Union. Mr. Trump enters after more than a year in which he has never had an unkind word to say about Mr. Putin, or his authoritarian rule — and has disputed the accounts of American intelligence officials who say the evidence is beyond doubt that Mr. Putin himself ordered the meddling in the American election.

Kennedy did start with a theme that it is easy to imagine Mr. Trump adopting: that the United States and its adversary have to understand each other’s views. But one of the many heated debates between Kennedy and Khrushchev was over the question of meddling in the affairs of other countries.

According to Arthur M. Schlesinger Jr., the historian who was given notes of the meeting for his book “A Thousand Days,” the two leaders argued about which one spent more time manipulating elections and other leaders.

“How could we work anything out when the United States regarded revolution anywhere as the result of Communist machinations?” Khrushchev was paraphrased as telling the president. “It was really the United States which caused revolution by backing reactionary governments,” he said in comments that Kennedy took as part warning, part lecture.