Analyze the security risks when an AI agent processes external documents and makes network requests simultaneously. Design test cases to verify if the agent would leak internal tokens when processing seemingly legitimate documents. Evaluate different defense mechanisms and recommend the most effective ones based on test results.