Your Agent Can Defend Itself against Backdoor Attacks