“Over the years, it just became increasingly clear to me that the quality of the guards and the guard services were horrible,” he said. “They weren’t very effective.”

At first, he tried to create his own guard company, but that was too expensive, so he began researching enhanced security systems. He said installing the systems in all of the company’s properties would save $400,000 to $500,000 a year. They will also be more reliable.

“We had cameras out there when we still had guards,” Mr. Gallagher said of his trial phase. “We had an incident that the cameras picked up. Where was the guard? He was sleeping in his car for six hours.”

Thomas Tull, the chief executive of Tulco, which owns Edgeworth, said what he wanted for himself and his clients was a system that anticipated risks, not just responded to them.

He gave as an example a worker in one client’s home who posted a picture of the house online; the Edgeworth security system flagged the photo within a minute, and it was taken down. In another instance, the plans for someone’s compound were detected on the so-called dark web.

“Who knows what they were going to do with it?” Mr. Tull said. “That’s a problem that didn’t exist 20 or 25 years ago, this digital extension of yourself.”

How these systems learn the difference between good behavior and bad is a fraught ethical question.

“There is inherent bias in the computational systems,” said Illah R. Nourbakhsh, the K&L Gates professor of ethics and computational technologies at Carnegie Mellon University’s Create Lab.