For the last two and a half years, Iron Ox has been working on perfecting its agricultural robots to tend its indoor farms. After first testing its systems on a small scale, the company is opening its first fully autonomous production farm, with plans to start selling its produce soon.

The farm is currently growing a number of leafy greens, including romaine, butterhead and kale, in addition to basil, cilantro and chives. The robots tending these plants are Angus, a 1,000-pound machine that can lift and move the large hydroponic boxes in which the produce is growing, and Iron Ox’s robotic arm for harvesting the produce.

As Iron Ox co-founder and CEO Brandon Alexander told me, the current setup can produce about 26,000 plants per year and is equivalent to a one-acre outdoor farm — though this one is obviously indoors and far more densely packed.

Alexander noted that he and his co-founder Jon Binney decided to get into indoor farming after working at a number of other robotics companies — for Alexander, that includes a stint at Google X — where the focus was often more on building cool technologies and not on how those robots could be used. “We’d seen lots of novelty robotics stuff and wanted to avoid that,” he told me. And while the founding team considered getting into warehouse logistics or drones, they eventually settled on farming because, as Alexander tells it, they didn’t just want to build a good business but also one that would create social good.

Today, the majority of leafy greens (the kind of produce that Iron Ox focuses on) in the U.S. are grown in California and Arizona — especially during the winter months when it’s colder in the rest of the country. That means a romaine lettuce that’s sold on the East Coast in January has often traveled more than 2,000 miles to get there. “That’s why we switched to indoors,” Alexander said. “We can decentralize the farm.”

It also helps that an indoor hydroponic farm can achieve 30 times the yield of an outdoor farm over the course of a year, yet uses far less space.

To get to this point where Iron Ox can operate an autonomous farm, though, took plenty of work and engineering chops. The hardest challenge, Alexander told me, was to get the robotic arm to look at the plants through its stereo cameras and then plan the pickup operation to harvest the produce, which isn’t always uniform. And to run this operation autonomously, it obviously has to do so reliably.

Angus, the larger robot that picks up the 800-pound pallets the produce is grown in and brings them to the robotic arm, also took some time to get right. You don’t want to move those pallets too quickly, after all, or you’ll have plenty of water to mop up.

All of that, including the system that monitors the plants, their growth, the sensors that watch over them and the hydroponics system, is then controlled from a cloud-based service that tells the robots when it’s time to harvest and which operations to perform. The robots themselves, though, then perform those tasks autonomously.

One thing that came as something of a surprise to the team, though, was that running an indoor farm solely with LED lighting still results in electricity bills that are simply too expensive to make the operation profitable. So going forward, Iron Ox is actually betting on more traditional greenhouses that are augmented by high-efficiency LED lighting.

That means the team can’t build these autonomous farms right in the city, though, because you can’t exactly stack a number of greenhouses on top of each other. But as Alexander noted, even if you have to be 20 miles outside of the city, that’s still far better than shipping produce to a supermarket that is thousands of miles away.

As Alexander stressed, the team spent a lot of time talking to both farmers and chefs to figure out what they needed. Farmers, it turned out, were mostly complaining about their inability to find labor. And that’s no surprise. The labor shortage in the agricultural industry is starting to become a major issue for farmers, especially in states like California. As for the chefs, what they were mostly looking for was quality, of course, but also predictability and consistent quality.

The plan now is to start selling the produce from the first farm and then scale to more and larger locations over time. Iron Ox now has the money to do so, given that it has raised more than $5 million in total, including a $3 million round it announced earlier this year.