The Quagents system provides a flexible interface to the functionality of a game engine. The goal is to make interactive games a useful research and teaching vehicle for academics. Quagents is freely available, and runs under Unix/Linux, Windows, and Mac OS X. Intelligent agent controllers may be programmed in any language that supports sockets. A communications protocol between the controller and the bot resembles that between the high-level software and low-level controller of a mobile robot. More complex APIs may be built on the protocol that support complex interactions like trading. We describe the Quagent architecture and research and teaching applications.