Using a Right to Control test (similar to the test used in determining independent contractor status), employers that lease employees have also been held liable for employment discrimination, including harassment, that occurs in the workplace. If you are being harassed by an employee of the employer, you should complain to both the employer (following any published rules or policies) and also to the agency (again following any rules or policies of the agency).
A staffing firm is required to inform its client (the employer) of any harassment complaints and insure that the client investigates promptly and takes corrective measures. Additionally, it is against the law for the staffing firm to replace you because you complained of harassment, even at the client’s request, but the agency may also be able to offer you the opportunity to take a different assignment at the same rate of pay/benefits if you would prefer that to remaining at your current job placement.