Inside a cavernous warehouse in South San Francisco, 16-foot-tall walls of kale and other greens stretch down aisles twice the length of a bowling lane. Matt Barnard, CEO and cofounder of Plenty, the startup that designed and built the indoor farm, points to two types of mustard greens called mizuna and tatsoi. “This is one of the blends that we are working to position against junk food,” he says.

Barnard wants to change how the world eats by changing how food is grown. The new farm, which will begin selling produce to San Franciscans later this year, is the latest iteration of its indoor growing system, designed to grow food as efficiently as possible in any space, so cities anywhere can have access to locally grown vegetables—optimized for flavor—at any time of year. When I first visited the company’s headquarters in 2017, it used only a small amount of the space, a former electronics distribution center in an industrial neighborhood. A few months later, Softbank led a $200 million investment round in the startup. The new version of Plenty’s farm now sprawls over a much larger part of its headquarters, and the company plans to eventually replicate it near large cities globally.

Each step in the process is now automated. In one corner of the massive warehouse, a bright yellow robot picks up a tower filled with kale that was growing, minutes earlier, in one of the aisles of greens next door. Gently turning the tower on its side, the robot sets it on a conveyor belt where a spinning wheel neatly trims the greens to harvest them. When the farm opens, this will be one of the last steps before produce is delivered to grocery stores or directly to consumers (the company already sells greens from its earlier, smaller farm through a local food delivery service called Good Eggs, along with some independent groceries). In another corner, robots pack trays with soil and seeds and deliver them to another room to germinate. Along another wall, four robots inside glass boxes carefully lift seedlings out of trays and plant them into the tall white growing towers. Back in the growing room, infrared cameras and sensors monitor the indoor climate, and software adjusts details like the precise “recipe” for light or water to create the best flavor in the plants.

“We essentially coax a different flavor profile out of the plants by giving them the right recipe,” says Barnard. Each day, the company runs harvested crops through its “sensory” department, evaluating factors like size and flavor and tweaking the growing environment as needed for the next crop. “We take those plants and analyze what’s in them, and then we work to give subsequent crops exactly the right recipe so that these things are lovable. And that’s critical. That’s how we get to 10-year-olds asking their mothers for our kale.”

Right now, only around 1 in 10 Americans eat as many fruits and vegetables each day as federal guidelines recommend. If it’s possible to buy local, freshly harvested produce in Minneapolis in February—rather than wilted greens that spent a week on a truck from Arizona or California—Plenty believes that people will be more likely to want to eat them. Because the company can control the growing environment, it says that it can achieve flavors that aren’t consistently possible in fields. It can also sell varieties of produce that are too delicate to survive current supply chains. Consumers don’t really want to buy iceberg lettuce, Barnard says. But it’s a huge crop because it can survive both difficult growing conditions on farms and then travel thousands of miles. With a local journey, Plenty can sell crops that don’t exist in typical supermarkets now. I tasted wasabi arugula, a spicy wild green that mimics the heat of the Japanese condiment.

The company wouldn’t comment on the cost of its system. But it says that it’s still possible to sell greens at the same cost as those grown on a traditional farm. One of the largest costs for indoor farms is energy use, especially from lighting; in the last year, Plenty cut energy consumption by 80% per kilogram of plants grown, and it expects to cut that further. Roughly a third of the value of vegetables sold in the eastern U.S., it says, comes from transportation from farms in places like California or Mexico. Indoor farms can also avoid the cost of days in distribution centers and other parts of those long supply chains. There’s also intrinsic value for consumers in the fact that greens grown in food safety-certified facilities can avoid the contamination that sometimes happens outdoors. In 2018, in three outbreaks, romaine lettuce grown on traditional farms caused 300 infections and hospitalized 128 people; six died. Water contamination from nearby livestock was the culprit. Plenty uses purified tap water inside a space so pristine that it doesn’t have to treat its greens for them to be safe to eat (“prewashed” greens from farms are often washed in bleach in an attempt to kill germs).

Indoor farming still hasn’t proven itself at scale. Aerofarms, another startup with a massive indoor farm at its headquarters in Newark, New Jersey, said in 2015 that it expected to build 25 farms over the next five years; to date, it has built one large farm in addition to its headquarters. FarmedHere said in 2015 that it planned to build 18 farms near major cities. Two years later, the company shut down. Bowery, a New York-based, Alphabet-backed startup that also uses robotics, has two farms so far, though it raised a $90 million round of investment in late 2018 and plans to expand. Plenty itself had planned to open a farm near Seattle by this point, but decided to focus on building its tech platform. Still, it can move quickly: The company completed the design for its new automated Bay Area farm last November, began construction in December, and was operational by March.