Walk up a set of steep stairs next to a vegan Chinese restaurant in Palo Alto, Calif., and you will see the future of work, or at least one version of it. This is the local office of Humanyze, a firm that provides "people analytics."

Its employees mill around an office full of sunlight and computers, as well as beacons that track their location and interactions. Everyone is wearing an ID badge the size of a credit card and the depth of a book of matches. It contains a microphone that picks up whether they are talking to one another; Bluetooth and infrared sensors to monitor where they are; and an accelerometer to record when they move.

"Every aspect of business is becoming more data-driven. There's no reason the people side of business shouldn't be the same," said Ben Waber, Humanyze's boss.

The company's staff are treated much the same way as its clients. Data from their employees' badges are integrated with information from their e-mail and calendars to form a full picture of how they spend their time at work.

Clients get to see only team-level statistics, but Humanyze's employees can look at their own data, which include metrics such as time spent with people of the same sex, activity levels and the ratio of time spent speaking vs. listening.

Such insights can inform corporate strategy. For example, according to Waber, firms might see that a management team is communicating only with a couple of departments and neglecting others; that certain parts of a building are underused, so the space should be redesigned; that teams are given the wrong incentives; or that diversity initiatives are not working.

Hitachi, a Japanese conglomerate, sells a similar product, which it has cheerily branded a "happiness meter." Employee welfare is a particular challenge in Japan, which has a special word, karoshi, for death by overwork. Hitachi's algorithms infer mood levels from physical movement and pinpoint business problems that might not have been noticed before, says Kazuo Yano, Hitachi's chief scientist. For example, one manufacturing client found that when young employees spent more than an hour in a meeting, whole teams developed lower morale.

Employers already have vast quantities of data about their workers. Thanks to the internet, smartphones and the cloud, employers can already check who is looking at a document, when employees are working and whether they might be stealing company files and contacts.

AI will go further, raising concerns about Orwellian snooping by employers on their workers. In January, Amazon was granted a pair of patents for wristbands that monitor warehouse workers' exact location and track their hand movements in real time. The technology will allow the company to gauge their employees' productivity and accuracy. JD.com, the Chinese e-commerce firm, is starting to experiment with tracking which teams and managers are the most efficient, and using algorithms to predict attrition among workers.

The integration of AI into the workplace will offer some benefits to workers and might even save lives. Companies with a high-risk work environment are starting to use computer vision to check whether employees are wearing appropriate safety gear, such as goggles and gloves, before giving them access to a danger area. Computer vision can also help analyze live video from cameras monitoring factory floors and work environments to detect when something is amiss.

Systems like this will become as "commonplace as CCTV cameras are in shops," said Alastair Harvey of Cortexica, a firm that specializes in building them.

Employees will also be able to track their own movements. Microsoft, the software giant, already offers a program called MyAnalytics which puts together data from e-mails, calendars and so on to show employees how they spend their time, how often they are in touch with key contacts and whether they multi-task too much. It also aggregates the data and offers them to managers of departments so they can see how their teams are doing.

It does not take much imagination to see that some companies, let alone governments, could take this information-gathering too far. Veriato, a U.S. firm, makes software that registers everything that happens on an employee's computer. It can search for signals that may indicate poor productivity and malicious activity, and scans e-mails to understand how sentiment changes over time. As voice-enabled speakers become more commonplace at work, they can be used to gather ever more data.

All this may require a new type of agreement between employers and employees. Most employment contracts in the U.S. give employers blanket rights to monitor employees and collect data about them, but few workers are aware of that. Waber of Humanyze thinks this data should have better legal protection.

As more companies rely on outside firms to collect and crunch employee information, privacy concerns will increase, and employees may feel violated if they do not think they have given their consent to sharing their data.

Laszlo Bock, who used to run Google's human-resources department and now heads a startup focused on work, reckons that "it's going to play out in a bad way before it plays out in a good way."