The agent is the professional who filled in the blanks on the CAR sales contract for you. The agent is an agent. You are the principal.
If there is a reason to get out of the contract with the seller that is covered by your inspection contingency during the contingency time period then your agent should either help you get out of the contract if that is what you must do. or help you to see if it makes sense to proceed with the deal. You may just have buyer jitters, cold feet,, buyers remorse. Humans are emotional, there is no shame in that. However, if you are wishing to cancel a $100,000 plus deal over some needed repair that represents a teeny tiny fraction of the value of the deal then you are being emotional. - That is okay. .
You are not Captain Spock, so it is ok that your emotion wants to be part of your real estate experience, just make sure that your logical side gets to play a part too.
Would be curious as to more specifics on your question.
The contract states, when filled out properly, that you will pay the commission. However, it also says if any party other than you pays the commission, then you are relieved of that obligation. Therefore, if you buy a home through the brokerage you originally signed the contract with and the seller pays the commission, which sellers do 99.9% of the time, you will not owe a commission.
These contracts are bilateral, so you are prohibited from unilaterally canceling the contract.
If you no longer wish to work with the designated real estate agent, you might want to ask the agent's broker to assign you to another real estate agent. You can also ask that agent if he / she will release you from the contract as well. Sometimes, agents will.