The bright red, driverless tractor drags the tiller in a perfect line in a south Indian field, makes a turn at the edge of the property, encounters a test dummy and then stalls, not knowing what to do.

India’s Mahindra & Mahindra, one of the biggest suppliers of smaller tractors to the U.S., and other manufacturers are racing to develop what they see as the future of farming: robo-tractors and other farming equipment to help produce more food, more sustainably at a lower cost.

John...