SAN FRANCISCO — Spending by consumers has dominated the American economy for decades, usually the largest driver of economic growth. But in the first half of this year, spending by companies on artificial intelligence rivaled consumers as the primary engine of the nation’s economic expansion.
One force is propping up the economy. Fears are growing it won’t last.

1