AI algorithms are increasingly used in the hiring, firing and daily decisions of work life but the law has not kept up, according to a report by Britain's Trades Union Congress (TUC).
Cases include AI favouring men over women, penalising ethnic minorities and judging people by their facial expression.
AI can also make work more efficient, ensure staff are paid by performance rather than gender, and that people who operate heavy machinery do not get too tired at the wheel, experts say.
'Used properly, AI can change the world of work for good. Used in the wrong way it can be exceptionally dangerous,' the report's authors, employment rights lawyers Robin Allen and Dee Masters, said in a statement.
'There are clear red lines, which must not be crossed if work is not to become dehumanised,' the lawyers from AI Law Consultancy firm said, pointing to 'huge gaps' in British law.
The government said it would ensure that regulations met the needs of new technology, and that an independent expert committee had been appointed to provide it with advice.
'Artificial Intelligence should be used to support workers and wider society, making working lives easier and more efficient,' a government spokesman said in a statement.
The coronavirus pandemic has accelerated the use of AI at work, according to the TUC, which brings together 48 unions representing more than 5 million workers in Britain.
In July, a survey of almost 10,000 businesses across 30 European countries found 42% used at least one AI technology and 18% had plans to adopt AI technologies in the next two years.
Decisions often taken by algorithms include selecting candidates for interview, performance ratings, shift allocation and redundancies, according to the TUC.
Yet, workers are often kept in the dark about algorithms' role in decisions that affect them and often lack any way to challenge them, it said.
While AI can improve productivity, research shows some algorithms single out minorities for unfair treatment, it added.
In 2018, Amazon was forced to scrap an AI recruiting engine that was found to prefer men over women, and researchers have questioned the accuracy of software that analyses facial expressions to assess job candidates' suitability for a role.
The TUC said employers should be made to consult unions before introducing AI systems affecting pay and other key work decisions - a step that experts say could benefit everyone.
'Technology moves so fast than trying to regulate it with a law, as such, will be nearly impossible,' Jeremias Adams-Prassl, a University of Oxford researcher into tech at work, told the Thomson Reuters Foundation.
'The key advantage of social dialogue ... is that it's a super flexible approach.'
Other suggested reforms include giving workers the right to have humans review any decisions made by AI and to 'switch off' from work with 'communication free' zones in daily life.
'This is a fork in the road,' the TUC's general secretary Frances O'Grady said in a statement.
'Without fair rules, the use of AI at work could lead to widespread discrimination and unfair treatment – especially for those in insecure work and the gig economy.'