Over the last two hundred years, technological innovation has been the driving force behind a massive improvement in global living standards, even as human population has grown from less than a billion to more than seven billion people.

Despite the daily barrage of doom and gloom headlines, the most fundamental measures of human wellbeing, such as infant and maternal mortality, average lifespan, education levels, and global per capita GDP have all improved dramatically.

Technologists forecast that the next few decades of progress in energy, food, medical, and manufacturing technologies will bring us ever closer to an “age of abundance” with even higher standards of living.

But there is a major challenge ahead when it comes to some of these very technologies and the development of smart machines – artificial intelligence and robots capable of performing most routine human activity. And that is the risk of structural and ever-increasing technological unemployment.

The concern about automation eliminating jobs is as old as machinery itself. From the Luddites in the early 1800s to Keynes’ 1930 Economic Possibilities for our Grandchildren to the 1964 Triple Revolution letter, the hand-wringers have been proven wrong time and time again as both population and employment have continued to grow.

Of course, jobs have been eliminated. According to the Bureau of Labor Statistics, as recently as 1950, eight million people in the U.S. worked in agriculture—10 percent of the workforce—supporting 150 million Americans. Now only two million farm workers support a population more than twice as large. And US manufacturers are producing six times more output than in 1950 with 15 percent fewer people.

As automation in agriculture and manufacturing reduced the need for human labor, advanced capitalist economies created better-educated workforces and shifted employment to the knowledge and services sectors. These jobs have required fundamentally human capabilities of communication, information processing, decision-making, sensing and manipulating objects in unstructured environments, and emotional connection.

The past few years have demonstrated that technology is rapidly advancing in most of these once strictly-human domains. Technologies such as speech recognition and translation assistants, Google’s and auto makers’ self-driving cars, IBM’s Watson, and a wide variety of robots show that massive computing power, huge data sets, and sophisticated sensors and algorithms can enable smart machines to perform at or above average human levels.

Project the kinds of improvements we’ve seen in the last 20 years forward and in one or two decades we will see smart machines, both software and hardware, able to substitute for the majority of humans doing complex but routine work in both the knowledge and service sectors.

While it may feel like we’ve transitioned to a largely technological, high-skilled workforce, the reality is that in the top 35 occupations that make up one half of all U.S. workers, there is only one—software engineer—that is new. All the others have existed for at least 75 years.

The top 10 occupations employing 25 percent of U.S. workers—retail sales, secretaries, fast food workers, hand laborers, cashiers, building cleaners, office clerks, drivers, nurses, wait staff—are already seeing automation and disruptive business models that put their jobs at risk.

And all computer related occupations, engineers, scientists, technicians, mathematicians, and statisticians (STEM jobs) make up only about 8 percent of employment. Those jobs also become more and more productive with advancing technology, counteracting increased demand.

There will of course be new industries and jobs created in the future, just as there always have been. The question is, will they look like GM and Wal-Mart? Or more like Facebook, which provides a global service to more than a billion people with just 8000 employees? Or WhatsApp, which served 500 million customers with a staff of fewer than 20? And wouldn’t the new industries, funded by the profits generated by smart machines themselves, use those technologies to minimize their costs—including labor?

When smart machines can do most routine work in the economy, the demand for human labor splits into two camps. A small group with the most valued skills and talents—creative, intellectual, entrepreneurial—will earn great rewards. For the remaining jobs that machines can’t do, the qualification will be “being a human,” and the basic rules of supply and demand will drive those wages to the legal minimum.

Compounding the problem, using m ore machines and fewer people tends to shift income towards wealthy investors (who own the machines) and away from workers. Combined with the “winner-take-all” nature of businesses based on digital goods and network effects, this drives inequality even higher.

The problem with this scenario is that masses of people with no jobs or minimal income cannot be effective capitalist consumers. The virtuous cycle of businesses employing people to accomplish work and paying them income to become consumers of business output will break.

So what is the solution? Blocking technological progress and stifling innovation isn’t it. We want to live in a world of technological marvels that lower the cost of all basic necessities, raise the standard of living, and keep us healthy and entertained. We also want to live in a world where machines do all the routine labor and free humans up to pursue their passions.

To embrace this future we need a way to continue the virtuous cycle of consumption, investment, and innovation. The most common proposed solution is a basic income guarantee, a no-strings-attached monthly payment to every adult in the country.

This idea has had proponents on both the left and right, but it is far from mainstream. And the bigger problem is that there are no prominent, forward-looking politicians who have identified technological unemployment as a problem we need to solve. No one has engaged the American people on a range of potential solutions.

We need to adjust to the coming technological future, as we have adjusted in the past. Our leaders and institutions must lead on this issue. Otherwise mounting unemployment and inequality in the coming decades will lead to the kind of social unrest that makes implementing solutions nearly impossible.

Some believe humans are in a race against the machines, but I believe the real race is between our exponentially more capable technologies and our slow moving, dysfunctional institutions. Andrew McAfee, co-author of The Second Machine Age, recently said, “if we continue on the current trajectory, the people are going to rise up way before the machines do,” echoing venture capitalist Nick Hanauer’s warning that “if we do not do something to fix the glaring economic inequities in our society, the pitchforks will come for us, for no free and open society can long sustain this kind of rising economic inequality.”