While you could ask on our sister site about law, it hardly seems worth the trouble. This is utterly egregious. Get yourself lawyer at once.
Most (all?) UK lawyers will offer you a free consultation, and within a few minutes I am sure that they will tell you that you have an open and shut case (if everything is as you told us, and there is nothing more).
My prediction is that they will charge you less than £100 to write a letter to the company, who will then cave in and pay you all that you are due, when they know that you are not a pushover and are willing to defend yourself and have a champion to do so.
If not, then you have to take them to court. If the amount is less than £10k in England & wales (£5k in Scotland and £3k in Northern Ireland), then you can take them to Small Claims Court. The government has plenty of info on-line, as do other consumer sites, like this article from Which, and this one.
While you can represent yourself in small claims court, and this does seem like a very simple case, I personally would not mind paying a layer a few £100 to be sure of winning a few £k owed.
If the disputed amount is over the small claims court limit, then you have to go to court. In the UK it is normal for the winner to be awarded his legal fees, so, if you win, the agency will have to give to give you your back pay, and they will also have to pay your lawyer, so you will not be out of pocket (I am unsure if you would also be awarded your fees for a small claims court win, but it seems likely).
Be sure to get some sort of business lawyer, not divorce or property, obviously – and definitely not one of those injury lawyers who advertise on TV. If you are unsure, just call the nearest and I imagine they will refer you elsewhere if they cannot handle your case.
Finally, and this is entirely optional, if all is as you say, you might feel that others ought to be warned against this agency. You might consider posting a review won GlassDoor and the like.
However, when doing so, one always has to be extremely careful not to slander – and that goes doubly for you, if you annoy them by taking them to court – but a simples statement of facts, like “I had to sue them - successfully – to get my last X months’ pay”, and not “these people are evil, and will rob you”.
But, don’t listen to me about this; while you are talking to the lawyer, ask their advice. Lawyers are naturally cautious & will probably warn you against doing so. If you feel strongly, they will advise you as to wording, but maybe you just want to let it go and put the whole thing behind you. You choice.
Good luck, and please come back and tell us how it turns out.