check if the agent exists