Aglets, a framework and runtime platform for mobile agents developed by the IBM Tokyo Research Laboratory, is an advanced system of mobile agents written in Java, and is already used in some commercial applications. Using mobile agent technologies provides potential benefits to applications, but they also pose security threats to those applications. These threats not only come as malicious agents, but also in the form of malicious hosts. In this paper we introduce security features against these threats. Access control and message protection can prevent attacks by malicious agents. Server authentication allows agents to avoid movement to malicious hosts and blocks suspicious agents coming from malicious hosts. Copyright © 2002 John Wiley & Sons, Ltd.