To be fair on agents, this was the idea of an human it seems. Still, this breaks every law everywhere.
Judging by the amount of gig workers out there, I'm fairly sure gig work is legal.