First Amazon announced plans to fully automate its new brick and mortar store with robots. Then we learned that Foxconn plans to automate 30 percent of its factory workforce by 2018. And recently, Wendy’s announced plans to add automated kiosks at more than 1,000 stores. One thing is clear — robots are changing the way we live and work.

And this is just the beginning. It’s estimated that 47 percent of U.S. jobs could be automated within the next two decades. While many factory and retail jobs have been the first to go, many traditionally white collar occupations are also at risk as artificial intelligence (AI) and automation continue to take on increasingly complex tasks, from financial analysis to anesthesiology.

There’s still hope for human workers, however. Technology will make some of today’s jobs obsolete, but it will also lead to a new wave of innovation and jobs that will pay more. With the right education, training, and attitude, millions of at-risk workers can embrace machines as teammates — rather than rivals — and enjoy the following.

A higher salary

Companies will pay a premium for human skills and expertise.

More and more repetitive tasks will be phased out by machines, paving the way for new types of jobs, like the engineers and data analysts needed to build and code these new machines. In the U.K., for example, AI technology has replaced 800,000 lower-skilled jobs with 3.5 million new ones, which pay on average £10,000 more than the jobs they replace. There will also be a greater need for humans who specialize in abstract thinking, creative tasks, and problem solving, leading to job growth in those areas.

While these new jobs will pay more on average, they also will require a new set of skills and education levels that many low-skill workers currently don’t have. At our current trajectory, there will be a shortage of workers with the necessary skills in STEM, design, and abstract thinking. This is particularly true in the U.S., where only 20 percent of graduating high school seniors are academically ready for the rigor of first-year college courses in STEM.

The jobs are out there for those willing and able to learn the new skills. It’s estimated that there will be a shortage of 1 million data scientists by 2018. The key now is investing in the education and training for our workforce to take advantage of these new opportunities.

Better life outside of the office

Imagine if five years down the line you not only have more money, but more free time.

Improvements in technology have historically made our lives better. For example, in the 1800s, 80 percent of American jobs were on farms. Today, fewer than 2 percent of Americans work on farms due to the mechanization of farming. While the workforce has had to adapt over time to this new normal, massive increases in productivity have created more stable food supplies, reduced infant mortality, and improved access to transportation, among other quality of life improvements.

Likewise, advances in AI will bring about many social benefits. Driverless cars could reduce traffic accidents by 90 percent, potentially one of the greatest health achievements of the century. AI will free up time from everyday tasks like cleaning or mowing the lawn so that we can spend more time doing what matters most — spending time with family and friends. The benefits are exponential, and will continue to multiply as AI continues to come of age.

Customer service 2.0

AI will revolutionize the way companies interact with customers.

Thanks to chatbots, or computer programs which conduct conversations via auditory or textual methods, companies can now address customer queries in a matter of seconds. By weeding out the easy-to-solve queries early on, chatbots will ensure that their human teammates have the maximum time and the data necessary to address more complicated customer problems efficiently.

While human workers are here to stay, no job is entirely safe from automation. As the roles of human employees continue to change, we all must commit to a lifetime of learning. This starts in the traditional classroom, but organizations also need to help current employees keep up with the pace of technology by developing retraining and reskilling programs. With access to the right curriculum and resources, human workers can evolve and build new skills in tandem with their robotic teammates — ensuring a brighter future at home and at work.

Tiger Tyagarajan is the CEO of Genpact, a global professional services firm.