If you don't control three permanents you don't own as your end step begins, Agent of Treachery's last ability doesn't trigger. If you no longer control three permanents you don't own as it resolves, you won't draw three cards. Those don't have to be the same three permanents each time.