Americans are worried that technology will soon replace much of the work done by humans, and they are right to be.

Yet the danger we are facing isn’t really about technology. It’s about politics and economic fairness. Whether the pain and the benefits of artificial intelligence are equitably distributed — and whether the turmoil that is still to come will be viewed as an overall social good — will depend on our political will.

The disruptive effects are already here.

Online retailers like Amazon are using A.I. to automate many of the steps that come between placing an order on your smartphone and receiving a package on your doorstep. The impact on American jobs is already enormous.

E-commerce’s share of retail sales nearly doubled in the last five years, to 11 percent from 6 percent, and brick-and-mortar stores, which employ millions of workers, are suffering. American retailers closed nearly 6,000 stores in 2018, and those losses are set to accelerate this year. Since 2014, the United States economy has added more than 12 million jobs, according to data from the Bureau of Labor Statistics, yet the number of retail sales jobs decreased by about 114,000.