How to Prevent AI Agents from Going Rogue