It is freely negotiable but there are ranges/norms. Usually as a buyer you pay nothing, directly. It is of course buried in the sale price of the house. Usually the seller pays a commission, and usually the buyer's broker takes 50% of the seller's commission.
However, you might be asked to pay more of it or offer it (i.e. top it up), or less (unusual) or a fixed % or a minimum as the buyer. I would not sign that, but it is up to you. Some sellers pay 6% on the first $100,000 then 3% on the balance, some negotiate a 2.5 to 3% flat fee depending on the price of the house or the overall market (the higher the home value the lower the % and the 5-6% on the first $100,000 goes away usually, say over $600,000). Some discount brokers charge one percent or less, but also do little for it. Your buyer's agent may not show you this house, although it might be a good fit. As such you could offer, in writing, "I will always pay you at least 1.5%"
You pay peanuts, you get monkeys.