Actually there is a form - TAR 1503 - Termination of Buyer/Tenant Representation Agreement. As everyone before has stated, an email or some notification from you in writing to your agent is generally acceptable notification. However, your agent may use this form to clearly spell out the terms of the termination including any fees due for services rendered and fees due if you purchase a home in a specified period of time. The amount may be zero, but this document will make it very clear and is signed by both the agent and the buyer.
If you need addtional help, give me a call or email.