In “Minority Report,” a police division called PreCrime deploys psychics who can “see” crimes before they happen, which allows the police to apprehend a would-be killer before he or she can strike.

It turns out the plot wasn’t that outlandish.

A type of predictive behavior profiling is being deployed in workplaces right now. Several companies have digitally monitored employees for years to see if they are goofing around on the internet instead of working, but the practice has widened.

Some programs parse emails and texts, looking for red-flag words or a concept. An employer can collect an employee’s digital breadcrumbs and use them to determine if an employee’s pattern of online behaviors signals an intent to do something the company frowns on and to see behaviors that could put the company in danger of a breach or compromise.

Wall Street brokerage firms and casinos are big practitioners of this form of monitoring to guard the integrity of their network transactions.

Similar online employee surveillance is creeping into other industries as companies seek to strengthen overall network security, with an eye in particular on avoiding unauthorized access to systems, protecting proprietary information and trade secrets as well as creating better overall cyber hygiene.

This trend may seem alarming, but if handled correctly it makes sense. With everyone fully aware that their work-time digital moves are being logged, employee monitoring is a direct way companies can bake security and privacy into their digital infrastructure.

Here are a few things all employees and employers should understand about the behavior profiling systems that, over time, will become common in most workplaces.

The technology for profiling employee online behavior is well established and readily available. It uses the same data-mining techniques used elsewhere in corporate settings.

It begins with collecting worker-to-machine and machine-to-machine interactions in vast data sets. Machine learning algorithms then map each worker’s unique behavior patterns as he or she moves across business applications during the work day.

By understanding how people interact with data and where information travels, a baseline understanding can be built. Behavior analytics perform brain-like functions, correlating data from every business application and all channels of interaction between the employee and the company network.

Over time, the system can begin to benchmark identity, and begin to anticipate and get closer to understanding intent. This is where science fiction writers like the late Phillip K. Dick, whose short story was the basis for the Tom Cruise blockbuster referenced earlier, guessed right. But instead of murder, the goal is to root out pre-hacks and compromises.

It goes without saying that machine learning and artificial intelligence can be put to invasive use. However, this technical capability also can put companies in a position to more quickly to respond when unusual activities occur, such as when malicious code begins to worm its way from one worker’s computer deeper into the network, or when an impostor using an employee’s credentials exhibits behaviors atypical for that user.

Balancing business interests against employees’ right to privacy is something that cybersecurity vendors, the legal community and privacy advocates have been debating for a while now.

Employers must balance legitimate business interests with the reasonable expectation of privacy.

This is where transparency comes into play. What is the monitoring for? This needs to be spelled out and made clear to all employees. And especially in today’s volatile political and social landscape, it is absolutely critical to avoid even the semblance of discrimination. If you monitor one, you must monitor all.

Companies may have good reason to spy on employees’ online behaviors in pursuit of preserving the security of their business operations, but they can’t do it at the expense of privacy.

There’s nothing wrong with a strong, carefully crafted governance model. If it is well-executed, it should be infused with a healthy respect for employees’ right to privacy and promote a culture of strong cyber hygiene, which is the best way to keep from getting hacked or suffering a data compromise.

Adam K. Levin is the former director

of the New Jersey Division of Consumer Affairs and the chairman and founder

of CyberScout.