How to Get Your AI Agents to Do Your Bidding (and Keep Them from Going Rogue)