I would suggest that, especially since you are staying with the same brokerage, you ask to sit down with the broker and discuss with the broker why you are switching agents and that you want to be released from any contract you have with the first agent. Put it in writing stating that you want to be released from working with the first agent and state why and present it to the broker. You need to do that BEFORE you sign anything stating that you will be working with the second agent.
If you are going on to another home, it's a lot cleaner, since then there is no procurring cause if the first agent hasn't sent your information on or shown you the new home as there is with a home that you have already been shown. With a home that you have already written a contract on it's really messy, legally for a second agent to get involved.
agency, then the agent helping you very likely is working as a subagent of the seller, and is thus required to negotiate for the best interests of the seller.
You can bring in your own buyers agent, depending on where you are in the negotiations. If the seller has countered or has refused your offer, and it's your turn to respond, you can walk away or decline the counter; then return again later with a different agent to begin the negotiations again.
It's also important to note that if you were to sign a buyers agency with someone from that same office, then they very likely a dual agency relationship would arise, and both agents involved would have to become neutral in the negotiations. But that's assuming that this was all done in advance of negotiations. An agent shouldn't switch fiduciary loyalties midstream.