Just to be absolutely clear, you do not have to let anyone into your home EVER. Even WITH written notice of a viewing.
You can change the locks too to prevent unauthorised entry and can stipulate that if they want to get in, they can apply for a court order.
This is the short hand, but trust me, all of the above is absolutely true, I checked it out, got solicitors, shelter and CAB to advise and have the paperwork to prove it.
I would suggest that you write a stinging letter to the Agent with a CC to the landlord complaining about today and the attempt at entry to your home and to state that all viewings must be agreed with you by email/phone call in advance. Or you could say that viewings are restricted to certain times and days if that suits you best, but that you will expect them to confirm the appointments with you in advance and that all viewings will be accompanied. You will NOT allow viewings while you are not there.
Warn them then that if there is literally ANY repeat of this unauthorised entry to your HOME, then you will immediately rescind all viewing rights until after you leave, change the locks temporarily, reinstating them professionally AT THEIR COST prior to your move out date. If it gets to this stage that you are well within your rights to refuse all entry except by court order or in the event of a dire emergency, and that any physical attempt to gain access would be classed as trespass and that you will call the Police every time.
I know this sounds as if it is in conflict with your tenancy agreement, but trust me, your right to quiet enjoyment and right to freedom from harassment trump pretty much anything.
If they wanted to challenge anything, they are more than welcome to take the matter to court, which of course will take weeks/months.
Trust me, I am 100% sure of what I am talking about.