Soon your car may be able to give you a lifesaving nudge before you fall asleep at the wheel.

Major auto makers are testing driver-monitoring systems that determine if a driver is too tired or distracted to drive safely, and the first such systems could be available next year.

Such artificial intelligence systems that watch drivers and evaluate...