I don’t think that an agent can work for both vendor and buyer.
Essentially, the vendor “hires” the agent to find a buyer. The vendor agrees to pay a commission to the agent if the buyer he introduces buys.
At no point does the buyer agree to pay the agent.
One of the jobs of the agent is to negotiate a sale with the vendor and buyer, but this must not be confused with working for both vendor and buyer.
Any agent who says he works for both has a conflict of interest.
If you “hire” an agent to search for a property for you as a buyer and you agree to pay them a fee, then the agent cannot ethically accpet a commission from the vendor at the same time.
Therefore any agent with a commission agreement with a vendor, works for the vendor.