There's no foolproof way to know for sure, but there are a few things you can watch out for. For example, if an agent is pushing you to buy a property that isn't in your budget or trying to get you to sign a contract before you've had a chance to look at other properties, that's probably not someone who has your best interests at heart.
You should also ask the agent how they plan to help you find the right property. If they're just going to show you a few houses and then send you on your way, they're probably not interested in helping you find the right home - they're just interested in making a sale.
Finally, it's important to be comfortable