Your landlord needs to say to the agent, "I have a sitting tenant, who wishes to renew for another year, you can remove my listing from your agency as it is not available." If the agency is holding the deposit, the owner asks for it back and holds it now
Take your existing contract, alter the parts that removes the agency from the contract and sign it with owner.