You should google "covenant not to sue" for your specific state. Following template is just a general form, it might or might not suit your local law.
http://www.alllaw.com/forms/litigation/general_covenant_not
http://www.alllaw.com/forms/litigation/general_covenant_not