Instacart is buying Caper AI, maker ofsmart grocery carts, for $350 million in cash and stock.

The purchase is the latest in Instacart’s expansion into retailer platform investments.