It's called a hold harmless agreement and if you google the phrase you'll find sample wording all over the internet.
You can start with basic wording and modify it to say what you want it to say.
Should go without saying (I'll say it anyway) but if you can't write up something based on the samples, then hire an attorney to do it for you.

