The agent gets 2 month deposit. They get paid 1 month from that deposit and give the rest to landlord.
You wrote this yourself, so I am 100% confident you will not be getting any deposit back.
When me and wife decide to rent, we only rent from landlords that are not in the country (prefer HK, Taiwanese, Singaporean landlords) Every time the repair was needed, this was handled without any issue with the agent who just need to contact the landlord to approve the repairs.