A customer views a digital menu at the drive-thru outside a McDonald’s restaurant in Peru, Illinois.Daniel Acker | Bloomberg | Getty ImagesMcDonald’s said Tuesday it has agreed to acquire a company that is trying to automate the drive-thru. It’s the fast-food giant’s third tech-focused deal this year.Apprente, a Silicon Valley company founded in 2017, uses artificial intelligence to understand drive-thru orders, which could cut down on service times. McDonald’s said the technology also could be used someday in its self-order kiosks and mobile app.The Chicago-based company said it evaluated Apprente’s technology in McDonald’s test restaurants.Apprente’s employees will be the founding members of a group called McD Tech Labs, which will be housed within McDonald’s global technology team. The burger chain wants to grow its presence in Silicon Valley by hiring more tech experts, including engineers and data scientists.Financial terms of the deal were not disclosed.The chain has been using technology to stay ahead of the competition. In March, McDonald’s announced the acquisition of Dynamic Yield, which specializes in personalization and decision logic technology. People familiar with the matter said the deal was worth more than $300 million, making it McDonald’s largest deal in two decades.After closing the Dynamic Yield acquisition, McDonald’s quickly deployed its machine learning tech in more than 8,000 U.S. drive-thrus. The technology changes drive-thru menus based on the time of day, weather, traffic and the customer’s order — all to coax the customer to spend more. By the end of 2019, the burger chain wants to integrate Dynamic Yield’s technology into almost all U.S. and Australian drive-thrus.McDonald’s also took a minority stake in Plexure, a mobile app vendor.The chain is also in the middle of renovating its U.S. stores with digital menu boards, self-order kiosks and other tech upgrades. CEO Steve Easterbrook told analysts on the second quarter conference call that the kiosks have been generating higher average checks in the U.S.McDonald’s stock, which has a market value of $167 billion, is up 22% this year.