When you think of automation, you probably think of the assembly line, a dramatic dance of robot arms with nary a human laborer in sight. But that’s child’s play. The grandest, most disruptive automation revolution has played out in agriculture. First with horses and plows, and eventually with burly combines—technologies that have made farming exponentially cheaper and more productive. Just consider that in 1790, farmers made up 90 percent of the US workforce. In 2012, it was 1.5 percent, yet America still eats.

Here in 2017, the automation revolution in agriculture is poised to take on a whole new life—thanks to robots. In a nondescript office park in Silicon Valley, a startup called Iron Ox is taking the first steps toward roboticizing greenhouse farming, which has so far stubbornly resisted automation. In the very near future, then, the salad on your table may come from the hand of a robot.

Unlike a lot of indoor farming operations, Iron Ox isn’t joining the booming movement of LED-powered grow houses. It’s still very much interested in harnessing the energy of the sun (free energy!). So it’s invading the greenhouse instead. “The problem up until today is that greenhouse production costs around twice as much to grow a head of lettuce as the outdoor farm,” says Brandon Alexander, CEO of Iron Ox. “And one reason is there's no tractors or anything indoors.”

Iron Ox doesn't have a tractor, but it also doesn't need one. Its solution begins with a custom hydroponics tray filled with nutrient-rich water. Over that is a cover with a grid of holes, in which the plants sit in little pods. This is all designed so a custom robot—essentially an intelligent rectangular frame—can come along and slide lifters under the tray, then cart it to a different part of the greenhouse.

Why bother with all the shuttling around? Because they can. Out in a field, farmers have no choice but to leave plants where they planted them—and because plants grow, farmers have to space out seeds to accommodate their fully-grown dimensions. But Iron Ox doesn't have to waste that extra space.

Here in the greenhouse, they’re using different trays with different spacing of their holes, some farther apart than others. Leafy greens in particular need more horizontal room to expand, so baby plants start off in a more densely packed tray, then graduate to trays with more room as they grow. “This, combined with the fact that we don't have to worry about seasonality—we can always be seeding, always be harvesting—allows us to grow over 30X per acre compared to an outdoor farm,” says Alexander.

The problem then becomes transplanting between trays. That’s where the robotic arm comes in. It sees with stereo cameras on its wrist, and grabs the plants with a gripper custom-designed to fit the pods (which the plants never outgrow, by the way). The arm sits between two trays of different densities, eyeballing the plants and moving them from one tray and to another.

Because it’s equipped with a camera, it can simultaneously build a 3-D image of each plant. “Is it the size that we expect?" says Jon Binney, CTO of Iron Ox. "Is it the shape that we expect? If it's going to fall one way or the other, that could be a lighting problem. Brown spots on the edges of the leaves could be too much light and not enough air coming through.”

So Iron Ox’s system not only automates greenhouse growing, but supercharges it. The company is developing machine learning algorithms that will automatically detect diseased plants and kick them out of the system before the sickness spreads. Underdeveloped plants would also get the boot. What you end up with is a system that does the repetitive tasks of greenhouse farming faster and more precisely than a human, and uses that data to make the process all the more efficient.

Whether in the greenhouse or the field, it’s this kind of automation that will be essential to the future of humanity. Our species has to figure out how to feed a rapidly growing population on a planet that refuses to grow bigger. So we’ll have to get smarter about how we use the land we’ve got, or we’re going to have trouble. That and climate change will monkey with water supplies around the world, so the inefficiencies of traditional outdoor farming are going to start looking more and more untenable. (Iron Ox claims its hydroponics system uses 90 percent less water than outdoor farming. Studies of hydroponics in general have found about the same efficiencies.)

But automation means humans lose jobs though, right? Not in this industry. “We've talked to dozens of commercial farmers, outdoor and indoor, and the biggest issue by far is labor scarcity,” says Alexander. “So the truth is today, it doesn't matter what country, newer generations are not taking up farming. And so there's a significant labor shortage especially here in California.” (He ain’t lying— between 2002 and 2014, the number of full-time farm workers in the US plummeted by 20 percent.)

The solution is to hand the future of our food supply to the machines. There’s simply no other way to go about it. So be careful not to bite the robotic hand that feeds you.