Your landlord can give a copy of your key to his or her agent to show the property that you are renting for resale without your consent or knowledge. You need to be aware that in most states a landlord is entitled to reasonable access to his or her rental upon appropriate notice.In most states twenty-four (24) hour notice of requested access to a rental by a landlord or his/her agent is deemed reasonable.In your situation as the tenant of the rental you should insist upon the required notice for access to your rental by the real estate agent or anyone else acting on behalf of your landlord by sending a letter to your landlord addressing this issue while keeping a copy for future need.Good luck.