Harassment by a letting agent, or by anyone working on behalf of the landlord, is also a criminal offences. If your landlord knows how the agent is behaving, then your landlord could be held equally responsible by law.
Most agents dealing with properties in Wales should have a licence under the Rent Smart Wales scheme. If you are being harassed, or have been threatened with illegal eviction by an agent, check the Rent Smart Wales website to see if the agent has a licence and, if so, make a complaint so that Rent Smart Wales can investigate it further.
Some agencies belong to trade associations such as:
Most trade associations have a complaints procedure and some may have a mediation service, which could help to negotiate a solution to the problem. If your agent has behaved illegally, it could be asked to leave the trade association.