While spies of any country may secretly use Embassies as base of operations, the Ambassadors themselves and other diplomatic personnel are explicitly prohibited from spying. They are supposed to negotiate etc in name of their government, and report back to it only what they get told. Ambassadors who are caught spying are normally expelled.