Are we on the cusp of a Fourth Industrial Revolution? Most participants in Davos think so. And it’s unlike anything we’ve ever experienced: “As a society, we are entering uncharted territory,” Salesforce CEO Marc Benioff told participants on the last day of this year’s Annual Meeting.

Less clear, however, is the impact this revolution will have on entire industries, regions and societies around the world. Will it be a force for good or evil? Will it provide new opportunities for all, or will it exacerbate inequalities?

It was these questions that framed the four-day meeting, and which were summed up by Canadian Prime Minister Justin Trudeau in a special address on the first day of Davos: “We don’t want technology simply because it’s dazzling. We want it, create it and support it because it improves people’s lives.” But does it?

As with earlier revolutions, this one will not be painless. A Forum report released at the start of the meeting predicted that by 2020, 5 million jobs will be lost as a result of technological changes. In one of the first panels of the week, Microsoft CEO Satya Nadella raised this issue: “I start from a place of optimism and hope,” he told participants. But without doubt, there would be victims of the Fourth Industrial Revolution:

In a special address, US Vice-President Joe Biden shared the same fears. For all its potential, could the Fourth Industrial Revolution destroy the middle class and widen inequalities?

“I believe, on balance, these transformations are changes for the good. But they come with real peril, and they require us to be proactive. For how will the warehouse worker who used to ship your order, or the salesman who used to take it, now make a living when he or she is no longer needed in that venture?”

But the effects of this revolution go beyond the individual level: they are potentially global in scale. Social media, for all the benefits it brings, makes it easier than ever before for terrorist organizations like ISIS to spread their hateful messages, Sheryl Sandberg of Facebook told participants. While technology companies do their best to police this, “as soon as you take something down, another one pops up”, she said.

Perhaps more terrifying than a terrorist organization with a global reach is the idea that the technology at the heart of the Fourth Industrial Revolution could one day lead to humanity’s downfall. While it might sound like a scene from a Sci-Fi movie, experts from the world of artificial intelligence warned participants it could be on the horizon.

We are on the cusp of a new era of conflict, warned Angela Kane of the Vienna Center for Disarmament and Non-Proliferation:

But who needs robots of mass destruction when we seem to be doing such a good job ourselves? “It’s a mess,” International Rescue Group CEO David Miliband said of the ongoing refugee crisis in Europe. While the digital revolution was meant to bring people together, it sometimes seems we are closing in on ourselves.

But the risks on employment at least have been over-hyped, according to Erik Brynjolfsson, Director of the MIT Initiative for the Digital Economy. The idea that robots will take our jobs is “the biggest misconception I’ve heard here at Davos.” Instead, he emphasized technology’s potential as a powerful tool:

A fourth industrial revolution also gives us the opportunity to rethink the way we work so that both men and women can fairly compete. In the session Progress Towards Parity, Sheryl Sandberg said this meant unpicking the cultural factors that mean we face a "toddler wage gap":

It also means making sure that the digital revolution lifts the lives of women, according to the IMF’s Christine Lagarde:

On the international stage, there were signs that cooperation and good faith can win out against the disillusionment and divisions that characterise the dark side of the Fourth Industrial Revolution.

Cyprus could be on the brink of a historic peace deal, putting an end to what has been one of the world’s most intractable ethnic disputes. Mustafa Akinci, the Turkish-Cypriot leader, and Nicos Anastasiades, the president of Cyprus, shook hands and spoke of a peace deal within the year.

Meanwhile, Argentina's newly elected President Mauricio Macri expressed hope about an agreement on his country’s long standing debt dispute.

The Fourth Industrial revolution will require a "holistic" style of leadership, which views today's global challenges as inherently connected, according to Professor Klaus Schwab. John Kerry, US Secretary of State, agreed, arguing that we should resist fatalism in the face of rising levels of conflict.

Showing a markedly less Machiavellian take than his House of Cards persona, the actor Kevin Spacey said that politics should be about “people coming together to really accomplish amazing things – it’s what we witness here at Davos”.

Leadership in the fourth industrial revolution needs to be bold, brave and based on real action, participants agreed.

A dose of optimism also helps.