The first biometric airport terminal is already up and running, thanks to Delta’s collaboration with U.S. Customs and Border Protection, the Transportation Security Administration, and Hartsfield-Jackson Atlanta International Airport. Similar systems are now operational at Dubai International Airport , at least for first- and business-class passengers. While groundbreaking, these systems—powered by artificial intelligence—are early exemplars of the emerging technological transformation of airport and airline operations. They are working preludes to artificial intelligence’s eventual forays throughout the passenger experience. Part of these forays will be driven by technology; we’ll have increasingly smarter and capable tools for independently managing enormous complexities and creating new efficiencies. Another part will be driven by new competitive pressures; in the face of autonomous vehicles that will offer compelling alternatives to flying, the future of air travel will require robust improvements.

Taken together, we can reasonably anticipate artificial intelligence to finally solve for some of the most intractable problems that have frustrated passengers and vexed airlines and airports for decades. But this likely won’t be a glitch-free parade into a utopian future, and artificial intelligence represents some serious threats to passenger privacy as well as the potential for unanticipated misuses. Here are three of the biggest problems in air travel and how AI might transform them into better experiences for passengers–from eliminating lines to shaming bad behavior–along with some related visions of what could go wrong.

Replacing glacial and dehumanizing boarding processes

One of the benefits of artificial intelligence is its capacity for seeing what’s happening in ways that humans simply cannot. As an example, Google uses AI and satellite data to observe the world’s fishing fleets at work across all 1.4 billion square miles of Earth’s oceans as part of efforts to prevent illegal fishing. This same capability to see and then make sense of noisy, complex data can be used to create and manage better aircraft boarding processes. Instead of the creeping parade of inefficiency we have now, AI-powered computer vision could help architect just-in-time, queue-less experiences.

What could this look like? Imagine even an early version—informed by cameras, sensors, and an airport network in which every passenger and every bag is a node—that simply develops a basic understanding of a few interrelated data sets. A computer vision system with a dynamic comprehension of who’s at the gate and who’s not, the bags they have and the other people they’re traveling with, and even how these people physically move, can then bring those disparate data sets together to answer the question that matters most: How can we board everyone in the fastest way that never creates a line? The system would also coordinate communications with you and your fellow passengers in ways that are far more personalized than the class- and zone-based boarding routines used today. This future could liberate flyers—and the gate itself—in ways that are difficult to predict. At the very least, airport gates would feature fewer crowded waiting rooms, and passengers would spend more leisure time at airport restaurants and stores—or, even better, less time in the airport overall.

There is a more pessimistic side to this narrative, though. If AI can be used to optimize airport and airline processes, it can be used to re-architect those processes in ways that don’t necessarily benefit passengers, and instead benefit commercial interests. Put simply, AI’s strength at seeing what’s happening could be used to manipulate passengers. That fatigued family with three bored and hungry kids? AI could help ensure they’re funneled through a security checkpoint that’s adjacent to a toy shop or fast-food restaurant where they are more likely to make impulsive purchases. That lonely-looking solo traveler on a bereavement fare? AI could serve up two-for-one offers at airport bars. While this type of marketing-centric predation isn’t much different from what we already endure online, the central danger here is the challenge to human agency within an environment that should have our best interests at heart—but just as easily might be more interested in profiting from our highly contextualized personal information.

Stitching together the winged and the wheeled

Fueled by big data and machine learning, a strength of AI is grappling with complex problems and then learning innovative ways forward, which is one of the reasons various artificial intelligences have already annihilated the best human players at board games like chess and Go. This ability to create new moves—based on a practiced understanding of countless previous moves—makes AI well suited to solve for the complex machinations and movements within an airport.

Right now, the link between ground transportation and air travel in both directions is hardly ideal. For evidence, see the curbside traffic snarls at the arrivals and departures lanes of any major airport. Or, see that many airports are still grappling with how to manage the rise of ride sharing, including where to stage waiting drivers and how to replace lost revenue from parking.