BadAgent: Inserting and Activating Backdoor Attacks in LLM Agents